https://bugs.llvm.org/show_bug.cgi?id=50145
Bug ID: 50145
Summary: [InstructionCombiner (?)] WRONG CODE involving
@llvm.vector.reduce.xor
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Created attachment 24806
--> https://bugs.llvm.org/attachment.cgi?id=24806&action=edit
reduced testcase
The attached program should print '0' but currently it prints '119' on
SystemZ...
A bisect leads to 79b1b4a "[Vectorizers][TTI] remove option to bypass creation
of vector reduction intrinsics". The only difference in the IR after SLP is
then:
%rdx.shuf = shufflevector <4 x i8> %32, <4 x i8> poison, <4 x i32> <i32 2, i32
3, i32 undef, i32 undef>
%bin.rdx = xor <4 x i8> %32, %rdx.shuf
%rdx.shuf11 = shufflevector <4 x i8> %bin.rdx, <4 x i8> poison, <4 x i32> <i32
1, i32 undef, i32 undef, i32 undef>
%bin.rdx12 = xor <4 x i8> %bin.rdx, %rdx.shuf11
%47 = extractelement <4 x i8> %bin.rdx12, i32 0
<>
%47 = call i8 @llvm.vector.reduce.xor.v4i8(<4 x i8> %32)
This then later gets different treatment of InstCombiner. With the shuffles,
the store to @d dissapears, but with the intrinsic it seems some poison value
ends up being stored...
clang -march=z13 -O3 wrong0.i -o a.out -w ; ./a.out
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs