InstCombine: Fix a crash in Descale for multiply-by-zero
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 10 Jul 2014 17:13:27 +0000 (17:13 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 10 Jul 2014 17:13:27 +0000 (17:13 +0000)
commit04934b0feca39e7d7818aa8d9b312c53e78f9785
tree86d8613c2a21c3b494ef1f9c1e46bed9c0f5382b
parentc1f152ee6c5163cd19a4f695bbb4321da2a0149b
InstCombine: Fix a crash in Descale for multiply-by-zero

Fix a crash in `InstCombiner::Descale()` when a multiply-by-zero gets
created as an argument to a GEP partway through an iteration, causing
-instcombine to optimize the GEP before the multiply.

rdar://problem/17615671

llvm-svn: 212742
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/descale-zero.ll [new file with mode: 0644]