projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PowerPC] Avoid VSX FMA mutate when killed product reg = addend reg
[oota-llvm.git]
/
lib
/
Target
/
PowerPC
/
PPCInstrInfo.cpp
diff --git
a/lib/Target/PowerPC/PPCInstrInfo.cpp
b/lib/Target/PowerPC/PPCInstrInfo.cpp
index ff2633eac3f874e2bfafcb3e84eb5a0519f33f82..daf8790fefcc5988e1c7d879f1f5bcf78af78beb 100644
(file)
--- a/
lib/Target/PowerPC/PPCInstrInfo.cpp
+++ b/
lib/Target/PowerPC/PPCInstrInfo.cpp
@@
-1754,6
+1754,12
@@
protected:
unsigned OldFMAReg = MI->getOperand(0).getReg();
unsigned OldFMAReg = MI->getOperand(0).getReg();
+ // The transformation doesn't work well with things like:
+ // %vreg5 = A-form-op %vreg5, %vreg11, %vreg5;
+ // so leave such things alone.
+ if (OldFMAReg == KilledProdReg)
+ continue;
+
assert(OldFMAReg == AddendMI->getOperand(0).getReg() &&
"Addend copy not tied to old FMA output!");
assert(OldFMAReg == AddendMI->getOperand(0).getReg() &&
"Addend copy not tied to old FMA output!");