[llvm] [SCCP] Don't allow undef ranges when performing operations (PR #93163)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu May 23 05:48:34 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 =
----------------
fhahn wrote:
Ah yes that makes sense, thanks!
https://github.com/llvm/llvm-project/pull/93163
More information about the llvm-commits
mailing list