[llvm] [SLP]Convert compares from zexts, promoted to selects, to inversed op, if improves codegen (PR #181580)

Mikael Holmen via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 19 22:50:14 PST 2026


mikaelholmen wrote:

> > > > Heads-up that we see lots of runtime failures with this patch downstream so I suspect it's causing miscompiles in some way. Unfortunately I don't have any reproducers I can share at the moment but I'll see if I can manage to extract something.
> > > 
> > > 
> > > Please, send a reproducer, will try to address issues ASAP
> > 
> > 
> > I've extracted and reduced a C program now and I hope I didn't reduce so much that I broke the input. With `clang -O2 -Wall -fsanitize=undefined bbi-115289.c -o a.out && ./a.out` you get `Fail! faults: 2` with this patch. Without we get `Pass!` [bbi-115289.c](https://github.com/user-attachments/files/25415560/bbi-115289.c)
> > Also https://godbolt.org/z/s7cKGWeWx
> 
> Must be fixed in [38d8047](https://github.com/llvm/llvm-project/commit/38d804725fb0b353e474e4409fbd3926d4db6384)

Yes it fixes the exact problem instance I reported.
Unfortunately it does not fix all other runtime failure I see with this patch. :(



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


More information about the llvm-commits mailing list