Fix '32-bit shift implicitly converted to 64 bits' warning by using APInt::setBit...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 2 May 2018 14:22:30 +0000 (14:22 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 2 May 2018 14:22:30 +0000 (14:22 +0000)
llvm-svn: 331359

llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp

index 7d117a5..b61c0b8 100644 (file)
@@ -82,7 +82,7 @@ static bool matchMaskedCmpOp(Value *V, std::pair<Value *, APInt> &Result) {
     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;
 }