aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Basic/VirtualFileSystemTest.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-05-10 20:46:54 +0000
committerSanjay Patel <spatel@rotateright.com>2016-05-10 20:46:54 +0000
commit6786bc5390161ce470882d62327ef8ef7cd36f92 (patch)
tree0128cbc5e18121b0a9932ca755e1a2634bfd2aa2 /clang/unittests/Basic/VirtualFileSystemTest.cpp
parentdcb7a821b874085e2a1bdcc780dd3d0e72a43d84 (diff)
downloadllvm-6786bc5390161ce470882d62327ef8ef7cd36f92.zip
llvm-6786bc5390161ce470882d62327ef8ef7cd36f92.tar.gz
llvm-6786bc5390161ce470882d62327ef8ef7cd36f92.tar.bz2
[InstSimplify] use computeKnownBits on shift amount operands
Do simplifications common to all shift instructions based on the amount shifted: 1. If the shift amount is known larger than the bitwidth, the result is undefined. 2. If the valid bits of the shift amount are all known to be 0, it's a shift by zero, so the shift operand is the result. Note that we could generalize the shift-by-zero transform into a shift-by-constant if all of the valid bits in the shift amount are known, but that would have to be done in InstCombine rather than here because it would mean we need to create a new shift instruction. Differential Revision: http://reviews.llvm.org/D19874 llvm-svn: 269114
Diffstat (limited to 'clang/unittests/Basic/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions