brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · ce71ffa Raw
51 lines · plain
1; RUN: opt < %s -passes='function(loop-simplify),loop-extract'  -S | FileCheck %s2 3@choum.addr = internal unnamed_addr constant [3 x ptr] [ptr blockaddress(@choum, %bb10), ptr blockaddress(@choum, %bb14), ptr blockaddress(@choum, %bb18)]4 5; CHECK: define6; no outlined function7; CHECK-NOT: define8 9define void @choum(i32 %arg, ptr nocapture %arg1, i32 %arg2) {10bb:11  %tmp = icmp sgt i32 %arg, 012  br i1 %tmp, label %bb3, label %bb2413 14bb3:                                              ; preds = %bb15  %tmp4 = sext i32 %arg2 to i6416  %tmp5 = getelementptr inbounds [3 x ptr], ptr @choum.addr, i64 0, i64 %tmp417  %tmp6 = load ptr, ptr %tmp518  %tmp7 = zext i32 %arg to i6419  br label %bb820 21bb8:                                              ; preds = %bb18, %bb322  %tmp9 = phi i64 [ 0, %bb3 ], [ %tmp22, %bb18 ]23  indirectbr ptr %tmp6, [label %bb10, label %bb14, label %bb18]24 25bb10:                                             ; preds = %bb826  %tmp11 = getelementptr inbounds i32, ptr %arg1, i64 %tmp927  %tmp12 = load i32, ptr %tmp1128  %tmp13 = add nsw i32 %tmp12, 129  store i32 %tmp13, ptr %tmp1130  br label %bb1431 32bb14:                                             ; preds = %bb10, %bb833  %tmp15 = getelementptr inbounds i32, ptr %arg1, i64 %tmp934  %tmp16 = load i32, ptr %tmp1535  %tmp17 = shl nsw i32 %tmp16, 136  store i32 %tmp17, ptr %tmp1537  br label %bb1838 39bb18:                                             ; preds = %bb14, %bb840  %tmp19 = getelementptr inbounds i32, ptr %arg1, i64 %tmp941  %tmp20 = load i32, ptr %tmp1942  %tmp21 = add nsw i32 %tmp20, -343  store i32 %tmp21, ptr %tmp1944  %tmp22 = add nuw nsw i64 %tmp9, 145  %tmp23 = icmp eq i64 %tmp22, %tmp746  br i1 %tmp23, label %bb24, label %bb847 48bb24:                                             ; preds = %bb18, %bb49  ret void50}51