[llvm] 5ebb22d - [Mips] Remove an unnecessary cast (NFC) (#152837)

via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 9 06:58:09 PDT 2025


Author: Kazu Hirata
Date: 2025-08-09T06:58:06-07:00
New Revision: 5ebb22de6ac0dd4fa8d024957b8f2c9537256c73

URL: https://github.com/llvm/llvm-project/commit/5ebb22de6ac0dd4fa8d024957b8f2c9537256c73
DIFF: https://github.com/llvm/llvm-project/commit/5ebb22de6ac0dd4fa8d024957b8f2c9537256c73.diff

LOG: [Mips] Remove an unnecessary cast (NFC) (#152837)

getZExtValue() already returns uint64_t.

Added: 
    

Modified: 
    llvm/lib/Target/Mips/MipsISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp
index 881ba8e2f9eff..7b875a8436772 100644
--- a/llvm/lib/Target/Mips/MipsISelLowering.cpp
+++ b/llvm/lib/Target/Mips/MipsISelLowering.cpp
@@ -4408,7 +4408,7 @@ void MipsTargetLowering::LowerAsmOperandForConstraint(SDValue Op,
   case 'K': // unsigned 16 bit immediate
     if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
       EVT Type = Op.getValueType();
-      uint64_t Val = (uint64_t)C->getZExtValue();
+      uint64_t Val = C->getZExtValue();
       if (isUInt<16>(Val)) {
         Result = DAG.getTargetConstant(Val, DL, Type);
         break;


        


More information about the llvm-commits mailing list