1; RUN: llc -verify-machineinstrs -mcpu=ppc64 < %s | FileCheck %s 2target datalayout = "E-m:e-i64:64-n32:64" 3target triple = "powerpc64-unknown-linux-gnu" 4 5; Following test case checks: 6; a / D; b / D; c / D; 7; => 8; recip = 1.0 / D; a * recip; b * recip; c * recip; 9 10define void @three_fdiv_double(double %D, double %a, double %b, double %c) #0 { 11; CHECK-LABEL: three_fdiv_double: 12; CHECK: fdiv {{[0-9]}} 13; CHECK-NOT: fdiv 14; CHECK: fmul 15; CHECK: fmul 16; CHECK: fmul 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) 21 ret void 22} 23 24define 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]}} 28; CHECK-NOT: fmul 29 %div = fdiv double %a, %D 30 %div1 = fdiv double %b, %D 31 tail call void @foo_2d(double %div, double %div1) 32 ret void 33} 34 35declare void @foo_3d(double, double, double) 36declare void @foo_3_2xd(<2 x double>, <2 x double>, <2 x double>) 37declare void @foo_2d(double, double) 38 39attributes #0 = { "unsafe-fp-math"="true" } 40