Skip to content

Commit f608373

Browse files
committed
[M68k] Fix backwards BTST condition
1 parent a9148d5 commit f608373

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/M68k/M68kISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1666,7 +1666,7 @@ static SDValue getBitTestCondition(SDValue Src, SDValue BitNo, ISD::CondCode CC,
16661666
SDValue BTST = DAG.getNode(M68kISD::BTST, DL, MVT::i32, Src, BitNo);
16671667

16681668
// NOTE BTST sets CCR.Z flag
1669-
M68k::CondCode Cond = CC == ISD::SETEQ ? M68k::COND_NE : M68k::COND_EQ;
1669+
M68k::CondCode Cond = CC == ISD::SETEQ ? M68k::COND_EQ : M68k::COND_NE;
16701670
return DAG.getNode(M68kISD::SETCC, DL, MVT::i8,
16711671
DAG.getConstant(Cond, DL, MVT::i8), BTST);
16721672
}

0 commit comments

Comments
 (0)