Skip to content

Commit 1459e58

Browse files
committed
[M68k] Fix incorrect boolean content type
M68k's SETCC instruction (`scc`) distinctly fills the destination byte with all 1s. If boolean contents are set to `ZeroOrOneBooleanContent`, LLVM can mistakenly think the destination holds `0x01` instead of `0xff` and emit broken code as a result. This change corrects the boolean content type to `ZeroOrNegativeOneBooleanContent`.
1 parent 1ddb909 commit 1459e58

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
@@ -51,7 +51,7 @@ M68kTargetLowering::M68kTargetLowering(const M68kTargetMachine &TM,
5151

5252
MVT PtrVT = MVT::i32;
5353

54-
setBooleanContents(ZeroOrOneBooleanContent);
54+
setBooleanContents(ZeroOrNegativeOneBooleanContent);
5555

5656
auto *RegInfo = Subtarget.getRegisterInfo();
5757
setStackPointerRegisterToSaveRestore(RegInfo->getStackRegister());

0 commit comments

Comments
 (0)