diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2009-02-05 22:24:17 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-05 22:24:17 +0000 |
| commit | 2599084ac5f7862818125d67fb4be6586d081cbd (patch) | |
| tree | d544dcfc8f3ea339ff56b01224c629f0d6ae42e4 /llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp | |
| parent | f80493bbfd6e403457eb6eb865c4d70000f6a446 (diff) | |
| download | bcm5719-llvm-2599084ac5f7862818125d67fb4be6586d081cbd.tar.gz bcm5719-llvm-2599084ac5f7862818125d67fb4be6586d081cbd.zip | |
isAsCheapAsMove instructions can have register src operands. Check if they are really re-materializable.
This fixes sse.expandfft and sse.stepfft.
llvm-svn: 63890
Diffstat (limited to 'llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp index 28d249235d1..f09eee64b2c 100644 --- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/llvm/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; |

