diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-01-16 23:11:54 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-01-16 23:11:54 +0000 |
commit | e8b886aa842369e1e1d5ab25c16e05690adbaa33 (patch) | |
tree | 977321e4365b1af4e1e9bbecb15b1ee4ee8dc468 /lib/CodeGen/RegAllocLocal.cpp | |
parent | 3e8ff6f95873fbfccc883c13170e2e65278a6948 (diff) | |
download | external_llvm-e8b886aa842369e1e1d5ab25c16e05690adbaa33.zip external_llvm-e8b886aa842369e1e1d5ab25c16e05690adbaa33.tar.gz external_llvm-e8b886aa842369e1e1d5ab25c16e05690adbaa33.tar.bz2 |
Fixes a nasty dag combiner bug that causes a bunch of tests to fail at -O0.
It's not safe to use the two value CombineTo variant to combine away a dead load.
e.g.
v1, chain2 = load chain1, loc
v2, chain3 = load chain2, loc
v3 = add v2, c
Now we replace use of v1 with undef, use of chain2 with chain1.
ReplaceAllUsesWith() will iterate through uses of the first load and update operands:
v1, chain2 = load chain1, loc
v2, chain3 = load chain1, loc
v3 = add v2, c
Now the second load is the same as the first load, SelectionDAG cse will ensure
the use of second load is replaced with the first load.
v1, chain2 = load chain1, loc
v3 = add v1, c
Then v1 is replaced with undef and bad things happen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46099 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLocal.cpp')
0 files changed, 0 insertions, 0 deletions