brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 071bc17 Raw
76 lines · plain
1; RUN: opt -passes='early-cse<memssa>,loop-mssa(loop-rotate,licm,loop-rotate)' -earlycse-debug-hash -S %s -o - | FileCheck %s2; ModuleID = 'bugpoint-reduced-simplified.bc'3source_filename = "bugpoint-output-8903f29.bc"4target datalayout = "e-m:e-i64:64-n32:64"5target triple = "powerpc64le-unknown-linux-gnu"6 7define void @test(i64 %arg.ssa, i64 %arg.nb) local_unnamed_addr {8; Ensure that loop rotation doesn't duplicate the call to9; llvm.loop.decrement10; CHECK-LABEL: test11; CHECK: call i1 @llvm.loop.decrement12; CHECK-NOT: call i1 @llvm.loop.decrement13; CHECK: declare i1 @llvm.loop.decrement14entry:15  switch i32 undef, label %BB_8 [16    i32 -2, label %BB_917    i32 0, label %BB_918  ]19 20BB_1:                                    ; preds = %BB_12, %BB_421  %bcount.1.us = phi i64 [ %.810.us, %BB_4 ], [ 0, %BB_12 ]22  %0 = add i64 %arg.ssa, %bcount.1.us23  %.568.us = load i32, ptr undef, align 424  %.15.i.us = icmp slt i32 0, %.568.us25  br i1 %.15.i.us, label %BB_3, label %BB_226 27BB_2:                                          ; preds = %BB_128  %.982.us = add nsw i64 %0, 129  unreachable30 31BB_3:                                          ; preds = %BB_132  %1 = add i64 %arg.ssa, %bcount.1.us33  %2 = add i64 %1, 134  %3 = call i1 @llvm.loop.decrement.i32(i32 1)35  br i1 %3, label %BB_4, label %BB_736 37BB_4:                                          ; preds = %BB_338  %.810.us = add nuw nsw i64 %bcount.1.us, 139  br label %BB_140 41BB_5:                                         ; preds = %BB_7, %BB_542  %lsr.iv20.i116 = phi i64 [ %2, %BB_7 ], [ %lsr.iv.next21.i126, %BB_5 ]43  %lsr.iv.next21.i126 = add i64 %lsr.iv20.i116, 144  br i1 undef, label %BB_5, label %BB_645 46BB_6:                                         ; preds = %BB_547  ret void48 49BB_7:                                     ; preds = %BB_350  br label %BB_551 52BB_8:                                           ; preds = %entry53  ret void54 55BB_9:                                        ; preds = %entry, %entry56  br label %BB_1057 58BB_10:                               ; preds = %BB_959  br label %BB_1160 61BB_11:                                         ; preds = %BB_11, %BB_1062  br i1 undef, label %BB_11, label %BB_1263 64BB_12:                                         ; preds = %BB_1165  call void @llvm.set.loop.iterations.i64(i64 %arg.nb)66  br label %BB_167}68 69; Function Attrs: nounwind70declare void @llvm.set.loop.iterations.i64(i64) #071 72; Function Attrs: nounwind73declare i1 @llvm.loop.decrement.i32(i32) #074 75attributes #0 = { nounwind }76