Home | History | Annotate | Download | only in X86
      1 ; RUN: llc -march=x86-64 -mattr=-fma4 -mtriple=x86_64-apple-darwin -enable-unsafe-fp-math < %s | FileCheck %s
      2 
      3 ; CHECK: test1
      4 define float @test1(float %a) {
      5 ; CHECK-NOT: addss
      6 ; CHECK: mulss
      7 ; CHECK-NOT: addss
      8 ; CHECK: ret
      9   %t1 = fadd float %a, %a
     10   %r = fadd float %t1, %t1
     11   ret float %r
     12 }
     13 
     14 ; CHECK: test2
     15 define float @test2(float %a) {
     16 ; CHECK-NOT: addss
     17 ; CHECK: mulss
     18 ; CHECK-NOT: addss
     19 ; CHECK: ret
     20   %t1 = fmul float 4.0, %a
     21   %t2 = fadd float %a, %a
     22   %r = fadd float %t1, %t2
     23   ret float %r
     24 }
     25 
     26 ; CHECK: test3
     27 define float @test3(float %a) {
     28 ; CHECK-NOT: addss
     29 ; CHECK: xorps
     30 ; CHECK-NOT: addss
     31 ; CHECK: ret
     32   %t1 = fmul float 2.0, %a
     33   %t2 = fadd float %a, %a
     34   %r = fsub float %t1, %t2
     35   ret float %r
     36 }
     37 
     38