[DAGCombine] Disable select(c, load,load) for indexed loads
authorHal Finkel <hfinkel@anl.gov>
Wed, 22 Apr 2015 11:32:25 +0000 (11:32 +0000)
committerHal Finkel <hfinkel@anl.gov>
Wed, 22 Apr 2015 11:32:25 +0000 (11:32 +0000)
commit61ffda59f952509ecba1a51d519eb7853c83184d
tree8260737fc0bc1c32e525b7be413eb74621264980
parent21249eca6b2c089ec67c9fa3a770654bb34a7437
[DAGCombine] Disable select(c, load,load) for indexed loads

This turned up after r235333, but was a pre-existing bug. The optimization
which transforms select(c, load, load) into a load of a select of the addresses
does not handle indexed loads (pre/post inc/dec). However, it did not check for
them either, leading to a crash if it tried to transform one of them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235497 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/PowerPC/preinc-ld-sel-crash.ll [new file with mode: 0644]