1 ; RUN: opt -instcombine -S < %s | FileCheck %s
4 define float @foo1(float %a) #0 {
6 %b = fcmp ogt float %a, 0.000000e+00
7 %c = select i1 %b, float %a, float 0.000000e+00
8 %d = fcmp olt float %c, 1.000000e+00
9 %f = select i1 %d, float %c, float 1.000000e+00
14 define float @foo2(float %a) #0 {
16 %b = fcmp ogt float %a, 0.000000e+00
17 %c = select i1 %b, float %a, float 0.000000e+00
18 %d = fcmp olt float %c, 1.000000e+00
19 %e = select i1 %b, float %a, float 0.000000e+00
20 %f = select i1 %d, float %e, float 1.000000e+00
24 attributes #0 = { nounwind readnone ssp uwtable }