summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/IRMover.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-06-30 17:49:42 +0000
committerCraig Topper <craig.topper@intel.com>2018-06-30 17:49:42 +0000
commit5f28d50d27cf7bc9d86eaa8f904c043a068c55d2 (patch)
tree889c79cc5ae1296ba69b5ab13d28f1b7af6720ca /llvm/lib/Linker/IRMover.cpp
parent16a42ca274f95e5b4eb04719109f1af028b3b159 (diff)
downloadbcm5719-llvm-5f28d50d27cf7bc9d86eaa8f904c043a068c55d2.tar.gz
bcm5719-llvm-5f28d50d27cf7bc9d86eaa8f904c043a068c55d2.zip
[X86] When combining load to BZHI, make sure we create the shift instruction with an i8 type.
This combine runs pretty late and causes us to introduce a shift after the op legalization phase has run. We need to be sure we create the shift with the proper type for the shift amount. If we don't do this, we will still re-legalize the operation properly, but we won't get a chance to fully optimize the truncate that gets inserted. So this patch adds the necessary truncate when the shift is created. I've also narrowed the subtract that gets created to always be an i32 type. The truncate would have trigered SimplifyDemandedBits to optimize it anyway. But using a more appropriate VT here is free and saves an optimization step. llvm-svn: 336051
Diffstat (limited to 'llvm/lib/Linker/IRMover.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud