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(<2 x float> %a, <2 x float> %b) { 8 ; CHECK-LABEL: cmp_2_floats: 9 ; CHECK: # %bb.0: # %entry 10 ; CHECK-NEXT: movaps %xmm0, %xmm2 11 ; CHECK-NEXT: cmpordps %xmm0, %xmm0 12 ; CHECK-NEXT: blendvps %xmm0, %xmm2, %xmm1 13 ; CHECK-NEXT: movlps %xmm1, (%rax) 14 ; CHECK-NEXT: retq 15 entry: 16 %0 = fcmp oeq <2 x float> undef, undef 17 %1 = select <2 x i1> %0, <2 x float> %a, <2 x float> %b 18 store <2 x float> %1, <2 x float>* undef 19 ret void 20 } 21 22 define void @cmp_2_doubles(<2 x double> %a, <2 x double> %b) { 23 ; CHECK-LABEL: cmp_2_doubles: 24 ; CHECK: # %bb.0: # %entry 25 ; CHECK-NEXT: movapd %xmm0, %xmm2 26 ; CHECK-NEXT: cmpordpd %xmm0, %xmm0 27 ; CHECK-NEXT: blendvpd %xmm0, %xmm2, %xmm1 28 ; CHECK-NEXT: movapd %xmm1, (%rax) 29 ; CHECK-NEXT: retq 30 entry: 31 %0 = fcmp oeq <2 x double> undef, undef 32 %1 = select <2 x i1> %0, <2 x double> %a, <2 x double> %b 33 store <2 x double> %1, <2 x double>* undef 34 ret void 35 } 36 37 define void @mp_11193(<8 x float> * nocapture %aFOO, <8 x float>* nocapture %RET) nounwind { 38 ; CHECK-LABEL: mp_11193: 39 ; CHECK: # %bb.0: # %allocas 40 ; CHECK-NEXT: movl $-1082130432, (%rsi) # imm = 0xBF800000 41 ; CHECK-NEXT: retq 42 allocas: 43 %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> 44 %t = extractelement <8 x i1> %bincmp, i32 0 45 %ft = sitofp i1 %t to float 46 %pp = bitcast <8 x float>* %RET to float* 47 store float %ft, float* %pp 48 ret void 49 } 50 51