summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-11-12 02:28:21 +0000
committerCraig Topper <craig.topper@intel.com>2017-11-12 02:28:21 +0000
commitd3e5781e53aaeded7d6ce85aa1118275fcf82bdc (patch)
tree9c6972978523731097a8739e74c08d8788a275e2 /llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
parentbfb990b78325a0af160178cdf3803686ec7ba695 (diff)
downloadbcm5719-llvm-d3e5781e53aaeded7d6ce85aa1118275fcf82bdc.tar.gz
bcm5719-llvm-d3e5781e53aaeded7d6ce85aa1118275fcf82bdc.zip
[InstCombine] Teach visitICmpInst to not break integer absolute value idioms
Summary: This patch adds an early out to visitICmpInst if we are looking at a compare as part of an integer absolute value idiom. Similar is already done for min/max. In the particular case I observed in a benchmark we had an absolute value of a load from an indexed global. We simplified the compare using foldCmpLoadFromIndexedGlobal into a magic bit vector, a shift, and an and. But the load result was still used for the select and the negate part of the absolute valute idiom. So we overcomplicated the code and lost the ability to recognize it as an absolute value. I've chosen a simpler case for the test here. Reviewers: spatel, davide, majnemer Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39766 llvm-svn: 317994
Diffstat (limited to 'llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud