| Issue |
55416
|
| Summary |
Metadata incorrectly moved during "split block predecessor"
|
| Labels |
loopoptim
|
| Assignees |
|
| Reporter |
hgreving2304
|
[loop.ll.txt](https://github.com/llvm/llvm-project/files/8683047/loop.ll.txt)
[cfg.dot.txt](https://github.com/llvm/llvm-project/files/8683048/cfg.dot.txt)
When compiling attached boiled down example of code
```
llc ~/loop.ll -o - -print-after-all
```
The loop simplify pass (Canonicalize natural loops (loop-simplify)) IMO moves loop metadata incorrectly: The llvm.loop metadata attached to _bb6's terminator is moved to the new loop exit. I think the reason for this is that the loop exit is a header for another outer loop (see attached dotty graph). I think the loop metadata in this case should stay with the branch of the inner loop.
Error:
br i1 %cmp, label %_bb6, label %.loopexit, !llvm.loop !0
=> (after loop-simplify)
br i1 %cmp, label %_bb6, label %.loopexit.loopexit
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs