1 ; RUN: opt < %s -instcombine -S | not grep fpext
2 @X = external global float
3 @Y = external global float
5 define void @test() nounwind {
7 %tmp = load float* @X, align 4 ; <float> [#uses=1]
8 %tmp1 = fpext float %tmp to double ; <double> [#uses=1]
9 %tmp3 = fadd double %tmp1, 0.000000e+00 ; <double> [#uses=1]
10 %tmp34 = fptrunc double %tmp3 to float ; <float> [#uses=1]
11 store float %tmp34, float* @X, align 4
15 define void @test3() nounwind {
17 %tmp = load float* @X, align 4 ; <float> [#uses=1]
18 %tmp1 = fpext float %tmp to double ; <double> [#uses=1]
19 %tmp2 = load float* @Y, align 4 ; <float> [#uses=1]
20 %tmp23 = fpext float %tmp2 to double ; <double> [#uses=1]
21 %tmp5 = fdiv double %tmp1, %tmp23 ; <double> [#uses=1]
22 %tmp56 = fptrunc double %tmp5 to float ; <float> [#uses=1]
23 store float %tmp56, float* @X, align 4
27 define void @test4() nounwind {
29 %tmp = load float* @X, align 4 ; <float> [#uses=1]
30 %tmp1 = fpext float %tmp to double ; <double> [#uses=1]
31 %tmp2 = fsub double -0.000000e+00, %tmp1 ; <double> [#uses=1]
32 %tmp34 = fptrunc double %tmp2 to float ; <float> [#uses=1]
33 store float %tmp34, float* @X, align 4