blob: 87e77945dfb80476b00a4e7563c5f0651b0455c1 [file] [log] [blame]
Aditya Nandakumar12d06042016-01-04 19:48:14 +00001; RUN: opt -S -reassociate < %s | FileCheck %s
2
3; CHECK-LABEL: main
4; CHECK: %2 = fsub
5; CHECK: %3 = fsub
6; CHECK: fadd fast float %3, %2
7define void @main(float, float) {
8wrapper_entry:
9 %2 = fsub float undef, %0
10 %3 = fsub float undef, %1
11 %4 = call float @llvm.rsqrt.f32(float undef)
12 %5 = fmul fast float undef, %4
13 %6 = fmul fast float %2, %4
14 %7 = fmul fast float %3, %4
15 %8 = fmul fast float %5, undef
16 %9 = fmul fast float %6, undef
17 %10 = fmul fast float %7, undef
18 %11 = fadd fast float %8, %9
19 %12 = fadd fast float %11, %10
20 %13 = call float @foo2(float %12, float 0.000000e+00)
21 %mul36 = fmul fast float %13, 1.500000e+00
22 call void @foo1(i32 4, float %mul36)
23 ret void
24}
25
26declare void @foo1(i32, float)
27
28declare float @foo2(float, float) #1
29
30declare float @llvm.rsqrt.f32(float) #1
31
32attributes #0 = { argmemonly nounwind }
33attributes #1 = { nounwind readnone }
34