[llvm] r335457 - Use APInt[] bit access to avoid "32-bit shift implicitly converted to 64 bits" MSVC warning (again). NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 25 04:46:24 PDT 2018


Author: rksimon
Date: Mon Jun 25 04:46:24 2018
New Revision: 335457

URL: http://llvm.org/viewvc/llvm-project?rev=335457&view=rev
Log:
Use APInt[] bit access to avoid "32-bit shift implicitly converted to 64 bits" MSVC warning (again). NFCI.

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp?rev=335457&r1=335456&r2=335457&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp Mon Jun 25 04:46:24 2018
@@ -1012,7 +1012,7 @@ Value *InstCombiner::simplifyAMDGCNMemor
   SmallVector<uint32_t, 8> EltMask;
   unsigned NewLoadIdx = 0;
   for (unsigned OrigLoadIdx = 0; OrigLoadIdx < VWidth; ++OrigLoadIdx) {
-    if (!!(DemandedElts & (1 << OrigLoadIdx)))
+    if (!!DemandedElts[OrigLoadIdx])
       EltMask.push_back(NewLoadIdx++);
     else
       EltMask.push_back(NewNumElts);




More information about the llvm-commits mailing list