InstSimplify: shl nsw/nuw undef, %V -> undef
authorDavid Majnemer <david.majnemer@gmail.com>
Wed, 17 Dec 2014 01:54:33 +0000 (01:54 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Wed, 17 Dec 2014 01:54:33 +0000 (01:54 +0000)
commit891ec6d69ff375900d0c8a1cf8b806a8318c9a1f
tree9dff26f95d58d470dc23a5abaf279a21f36d34bf
parent9451a382ed38101a0f46b60887d5db7320d50a35
InstSimplify: shl nsw/nuw undef, %V -> undef

We can always choose an value for undef which might cause %V to shift
out an important bit except for one case, when %V is zero.

However, shl behaves like an identity function when the right hand side
is zero.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224405 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InstructionSimplify.cpp
test/Transforms/InstSimplify/undef.ll