Previously we used the type from the LHS of the compare, but a future patch will change decomposeBitTestICmp to look through truncates so it will return a pretruncated Value* and the type needs to match that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312380
91177308-0d34-0410-b5e6-
96231b3b80d8
if (!llvm::decomposeBitTestICmp(LHS, RHS, Pred, X, Mask))
return false;
- Y = ConstantInt::get(LHS->getType(), Mask);
- Z = ConstantInt::get(RHS->getType(), 0);
+ Y = ConstantInt::get(X->getType(), Mask);
+ Z = ConstantInt::get(X->getType(), 0);
return true;
}