1; RUN: opt -S -gvn-hoist < %s | FileCheck %s
2
3; Check that the call and fcmp are hoisted.
4; CHECK-LABEL: define void @fun(
5; CHECK: call float
6; CHECK: fcmp oeq
7; CHECK-NOT: call float
8; CHECK-NOT: fcmp oeq
9
10define void @fun(float %__b) minsize {
11entry:
12  br label %if.then
13
14if.then:                                          ; preds = %entry
15  br i1 undef, label %if.then8, label %lor.lhs.false
16
17lor.lhs.false:                                    ; preds = %if.then
18  %0 = call float @llvm.fabs.f32(float %__b) #2
19  %cmpinf7 = fcmp oeq float %0, 0x7FF0000000000000
20  unreachable
21
22if.then8:                                         ; preds = %if.then
23  %1 = call float @llvm.fabs.f32(float %__b) #2
24  %cmpinf10 = fcmp oeq float %1, 0x7FF0000000000000
25  ret void
26}
27
28declare float @llvm.fabs.f32(float)
29