[llvm-bugs] [Bug 39484] New: [X86] Shouldn't (U)COMISS/SD be commutable?
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Oct 29 09:16:50 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=39484
Bug ID: 39484
Summary: [X86] Shouldn't (U)COMISS/SD be commutable?
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: llvm-dev at redking.me.uk
CC: andrea.dibiagio at gmail.com, craig.topper at gmail.com,
llvm-bugs at lists.llvm.org, llvm-dev at redking.me.uk,
spatel+llvm at rotateright.com
https://godbolt.org/z/jjdScX
#include <x86intrin.h>
int comiss_ss(__m128 x, float *y) {
return _mm_comieq_ss(x, _mm_load_ss(y));
}
int comiss_ss_2(__m128 x, float *y) {
return _mm_comieq_ss(_mm_load_ss(y), x);
}
int comiss_ps(__m128 x, __m128 *y) {
return _mm_comieq_ss(x, *y);
}
int comiss_ps_2(__m128 x, __m128 *y) {
return _mm_comieq_ss(*y, x);
}
_Z9comiss_ssDv4_fPf: # @_Z9comiss_ssDv4_fPf
vcomiss (%rdi), %xmm0
setnp %al
sete %cl
andb %al, %cl
movzbl %cl, %eax
retq
_Z11comiss_ss_2Dv4_fPf: # @_Z11comiss_ss_2Dv4_fPf
vmovss (%rdi), %xmm1 # xmm1 = mem[0],zero,zero,zero
vcomiss %xmm0, %xmm1
setnp %al
sete %cl
andb %al, %cl
movzbl %cl, %eax
retq
_Z9comiss_psDv4_fPS_: # @_Z9comiss_psDv4_fPS_
vcomiss (%rdi), %xmm0
setnp %al
sete %cl
andb %al, %cl
movzbl %cl, %eax
retq
_Z11comiss_ps_2Dv4_fPS_: # @_Z11comiss_ps_2Dv4_fPS_
vmovaps (%rdi), %xmm1
vcomiss %xmm0, %xmm1
setnp %al
sete %cl
andb %al, %cl
movzbl %cl, %eax
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/20181029/f986afb3/attachment.html>
More information about the llvm-bugs
mailing list