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