brintos

brintos / llvm-project-archived public Read only

0
0
Text · 852 B · cf9c1fb Raw
36 lines · plain
1; RUN: llc -mtriple=armv8-eabi -verify-machineinstrs %s -o /dev/null2 3; This test ensures that Loop Strength Reduction will4; not create an Add Reccurence Expression if not all5; its operands are loop invariants.6 7define void @add_rec_expr(i1 %arg) {8entry:9  br label %loop010 11loop0:12  %c.0 = phi i32 [ 0, %entry ], [ %inc.0, %loop0 ]13  %inc.0 = add nuw i32 %c.0, 114  br i1 %arg, label %loop0, label %bb115 16bb1:17  %mul.0 = mul i32 %c.0, %c.018  %gelptr.0 = getelementptr inbounds i16, ptr undef, i32 %mul.019  br label %loop120 21loop1:22  %inc.1 = phi i32 [ %inc.2, %bb4 ], [ 0, %bb1 ]23  %mul.1 = mul i32 %inc.1, %c.024  br label %bb325 26bb3:27  %add.0 = add i32 undef, %mul.128  %gelptr.1 = getelementptr inbounds i16, ptr %gelptr.0, i32 %add.029  store i16 undef, ptr %gelptr.1, align 230  br label %bb431 32bb4:33  %inc.2 = add nuw i32 %inc.1, 134  br label %loop135}36