[AMDGPU] Fix windows build warning with IMMBitSelConst. NFC.
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Thu, 3 Feb 2022 19:44:45 +0000 (11:44 -0800)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Thu, 3 Feb 2022 20:03:22 +0000 (12:03 -0800)
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?)

llvm/lib/Target/AMDGPU/SIInstructions.td

index 02275f1..3f1d10b 100644 (file)
@@ -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);
 }]>;