[llvm] [M68k] Implement `SWAP` instruction encoding, patterns, and tests (PR #215597)

via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 15 17:11:20 PDT 2026


================
@@ -77,17 +77,29 @@ M68kTargetLowering::M68kTargetLowering(const M68kTargetMachine &TM,
   setTruncStoreAction(MVT::i32, MVT::i8, Expand);
   setTruncStoreAction(MVT::i16, MVT::i8, Expand);
 
-  setOperationAction({ISD::MUL, ISD::SDIV, ISD::UDIV}, MVT::i8, Promote);
-  setOperationAction({ISD::MUL, ISD::SDIV, ISD::UDIV}, MVT::i16, Legal);
-  if (Subtarget.atLeastM68020())
-    setOperationAction({ISD::MUL, ISD::SDIV, ISD::UDIV}, MVT::i32, Legal);
-  else
-    setOperationAction({ISD::MUL, ISD::SDIV, ISD::UDIV}, MVT::i32, LibCall);
-  setOperationAction(ISD::MUL, MVT::i64, LibCall);
----------------
knickish wrote:

was this dropped intentionally? maybe can just get rid of the diff for the mul/sdiv/udiv if not

https://github.com/llvm/llvm-project/pull/215597


More information about the llvm-commits mailing list