• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=i686-unknown | FileCheck %s --check-prefix=X86
3; RUN: llc < %s -mtriple=i686-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X86-SSE
4; RUN: llc < %s -mtriple=x86_64-unknown | FileCheck %s --check-prefix=X64
5
6define i1 @foo(i64 %a) {
7; X86-LABEL: foo:
8; X86:       # %bb.0:
9; X86-NEXT:    flds {{[0-9]+}}(%esp)
10; X86-NEXT:    flds {{[0-9]+}}(%esp)
11; X86-NEXT:    fucompp
12; X86-NEXT:    fnstsw %ax
13; X86-NEXT:    # kill: def $ah killed $ah killed $ax
14; X86-NEXT:    sahf
15; X86-NEXT:    setp %al
16; X86-NEXT:    retl
17;
18; X86-SSE-LABEL: foo:
19; X86-SSE:       # %bb.0:
20; X86-SSE-NEXT:    movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
21; X86-SSE-NEXT:    ucomiss {{[0-9]+}}(%esp), %xmm0
22; X86-SSE-NEXT:    setp %al
23; X86-SSE-NEXT:    retl
24;
25; X64-LABEL: foo:
26; X64:       # %bb.0:
27; X64-NEXT:    movq %rdi, %xmm0
28; X64-NEXT:    pshufd {{.*#+}} xmm1 = xmm0[1,1,2,3]
29; X64-NEXT:    ucomiss %xmm1, %xmm0
30; X64-NEXT:    setp %al
31; X64-NEXT:    retq
32  %t = bitcast i64 %a to <2 x float>
33  %r = extractelement <2 x float> %t, i32 0
34  %s = extractelement <2 x float> %t, i32 1
35  %b = fcmp uno float %r, %s
36  ret i1 %b
37}
38