From 54801f78b1ed0078a4c07cbb5472830335987f66 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 5 Feb 2009 22:24:17 +0000 Subject: isAsCheapAsMove instructions can have register src operands. Check if they are really re-materializable. This fixes sse.expandfft and sse.stepfft. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63890 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SimpleRegisterCoalescing.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/CodeGen/SimpleRegisterCoalescing.cpp') diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp index 28d249235d..f09eee64b2 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -558,6 +558,9 @@ bool SimpleRegisterCoalescing::ReMaterializeTrivialDef(LiveInterval &SrcInt, const TargetInstrDesc &TID = DefMI->getDesc(); if (!TID.isAsCheapAsAMove()) return false; + if (!DefMI->getDesc().isRematerializable() || + !tii_->isTriviallyReMaterializable(DefMI)) + return false; bool SawStore = false; if (!DefMI->isSafeToMove(tii_, SawStore)) return false; -- cgit v1.2.3-70-g09d2