Files
clang-p2996/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
Florian Hahn b060661da8 [SCEVExpander] Expand UDiv avoiding UB when in seq_min/max. (#92177)
Update SCEVExpander to introduce an SafeUDivMode, which is set
when expanding operands of SCEVSequentialMinMaxExpr. In this mode,
the expander will make sure that the divisor of the expanded UDiv is
neither 0 nor poison.

Fixes https://github.com/llvm/llvm-project/issues/89958.


PR https://github.com/llvm/llvm-project/pull/92177
2024-10-17 13:55:20 -07:00

92 KiB