[llvm] 87976ca - [M68k] Suppress compilation warning `enumerated mismatch in conditional expression`. (NFC)

Jim Lin via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 5 23:17:52 PST 2025


Author: Jim Lin
Date: 2025-03-06T15:06:46+08:00
New Revision: 87976ca45f4fa983ef92bf8f43a54472ec354e00

URL: https://github.com/llvm/llvm-project/commit/87976ca45f4fa983ef92bf8f43a54472ec354e00
DIFF: https://github.com/llvm/llvm-project/commit/87976ca45f4fa983ef92bf8f43a54472ec354e00.diff

LOG: [M68k] Suppress compilation warning `enumerated mismatch in conditional expression`. (NFC)

Added: 
    

Modified: 
    llvm/lib/Target/M68k/M68kISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/M68k/M68kISelLowering.cpp b/llvm/lib/Target/M68k/M68kISelLowering.cpp
index 39b307b28889c..aebeaf0e3db5a 100644
--- a/llvm/lib/Target/M68k/M68kISelLowering.cpp
+++ b/llvm/lib/Target/M68k/M68kISelLowering.cpp
@@ -1594,13 +1594,13 @@ static void lowerOverflowArithmetic(SDValue Op, SelectionDAG &DAG,
   case ISD::UMULO:
     PromoteMULO(ISD::ZERO_EXTEND);
     NoOverflow = VT != MVT::i32;
-    BaseOp = NoOverflow ? ISD::MUL : M68kISD::UMUL;
+    BaseOp = NoOverflow ? (unsigned)ISD::MUL : (unsigned)M68kISD::UMUL;
     CC = M68k::COND_VS;
     break;
   case ISD::SMULO:
     PromoteMULO(ISD::SIGN_EXTEND);
     NoOverflow = VT != MVT::i32;
-    BaseOp = NoOverflow ? ISD::MUL : M68kISD::SMUL;
+    BaseOp = NoOverflow ? (unsigned)ISD::MUL : (unsigned)M68kISD::SMUL;
     CC = M68k::COND_VS;
     break;
   }


        


More information about the llvm-commits mailing list