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)
commit5013d1d5e4586269fb2dd56fd4f20563a1fdf93d
treef56793c3db01edd7b0a10431be007ab0f539a34e
parentbf48d8ae51e9eff282c2b26226aa11e577ea76a2
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209694 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp