[llvm-branch-commits] [llvm] ValueTracking: Use SimplifyQuery for computeConstantRange (PR #191726)

Yingwei Zheng via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Apr 12 09:29:34 PDT 2026


================
@@ -1739,8 +1739,9 @@ static void addNoUndefAttrs(const SCCNodeSet &SCCNodes,
 
             Attribute Attr = Attrs.getRetAttr(Attribute::Range);
             if (Attr.isValid() &&
-                !Attr.getRange().contains(
-                    computeConstantRange(RetVal, /*ForSigned=*/false)))
+                !Attr.getRange().contains(computeConstantRange(
+                    RetVal, /*ForSigned=*/false,
+                    SimplifyQuery(F->getParent()->getDataLayout()))))
----------------
dtcxzyw wrote:

```suggestion
                    SimplifyQuery(F->getDataLayout()))))
```
Use `Function::getDataLayout`

https://github.com/llvm/llvm-project/pull/191726


More information about the llvm-branch-commits mailing list