2015-11-24 05:33:58 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2015-11-15 04:42:01 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 | FileCheck %s
|
2011-10-21 19:42:07 +08:00
|
|
|
|
|
|
|
; Check that a <4 x float> compare is generated and that we are
|
|
|
|
; not stuck in an endless loop.
|
|
|
|
|
2016-11-25 05:48:50 +08:00
|
|
|
define void @cmp_2_floats(<2 x float> %a, <2 x float> %b) {
|
2015-11-15 04:42:01 +08:00
|
|
|
; CHECK-LABEL: cmp_2_floats:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: # %bb.0: # %entry
|
2016-11-25 05:48:50 +08:00
|
|
|
; CHECK-NEXT: movaps %xmm0, %xmm2
|
2015-11-15 04:42:01 +08:00
|
|
|
; CHECK-NEXT: cmpordps %xmm0, %xmm0
|
2017-02-06 02:33:24 +08:00
|
|
|
; CHECK-NEXT: blendvps %xmm0, %xmm2, %xmm1
|
2016-11-25 05:48:50 +08:00
|
|
|
; CHECK-NEXT: movlps %xmm1, (%rax)
|
2015-11-15 04:42:01 +08:00
|
|
|
; CHECK-NEXT: retq
|
2011-10-21 19:42:07 +08:00
|
|
|
entry:
|
|
|
|
%0 = fcmp oeq <2 x float> undef, undef
|
2016-11-25 05:48:50 +08:00
|
|
|
%1 = select <2 x i1> %0, <2 x float> %a, <2 x float> %b
|
2011-10-21 19:42:07 +08:00
|
|
|
store <2 x float> %1, <2 x float>* undef
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2016-11-25 05:48:50 +08:00
|
|
|
define void @cmp_2_doubles(<2 x double> %a, <2 x double> %b) {
|
2015-11-15 04:42:01 +08:00
|
|
|
; CHECK-LABEL: cmp_2_doubles:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: # %bb.0: # %entry
|
2016-11-29 01:58:19 +08:00
|
|
|
; CHECK-NEXT: movapd %xmm0, %xmm2
|
2015-11-15 04:42:01 +08:00
|
|
|
; CHECK-NEXT: cmpordpd %xmm0, %xmm0
|
2017-02-06 02:33:24 +08:00
|
|
|
; CHECK-NEXT: blendvpd %xmm0, %xmm2, %xmm1
|
2016-11-25 05:48:50 +08:00
|
|
|
; CHECK-NEXT: movapd %xmm1, (%rax)
|
2015-11-15 04:42:01 +08:00
|
|
|
; CHECK-NEXT: retq
|
2011-10-21 19:42:07 +08:00
|
|
|
entry:
|
|
|
|
%0 = fcmp oeq <2 x double> undef, undef
|
2016-11-25 05:48:50 +08:00
|
|
|
%1 = select <2 x i1> %0, <2 x double> %a, <2 x double> %b
|
2011-10-21 19:42:07 +08:00
|
|
|
store <2 x double> %1, <2 x double>* undef
|
|
|
|
ret void
|
|
|
|
}
|
2011-10-22 20:39:25 +08:00
|
|
|
|
2015-11-15 04:42:01 +08:00
|
|
|
define void @mp_11193(<8 x float> * nocapture %aFOO, <8 x float>* nocapture %RET) nounwind {
|
|
|
|
; CHECK-LABEL: mp_11193:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: # %bb.0: # %allocas
|
2016-05-28 22:58:37 +08:00
|
|
|
; CHECK-NEXT: movl $-1082130432, (%rsi) # imm = 0xBF800000
|
2015-11-15 04:42:01 +08:00
|
|
|
; CHECK-NEXT: retq
|
2011-10-22 20:39:25 +08:00
|
|
|
allocas:
|
|
|
|
%bincmp = fcmp olt <8 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 9.000000e+00, float 1.000000e+00, float 9.000000e+00, float 1.000000e+00> , <float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00>
|
|
|
|
%t = extractelement <8 x i1> %bincmp, i32 0
|
|
|
|
%ft = sitofp i1 %t to float
|
|
|
|
%pp = bitcast <8 x float>* %RET to float*
|
|
|
|
store float %ft, float* %pp
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|