[llvm] [SCEV] Retain SCEVSequentialMinMaxExpr if an operand may trigger UB. (PR #110824)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 7 02:53:21 PDT 2024
================
@@ -511,8 +511,9 @@ class SCEVUMinExpr : public SCEVMinMaxExpr {
/// This node is the base class for sequential/in-order min/max selections.
/// Note that their fundamental difference from SCEVMinMaxExpr's is that they
/// are early-returning upon reaching saturation point.
-/// I.e. given `0 umin_seq poison`, the result will be `0`,
-/// while the result of `0 umin poison` is `poison`.
+/// I.e. given `0 umin_seq poison`, the result will be `0`, while the result of
+/// `0 umin poison` is `poison`. When returning early, later expressions are not
+/// executed.
----------------
nikic wrote:
```suggestion
/// executed, so `0 umin_seq (%x u/ 0)` does not result in undefined behavior.
```
https://github.com/llvm/llvm-project/pull/110824
More information about the llvm-commits
mailing list