Files
llvm-project/llvm/lib/Transforms/Utils/LoopConstrainer.cpp
Aleksandr Popov f76417d21e [IRCE] Prove predicates with and without loop-guarded SCEVs (#174843)
IRCE may fail to prove predicates when loop bounds are rewritten by
LoopConstrainer::applyLoopGuards(). In such cases, simple predicates
(e.g. %start < %limit) become obscured by strengthened SCEV expressions,
even though they are trivially implied by the guard in the loop
preheader.

See: https://github.com/llvm/llvm-project/issues/167827

This change makes IRCE attempt to prove predicates both on the original
SCEVs and on the guarded SCEVs, preventing incorrect rejection of loops
with safe bounds.
2026-01-08 15:16:55 +01:00

36 KiB