https://bugs.llvm.org/show_bug.cgi?id=48823
Bug ID: 48823
Summary: Compiler no longer producing hsub instruction after
upstream commit be69e66b1cd8
Product: new-bugs
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedb...@nondot.org
Reporter: douglas_y...@playstation.sony.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org
After commit be69e66b1cd8, one of our internal tests is no longer generating a
horizontal subtraction instruction for the following code:
__attribute__((noinline))
__m128 sub_ps_004(__m128 a, __m128 b) {
__m128 r = (__m128){ a[0] - a[1], a[2] - a[3], b[0] - b[1], b[2] - b[3] };
return __builtin_shufflevector(r, a, 0, -1, -1, 3);
}
When compiling with a compiler targeting the PS4 (x86_64-scei-ps4), the
comipler previously generated this code for the function:
(clang -S -O2 --target=x86_64-scei-ps4)
vhsubps %xmm1, %xmm0, %xmm0
However after the change above, the compiler now generates the following code:
vshufps $229, %xmm1, %xmm0, %xmm2 # xmm2 = xmm0[1,1],xmm1[2,3]
vshufps $164, %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0,1],xmm1[2,2]
vsubps %xmm2, %xmm0, %xmm0
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs