avoid type mismatch when building SCEVs
authorSebastian Pop <spop@codeaurora.org>
Tue, 27 May 2014 22:42:00 +0000 (22:42 +0000)
committerSebastian Pop <spop@codeaurora.org>
Tue, 27 May 2014 22:42:00 +0000 (22:42 +0000)
commitf93ef123300cf943980fef09cee723cf49c96017
tree8f657de4423a0d4d435d831147a7054002e06061
parente30bd351cc8ac1981b1c6e4190a74d6f5ab77097
avoid type mismatch when building SCEVs

This is a corner case I have stumbled upon when dealing with ARM64 type
conversions. I was not able to extract a testcase for the community codebase to
fail on. The patch conservatively discards a division that would have ended up
in an ICE due to a type mismatch when building a multiply expression. I have
also added code to a place that builds add expressions and in which we should be
careful not to pass in operands of different types.

llvm-svn: 209694
llvm/lib/Analysis/ScalarEvolution.cpp