[llvm] [InstCombine] Make backedge check in op of phi transform more precise (PR #106075)

Mikael Holmén via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 00:01:45 PDT 2024


mikaelholmen wrote:

No idea if this patch just exposes an already existing problem or what, but the following starts failing with this patch:
```
opt -verify-scev -passes="inline,function(early-cse<memssa>,jump-threading,instcombine,constraint-elimination,loop-mssa(licm,simple-loop-unswitch))" bbi-99125.ll -o /dev/null
```
Result:
```
Trip Count for Loop at depth 1 containing: %for.cond<header><exiting>,%for.body,%for.cond25.i<exiting>,%func_32.exit.i,%func_7.exit<latch>
    Loop at depth 2 containing: %for.cond25.i<header><exiting>,%func_32.exit.i<latch><exiting>
 Changed!
Old: 6
New: 0
Delta: 6
```
[bbi-99125.ll.gz](https://github.com/user-attachments/files/16989748/bbi-99125.ll.gz)


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


More information about the llvm-commits mailing list