1 ; RUN: opt < %s -instcombine -S | FileCheck %s
3 ; testing-case "float fold(float a) { return 1.2f * a * 2.3f; }"
4 ; 1.2f and 2.3f is supposed to be fold.
5 define float @fold(float %a) {
7 %mul = fmul fast float %a, 0x3FF3333340000000
8 %mul1 = fmul fast float %mul, 0x4002666660000000
11 ; CHECK: fmul float %a, 0x4006147AE0000000
14 ; Same testing-case as the one used in fold() except that the operators have
16 define float @notfold(float %a) {
19 ; CHECK: %mul = fmul fast float %a, 0x3FF3333340000000
20 %mul = fmul fast float %a, 0x3FF3333340000000
21 %mul1 = fmul float %mul, 0x4002666660000000
25 define float @fold2(float %a) {
28 ; CHECK: fmul float %a, 0x4006147AE0000000
29 %mul = fmul float %a, 0x3FF3333340000000
30 %mul1 = fmul fast float %mul, 0x4002666660000000