1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2 ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 | FileCheck %s 3 4 ; Check that a <4 x float> compare is generated and that we are 5 ; not stuck in an endless loop. 6 7 define void @cmp_2_floats() { 8 ; CHECK-LABEL: cmp_2_floats: 9 ; CHECK: # BB#0: # %entry 10 ; CHECK-NEXT: cmpordps %xmm0, %xmm0 11 ; CHECK-NEXT: pmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero 12 ; CHECK-NEXT: psllq $32, %xmm0 13 ; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,1,3,3] 14 ; CHECK-NEXT: psrad $31, %xmm0 15 ; CHECK-NEXT: pblendw {{.*#+}} xmm0 = xmm1[0,1],xmm0[2,3],xmm1[4,5],xmm0[6,7] 16 ; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3] 17 ; CHECK-NEXT: pslld $31, %xmm0 18 ; CHECK-NEXT: blendvps %xmm0, %xmm0 19 ; CHECK-NEXT: movlps %xmm0, (%rax) 20 ; CHECK-NEXT: retq 21 entry: 22 %0 = fcmp oeq <2 x float> undef, undef 23 %1 = select <2 x i1> %0, <2 x float> undef, <2 x float> undef 24 store <2 x float> %1, <2 x float>* undef 25 ret void 26 } 27 28 define void @cmp_2_doubles() { 29 ; CHECK-LABEL: cmp_2_doubles: 30 ; CHECK: # BB#0: # %entry 31 ; CHECK-NEXT: cmpordpd %xmm0, %xmm0 32 ; CHECK-NEXT: blendvpd %xmm0, %xmm0 33 ; CHECK-NEXT: movapd %xmm0, (%rax) 34 ; CHECK-NEXT: retq 35 entry: 36 %0 = fcmp oeq <2 x double> undef, undef 37 %1 = select <2 x i1> %0, <2 x double> undef, <2 x double> undef 38 store <2 x double> %1, <2 x double>* undef 39 ret void 40 } 41 42 define void @mp_11193(<8 x float> * nocapture %aFOO, <8 x float>* nocapture %RET) nounwind { 43 ; CHECK-LABEL: mp_11193: 44 ; CHECK: # BB#0: # %allocas 45 ; CHECK-NEXT: movl $-1082130432, (%rsi) # imm = 0xBF800000 46 ; CHECK-NEXT: retq 47 allocas: 48 %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> 49 %t = extractelement <8 x i1> %bincmp, i32 0 50 %ft = sitofp i1 %t to float 51 %pp = bitcast <8 x float>* %RET to float* 52 store float %ft, float* %pp 53 ret void 54 } 55 56