1 ; RUN: llc -verify-machineinstrs -mcpu=ppc64 < %s | FileCheck %s
2 target datalayout = "E-m:e-i64:64-n32:64"
3 target triple = "powerpc64-unknown-linux-gnu"
5 ; Following test case checks:
8 ; recip = 1.0 / D; a * recip; b * recip; c * recip;
10 define void @three_fdiv_double(double %D, double %a, double %b, double %c) #0 {
11 ; CHECK-LABEL: three_fdiv_double:
12 ; CHECK: fdiv {{[0-9]}}
17 %div = fdiv double %a, %D
18 %div1 = fdiv double %b, %D
19 %div2 = fdiv double %c, %D
20 tail call void @foo_3d(double %div, double %div1, double %div2)
24 define void @two_fdiv_double(double %D, double %a, double %b) #0 {
25 ; CHECK-LABEL: two_fdiv_double:
26 ; CHECK: fdiv {{[0-9]}}
27 ; CHECK: fdiv {{[0-9]}}
29 %div = fdiv double %a, %D
30 %div1 = fdiv double %b, %D
31 tail call void @foo_2d(double %div, double %div1)
35 declare void @foo_3d(double, double, double)
36 declare void @foo_3_2xd(<2 x double>, <2 x double>, <2 x double>)
37 declare void @foo_2d(double, double)
39 attributes #0 = { "unsafe-fp-math"="true" }