Issue |
91957
|
Summary |
Miscompile with opt -passes="loop-unroll,loop-mssa(licm,indvars)" -unroll-count=4
|
Labels |
new issue
|
Assignees |
|
Reporter |
mikaelholmen
|
llvm commit: e76b257483e6c
Reproduce with:
```opt -passes="loop-unroll,loop-mssa(licm,indvars)" -unroll-count=4 bbi-95405.ll -S -o -```
The input function returns 32768, but after running the passes as above we get
```
define i16 @foo() {
entry:
br label %loop
loop: ; preds = %loop, %entry
br i1 false, label %loop, label %end, !llvm.loop !0
end: ; preds = %loop
ret i16 8192
}
!0 = distinct !{!0, !1}
!1 = !{!"llvm.loop.unroll.disable"}
```
So now the function returns 8192 instead.
If I extract the IR after loop-unroll or licm and run the rest of the passes instead I get the correct result.
[bbi-95405.ll.gz](https://github.com/llvm/llvm-project/files/15294896/bbi-95405.ll.gz)
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs