| Issue |
209159
|
| Summary |
Loop vectorizer might be bypassing the scalar epilogue loop in -Os
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
eaeltsin
|
https://godbolt.org/z/8rsc79Mb7 - changing options from `-Os` to `-O2` makes the test pass.
Looks like the issue is there for at least 6 moths, I didn't backtrack further in the past.
### AI analysis
In the attached reproducer, the loop, which has 30 iterations, is vectorized with VF=4. The vectorized loop processes 28 elements (indices 0..27).
The compiler incorrectly generates control flow that bypasses the scalar epilogue loop if no NaNs are detected in the vectorized portion. If no NaNs are found, it jumps directly to the return block, completely skipping the scalar epilogue loop which should process the remaining 2 elements (indices 28 and 29).
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs