[llvm] [SCCP] Don't allow undef ranges when performing operations (PR #93163)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu May 23 04:19:17 PDT 2024
================
@@ -1534,8 +1535,10 @@ void SCCPInstVisitor::visitBinaryOperator(Instruction &I) {
return markOverdefined(&I);
// Try to simplify to a constant range.
- ConstantRange A = getConstantRange(V1State, I.getType());
- ConstantRange B = getConstantRange(V2State, I.getType());
+ ConstantRange A =
+ getConstantRange(V1State, I.getType(), /*UndefAllowed=*/false);
+ ConstantRange B =
----------------
nikic wrote:
For the record, this was my initial patch: https://github.com/nikic/llvm-project/commit/94ed59e6db259a852c7e74cfa60d7f927fd0abc0
https://github.com/llvm/llvm-project/pull/93163
More information about the llvm-commits
mailing list