[llvm] [SLP]Improve minbitwidth analysis for operands of IToFP and ICmp instructions. (PR #85966)

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 22 07:07:27 PDT 2024


mikaelholmen wrote:

Hi @alexey-bataev 

I've bisected a miscompile back to this patch.
Reproduce with
```
opt -passes=slp-vectorizer bbi-94784.ll -S -o - -mtriple=aarch64 -slp-threshold=-10 -slp-vectorize-hor=0
```
[bbi-94784.ll.gz](https://github.com/llvm/llvm-project/files/15064102/bbi-94784.ll.gz)

For input %in1=0x3 and %in2=ffff the input function returns 0, but after slp-vectorizer with this patch is returns 2.
I think the problem is that after vectorization the "mul" operates on i16 values but it should really be on i64 otherwise the compares with 196605 will go wrong.


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


More information about the llvm-commits mailing list