1 ; RUN: opt < %s -function-attrs -S | FileCheck %s
2 ; RUN: opt < %s -passes=function-attrs -S | FileCheck %s
4 ; CHECK: define i32 @test1(i32 %p, i32 %q)
5 define i32 @test1(i32 %p, i32 %q) {
7 %cmp = icmp sgt i32 %p, %q
8 br i1 %cmp, label %cond.end, label %lor.lhs.false
10 lor.lhs.false: ; preds = %entry
11 %tobool = icmp ne i32 %p, 0
12 %tobool1 = icmp ne i32 %q, 0
13 %or.cond = and i1 %tobool, %tobool1
14 %p.q = select i1 %or.cond, i32 %p, i32 %q
17 cond.end: ; preds = %entry
21 ; CHECK: define i32 @test2(i32 %p1, i32 returned %p2)
22 define i32 @test2(i32 %p1, i32 returned %p2) {
23 %_tmp4 = icmp eq i32 %p1, %p2
24 br i1 %_tmp4, label %bb2, label %bb1
29 bb1: ; preds = %bb1, %0