diff options
author | dim <dim@FreeBSD.org> | 2010-10-07 16:32:35 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2010-10-07 16:32:35 +0000 |
commit | 4ace901e87dac5bbbac78ed325e75462e48e386e (patch) | |
tree | 99654a7bec5100d4946dd9006e41d4718e0f14bd /lib/Target/ARM/ARMBaseInstrInfo.cpp | |
parent | 5d5cc59cc77afe655b3707cb0e69e0827b444cad (diff) | |
download | FreeBSD-src-4ace901e87dac5bbbac78ed325e75462e48e386e.zip FreeBSD-src-4ace901e87dac5bbbac78ed325e75462e48e386e.tar.gz |
Vendor import of llvm 2.8 release:
http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_28@115866
Approved by: rpaulo (mentor)
Diffstat (limited to 'lib/Target/ARM/ARMBaseInstrInfo.cpp')
-rw-r--r-- | lib/Target/ARM/ARMBaseInstrInfo.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp index 3a8bebe..e4f10f9 100644 --- a/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -1389,7 +1389,8 @@ ConvertToSetZeroFlag(MachineInstr *MI, MachineInstr *CmpInstr) const { // Check that CPSR isn't set between the comparison instruction and the one we // want to change. - MachineBasicBlock::const_iterator I = CmpInstr, E = MI; + MachineBasicBlock::const_iterator I = CmpInstr, E = MI, + B = MI->getParent()->begin(); --I; for (; I != E; --I) { const MachineInstr &Instr = *I; @@ -1403,6 +1404,10 @@ ConvertToSetZeroFlag(MachineInstr *MI, MachineInstr *CmpInstr) const { if (MO.getReg() == ARM::CPSR) return false; } + + if (I == B) + // The 'and' is below the comparison instruction. + return false; } // Set the "zero" bit in CPSR. |