InstCombine: Defensively avoid undefined shifts by limiting the amount to the bit...
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 28 Aug 2012 13:59:23 +0000 (13:59 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 28 Aug 2012 13:59:23 +0000 (13:59 +0000)
commit37dca6331d6bfadfb80b3c68a1cabd6bdf1a13be
tree74a910be83bba420e45c12b54c4d01aef1ede0dd
parentaac7c650a6cac09d42c5fda8d3761bc9c871ff03
InstCombine: Defensively avoid undefined shifts by limiting the amount to the bit width.

No test case, undefined shifts get folded early, but can occur when other
transforms generate a constant. Thanks to Duncan for bringing this up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162755 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp