[llvm] r331359 - Fix '32-bit shift implicitly converted to 64 bits' warning by using APInt::setBit instead.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed May 2 07:22:31 PDT 2018


Author: rksimon
Date: Wed May  2 07:22:30 2018
New Revision: 331359

URL: http://llvm.org/viewvc/llvm-project?rev=331359&view=rev
Log:
Fix '32-bit shift implicitly converted to 64 bits' warning by using APInt::setBit instead.

Modified:
    llvm/trunk/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp

Modified: llvm/trunk/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp?rev=331359&r1=331358&r2=331359&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp (original)
+++ llvm/trunk/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp Wed May  2 07:22:30 2018
@@ -82,7 +82,7 @@ static bool matchMaskedCmpOp(Value *V, s
     Result.first = Candidate;
 
   // Fill in the mask bit derived from the shift constant.
-  Result.second |= (1 << BitIndex);
+  Result.second.setBit(BitIndex);
   return Result.first == Candidate;
 }
 




More information about the llvm-commits mailing list