| Issue |
115465
|
| Summary |
[InstCombine] folded select produces different result on a shuffled vector
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
bongjunj
|
Alive2 report: https://alive2.llvm.org/ce/z/73v-ug
```llvm
----------------------------------------
define <4 x i8> @sel_shuf_commute3.2(<4 x i8> %x, <4 x i8> %y, i1 %cmp) {
#0:
%blend = shufflevector <4 x i8> { 0, 0, 0, 0 }, <4 x i8> %y, 0, 5, 2, 3
%r = select i1 %cmp, <4 x i8> %y, <4 x i8> %blend
%#1 = select <4 x i1> { 0, 1, 0, 1 }, <4 x i8> { 0, 1, 2, 3 }, <4 x i8> %r
ret <4 x i8> %#1
}
=>
define <4 x i8> @sel_shuf_commute3.2(<4 x i8> %x, <4 x i8> %y, i1 %cmp) {
#0:
%#1 = shufflevector <4 x i8> %y, <4 x i8> { poison, 1, poison, 3 }, 0, 5, 2, 7
%#2 = select i1 %cmp, <4 x i8> %#1, <4 x i8> { 0, 1, 0, 3 }
ret <4 x i8> %#2
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source
Example:
<4 x i8> %x = < poison, poison, poison, poison >
<4 x i8> %y = < poison, poison, poison, poison >
i1 %cmp = poison
Source:
<4 x i8> %blend = < #x00 (0), poison, #x00 (0), #x00 (0) >
<4 x i8> %r = < poison, poison, poison, poison >
<4 x i8> %#1 = < poison, #x01 (1), poison, #x03 (3) >
Target:
<4 x i8> %#1 = < poison, #x01 (1), poison, #x03 (3) >
<4 x i8> %#2 = < poison, poison, poison, poison >
Source value: < poison, #x01 (1), poison, #x03 (3) >
Target value: < poison, poison, poison, poison >
Summary:
0 correct transformations
1 incorrect transformations
0 failed-to-prove transformations
0 Alive2 errors
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs