Tag build swift-4.0-DEVELOPMENT-SNAPSHOT-2017-05-23-a
InstructionSimplify: don't speculate about Constants changing.

When presented with an icmp/select pair, we can end up asking what would happen
if we replaced one constant with another in an instruction. This is a mistake,
while non-constant Values could become a constant, constants cannot change and
trying to do so can lead to completely invalid IR (a GEP referencing a
non-existant field in the original case).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303580 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed