[llvm] 2c58088 - [ARM] Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFC.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 8 07:27:13 PST 2023


Author: Simon Pilgrim
Date: 2023-02-08T15:27:05Z
New Revision: 2c580884c1de70b13503a14f61ea124e7202308d

URL: https://github.com/llvm/llvm-project/commit/2c580884c1de70b13503a14f61ea124e7202308d
DIFF: https://github.com/llvm/llvm-project/commit/2c580884c1de70b13503a14f61ea124e7202308d.diff

LOG: [ARM] Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFC.

Use APInt::setBit() method instead of OR'ing individual bits.

Added: 
    

Modified: 
    llvm/lib/Target/ARM/ARMISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index e66470109be2..6370ac39c264 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -17139,7 +17139,7 @@ static SDValue PerformReduceShuffleCombine(SDNode *N, SelectionDAG &DAG) {
   for (int E : Mask) {
     if (E < 0 || E >= (int)Mask.size())
       return SDValue();
-    SetElts |= 1 << E;
+    SetElts.setBit(E);
   }
   if (!SetElts.isAllOnes())
     return SDValue();


        


More information about the llvm-commits mailing list