summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-02-07 21:41:50 +0000
committerCraig Topper <craig.topper@intel.com>2018-02-07 21:41:50 +0000
commit8baa9c77e3b2c063c8fa26627787730a610ce4f4 (patch)
tree64e93f36a8bb0becba811d9c757a3896f2f4e80e /clang/lib/CodeGen/CodeGenModule.cpp
parentfc940277cba00b3a023c8c0f15360df73319c2a4 (diff)
downloadbcm5719-llvm-8baa9c77e3b2c063c8fa26627787730a610ce4f4.tar.gz
bcm5719-llvm-8baa9c77e3b2c063c8fa26627787730a610ce4f4.zip
[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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud