1 ; RUN: opt -S -instcombine < %s | FileCheck %s
3 define float @test1(float %x) nounwind readnone ssp {
4 %div = fdiv float %x, 0x3810000000000000
8 ; CHECK-NEXT: fmul float %x, 0x47D0000000000000
11 define float @test2(float %x) nounwind readnone ssp {
12 %div = fdiv float %x, 0x47E0000000000000
15 ; CHECK-LABEL: @test2(
16 ; CHECK-NEXT: fdiv float %x, 0x47E0000000000000
19 define float @test3(float %x) nounwind readnone ssp {
20 %div = fdiv float %x, 0x36A0000000000000
23 ; CHECK-LABEL: @test3(
24 ; CHECK-NEXT: fdiv float %x, 0x36A0000000000000
27 define float @test4(float %x) nounwind readnone ssp {
28 %div = fdiv fast float %x, 8.0
31 ; CHECK-LABEL: @test4(
32 ; CHECK-NEXT: fmul fast float %x, 1.250000e-01
35 define float @test5(float %x, float %y, float %z) nounwind readnone ssp {
36 %div1 = fdiv fast float %x, %y
37 %div2 = fdiv fast float %div1, %z
39 ; CHECK-LABEL: @test5(
40 ; CHECK-NEXT: fmul fast
41 ; CHECK-NEXT: fdiv fast
44 define float @test6(float %x, float %y, float %z) nounwind readnone ssp {
45 %div1 = fdiv fast float %x, %y
46 %div2 = fdiv fast float %z, %div1
48 ; CHECK-LABEL: @test6(
49 ; CHECK-NEXT: fmul fast
50 ; CHECK-NEXT: fdiv fast