From 000cf708effc247ff1e609d0703324b21585a4af Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Wed, 3 Nov 2010 04:29:11 +0000 Subject: [PATCH] Invert these branches by default, it makes assembly comparisons a little easier to read. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118148 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMFastISel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp index d46ed95b1af..110aa9804cd 100644 --- a/lib/Target/ARM/ARMFastISel.cpp +++ b/lib/Target/ARM/ARMFastISel.cpp @@ -1014,11 +1014,11 @@ bool ARMFastISel::SelectBranch(const Instruction *I) { // Re-set the flags just in case. unsigned CmpOpc = isThumb ? ARM::t2CMPri : ARM::CMPri; AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(CmpOpc)) - .addReg(CmpReg).addImm(1)); + .addReg(CmpReg).addImm(0)); unsigned BrOpc = isThumb ? ARM::t2Bcc : ARM::Bcc; BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(BrOpc)) - .addMBB(TBB).addImm(ARMCC::EQ).addReg(ARM::CPSR); + .addMBB(TBB).addImm(ARMCC::NE).addReg(ARM::CPSR); FastEmitBranch(FBB, DL); FuncInfo.MBB->addSuccessor(TBB); return true; -- 2.34.1