Author: Simon Pilgrim Date: 2021-03-12T15:16:36Z New Revision: 731b3d766420ce05726174ff0e1527dca8a63791
URL: https://github.com/llvm/llvm-project/commit/731b3d766420ce05726174ff0e1527dca8a63791 DIFF: https://github.com/llvm/llvm-project/commit/731b3d766420ce05726174ff0e1527dca8a63791.diff LOG: [clang] Use Constant::getAllOnesValue helper. NFCI. Avoid -1ULL which MSVC tends to complain about Added: Modified: clang/lib/CodeGen/CGExprScalar.cpp Removed: ################################################################################ diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index 4774f92a2eed..ef3e27ecec99 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -3125,7 +3125,7 @@ void ScalarExprEmitter::EmitUndefinedBehaviorIntegerDivAndRemCheck( llvm::Value *IntMin = Builder.getInt(llvm::APInt::getSignedMinValue(Ty->getBitWidth())); - llvm::Value *NegOne = llvm::ConstantInt::get(Ty, -1ULL); + llvm::Value *NegOne = llvm::Constant::getAllOnesValue(Ty); llvm::Value *LHSCmp = Builder.CreateICmpNE(Ops.LHS, IntMin); llvm::Value *RHSCmp = Builder.CreateICmpNE(Ops.RHS, NegOne); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits