summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/NewGVN.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2017-01-26 22:08:10 +0000
committerSanjay Patel <spatel@rotateright.com>2017-01-26 22:08:10 +0000
commit50753f02c2bb176f8a6276a9479427683dca251f (patch)
tree07789fc06aea109b630cf38d776703954e0c1bcc /llvm/lib/Transforms/Scalar/NewGVN.cpp
parentb67a3cef234978906bf75413cc918440f4136ae3 (diff)
downloadbcm5719-llvm-50753f02c2bb176f8a6276a9479427683dca251f.tar.gz
bcm5719-llvm-50753f02c2bb176f8a6276a9479427683dca251f.zip
[InstCombine] fold (X >>u C) << C --> X & (-1 << C)
We already have this fold when the lshr has one use, but it doesn't need that restriction. We may be able to remove some code from foldShiftedShift(). Also, move the similar: (X << C) >>u C --> X & (-1 >>u C) ...directly into visitLShr to help clean up foldShiftByConstOfShiftByConst(). That whole function seems questionable since it is called by commonShiftTransforms(), but there's really not much in common if we're checking the shift opcodes for every fold. llvm-svn: 293215
Diffstat (limited to 'llvm/lib/Transforms/Scalar/NewGVN.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud