[llvm-objdump/MachoDump] Make code much more concise.
[oota-llvm.git] / test / Transforms / InstCombine / pr23809.ll
1 ; RUN: opt < %s -instcombine -S | FileCheck %s
2
3 ; InstCombine should preserve the call to @llvm.assume.
4 define 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
13 define 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
22 declare void @llvm.assume(i1)