summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/PeepholeOptimizer.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-09-21 12:01:15 +0000
committerGabor Greif <ggreif@gmail.com>2010-09-21 12:01:15 +0000
commitadbbb93d3da37e091e37ca6ebf9a82a123910cc8 (patch)
tree74f0b7d6380bdb13babd17e36f5e143606e96668 /llvm/lib/CodeGen/PeepholeOptimizer.cpp
parent3240ff93026ad8bcce70372a9e01be0d32ce3a69 (diff)
downloadbcm5719-llvm-adbbb93d3da37e091e37ca6ebf9a82a123910cc8.tar.gz
bcm5719-llvm-adbbb93d3da37e091e37ca6ebf9a82a123910cc8.zip
Move the search for the appropriate AND instruction
into OptimizeCompareInstr. This necessitates the passing of CmpValue around, so widen the virtual functions to accomodate. No functionality changes. llvm-svn: 114428
Diffstat (limited to 'llvm/lib/CodeGen/PeepholeOptimizer.cpp')
-rw-r--r--llvm/lib/CodeGen/PeepholeOptimizer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/PeepholeOptimizer.cpp b/llvm/lib/CodeGen/PeepholeOptimizer.cpp
index 28a4a9e301e..5fa63a92ba6 100644
--- a/llvm/lib/CodeGen/PeepholeOptimizer.cpp
+++ b/llvm/lib/CodeGen/PeepholeOptimizer.cpp
@@ -238,13 +238,13 @@ bool PeepholeOptimizer::OptimizeCmpInstr(MachineInstr *MI,
// If this instruction is a comparison against zero and isn't comparing a
// physical register, we can try to optimize it.
unsigned SrcReg;
- int CmpValue;
- if (!TII->AnalyzeCompare(MI, SrcReg, CmpValue) ||
+ int CmpMask, CmpValue;
+ if (!TII->AnalyzeCompare(MI, SrcReg, CmpMask, CmpValue) ||
TargetRegisterInfo::isPhysicalRegister(SrcReg))
return false;
// Attempt to optimize the comparison instruction.
- if (TII->OptimizeCompareInstr(MI, SrcReg, CmpValue, NextIter)) {
+ if (TII->OptimizeCompareInstr(MI, SrcReg, CmpMask, CmpValue, NextIter)) {
++NumEliminated;
return true;
}
OpenPOWER on IntegriCloud