From 379682b0e51c21d6ebb364f9d5f0f0b4008a07e8 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Sat, 23 Feb 2008 02:14:42 +0000 Subject: [PATCH] If remating a machine instr with virtual register operand, make sure the vr is avaliable at all uses regardless of whether it would be folded. llvm-svn: 47526 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index f1de4d184efa..a18f36afb7f6 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -680,8 +680,7 @@ bool LiveIntervals::isReMaterializable(const LiveInterval &li, unsigned UseIdx = getInstructionIndex(UseMI); if (li.FindLiveRangeContaining(UseIdx)->valno != ValNo) continue; - if (!canFoldMemoryOperand(UseMI, li.reg) && - !isValNoAvailableAt(ImpLi, MI, UseIdx)) + if (!isValNoAvailableAt(ImpLi, MI, UseIdx)) return false; } }