[llvm-bugs] [Bug 24523] New: [x86, SSE] high elements of vectors are not ignored as expected
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Aug 20 10:27:45 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24523
Bug ID: 24523
Summary: [x86, SSE] high elements of vectors are not ignored as
expected
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: spatel+llvm at rotateright.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Noticed in bug 24475: we're not eliminating meaningless ops on the higher
elements of vectors.
$ cat isnan.ll
define float @my_sse_isnan(float %f1) {
%v1 = insertelement <4 x float> undef, float %f1, i32 0
; this shouldn't affect anything; we only care about the low (scalar) element
%v2 = insertelement <4 x float> %v1, float 0.0, i32 1
%cmpss = tail call <4 x float> @llvm.x86.sse.cmp.ss(<4 x float> %v2, <4 x
float> %v2, i8 3)
%ext = extractelement <4 x float> %cmpss, i32 0
ret float %ext
}
$ ./llc -o - isnan.ll
...
xorps %xmm1, %xmm1
movss %xmm0, %xmm1 ## xmm1 = xmm0[0],xmm1[1,2,3]
cmpunordss %xmm1, %xmm1
movaps %xmm1, %xmm0
retq
I was expecting that to be reduced to:
cmpunordss %xmm0, %xmm0
retq
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150820/9254d62c/attachment.html>
More information about the llvm-bugs
mailing list