llvm-capstone/llvm
Craig Topper 8baa9c77e3 [X86] When doing callee save/restore for k-registers make sure we don't use KMOVQ on non-BWI targets
If we are saving/restoring k-registers, the default behavior of getMinimalRegisterClass will find the VK64 class with a spill size of 64 bits. This will cause the KMOVQ opcode to be used for save/restore. If we don't have have BWI instructions we need to constrain the class returned to give us VK16 with a 16-bit spill size. We can do this by passing the either v16i1 or v64i1 into getMinimalRegisterClass.

Also add asserts to make sure BWI is enabled anytime we use KMOVD/KMOVQ. These are what caught this bug.

Fixes PR36256

Differential Revision: https://reviews.llvm.org/D42989

llvm-svn: 324533
2018-02-07 21:41:50 +00:00
..
bindings
cmake Generate PDB files for profiling even in Release build. 2018-02-07 19:37:52 +00:00
docs Revert "AMDGPU: Add 32-bit constant address space" 2018-02-07 18:09:35 +00:00
examples Add OrcJIT dependency for Kaleidoscope Chapter 9. 2018-02-06 22:22:10 +00:00
include Revert "[DebugInfo] Improvements to representation of enumeration types (PR36168)" 2018-02-07 20:28:47 +00:00
lib [X86] When doing callee save/restore for k-registers make sure we don't use KMOVQ on non-BWI targets 2018-02-07 21:41:50 +00:00
projects
resources
runtimes
test [X86] When doing callee save/restore for k-registers make sure we don't use KMOVQ on non-BWI targets 2018-02-07 21:41:50 +00:00
tools Revert dsymutil -update commits 2018-02-07 17:35:27 +00:00
unittests Revert "[DebugInfo] Improvements to representation of enumeration types (PR36168)" 2018-02-07 20:28:47 +00:00
utils [CodeGenSchedule][NFC] Always emit ProcResourceUnits. 2018-02-05 12:23:51 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT
configure
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.