1; RUN: opt < %s -instcombine -S | FileCheck %s
2
3; InstCombine should preserve the call to @llvm.assume.
4define i32 @icmp(i32 %a, i32 %b) {
5; CHECK-LABEL: @icmp(
6  %sum = add i32 %a, %b
7  %1 = icmp sge i32 %sum, 0
8  call void @llvm.assume(i1 %1)
9; CHECK: call void @llvm.assume
10  ret i32 %sum
11}
12
13define float @fcmp(float %a, float %b) {
14; CHECK-LABEL: @fcmp(
15  %sum = fadd float %a, %b
16  %1 = fcmp oge float %sum, 0.0
17  call void @llvm.assume(i1 %1)
18; CHECK: call void @llvm.assume
19  ret float %sum
20}
21
22declare void @llvm.assume(i1)
23