summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-09-01 21:27:34 +0000
committerCraig Topper <craig.topper@intel.com>2017-09-01 21:27:34 +0000
commit924f20262ba939ca4e14b2cba59cc9c95a9c5e09 (patch)
tree1a2f19315c7268d43e8e03c1350f993405509497 /llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
parentd3b465606ab4d6f3966c110ad0626f162aaf5c97 (diff)
downloadbcm5719-llvm-924f20262ba939ca4e14b2cba59cc9c95a9c5e09.tar.gz
bcm5719-llvm-924f20262ba939ca4e14b2cba59cc9c95a9c5e09.zip
[InstCombine][InstSimplify] Teach decomposeBitTestICmp to look through truncate instructions
This patch teaches decomposeBitTestICmp to look through truncate instructions on the input to the compare. If a truncate is found it will now return the pre-truncated Value and appropriately extend the APInt mask. This allows some code to be removed from InstSimplify that was doing this functionality. This allows InstCombine's bit test combining code to match a pre-truncate Value with the same Value appear with an 'and' on another icmp. Or it allows us to combine a truncate to i16 and a truncate to i8. This also required removing the type check from the beginning of getMaskedTypeForICmpPair, but I believe that's ok because we still have to find two values from the input to each icmp that are equal before we'll do any transformation. So the type check was really just serving as an early out. There was one user of decomposeBitTestICmp that didn't want to look through truncates, so I've added a flag to prevent that behavior when necessary. Differential Revision: https://reviews.llvm.org/D37158 llvm-svn: 312382
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud