[llvm] 1d11109 - [AMDGPU] Fix windows build warning with IMMBitSelConst. NFC.

Stanislav Mekhanoshin via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 3 12:03:32 PST 2022


Author: Stanislav Mekhanoshin
Date: 2022-02-03T12:03:22-08:00
New Revision: 1d111090ad0c2c022c67ef26e25949669c28a0c7

URL: https://github.com/llvm/llvm-project/commit/1d111090ad0c2c022c67ef26e25949669c28a0c7
DIFF: https://github.com/llvm/llvm-project/commit/1d111090ad0c2c022c67ef26e25949669c28a0c7.diff

LOG: [AMDGPU] Fix windows build warning with IMMBitSelConst. NFC.

VS gives this warning for an integer constant:
AMDGPUGenDAGISel.inc(214687): warning C4334: '<<': result of 32-bit
shift implicitly converted to 64 bits (was 64-bit shift intended?)

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/SIInstructions.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SIInstructions.td b/llvm/lib/Target/AMDGPU/SIInstructions.td
index 02275f19698cb..3f1d10b16e1a2 100644
--- a/llvm/lib/Target/AMDGPU/SIInstructions.td
+++ b/llvm/lib/Target/AMDGPU/SIInstructions.td
@@ -2270,7 +2270,7 @@ def : GCNPat <
 >;
 
 def IMMBitSelConst : SDNodeXForm<imm, [{
-  return CurDAG->getTargetConstant(1 << N->getZExtValue(), SDLoc(N),
+  return CurDAG->getTargetConstant(1ULL << N->getZExtValue(), SDLoc(N),
                                    MVT::i32);
 }]>;
 


        


More information about the llvm-commits mailing list