diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-10-01 23:52:25 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-10-01 23:52:25 +0000 |
commit | 28792c4a3dfc458c79877ff04534bae993c333dc (patch) | |
tree | 5486f2db41830f6a82d25b39eb7a55d3d51b0d65 /llvm/lib/CodeGen/LiveInterval.cpp | |
parent | 8fd5b3c071b1ded29ecb9a0031c9ecf633bfb1e9 (diff) | |
download | bcm5719-llvm-28792c4a3dfc458c79877ff04534bae993c333dc.tar.gz bcm5719-llvm-28792c4a3dfc458c79877ff04534bae993c333dc.zip |
When RemoveCopyByCommutingDef is creating additional identity copies, just use
LiveInterval::MergeValueNumberInto instead of trying to extend LiveRanges and
getting it wrong.
This fixed PR8249 where a valno with a multi-segment live range was defined by
an identity copy created by RemoveCopyByCommutingDef. Some of the live
segments disappeared.
llvm-svn: 115385
Diffstat (limited to 'llvm/lib/CodeGen/LiveInterval.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveInterval.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp index b4f0a94e97f..e18d7c7858b 100644 --- a/llvm/lib/CodeGen/LiveInterval.cpp +++ b/llvm/lib/CodeGen/LiveInterval.cpp @@ -582,6 +582,9 @@ VNInfo* LiveInterval::MergeValueNumberInto(VNInfo *V1, VNInfo *V2) { } } + // Merge the relevant flags. + V2->mergeFlags(V1); + // Now that V1 is dead, remove it. markValNoForDeletion(V1); |