brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.4 KiB · 9871485 Raw
96 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes='hardware-loops<force-hardware-loops;hardware-loop-decrement=1;hardware-loop-counter-bitwidth=32>' -S | FileCheck %s3 4define arm_aapcs_vfpcc void @test(ptr noalias nocapture readonly %off, ptr noalias nocapture %data, ptr noalias nocapture %dst, i32 %n) {5; CHECK-LABEL: @test(6; CHECK-NEXT:  entry:7; CHECK-NEXT:    [[CMP252:%.*]] = icmp sgt i32 [[N:%.*]], 08; CHECK-NEXT:    br i1 [[CMP252]], label [[FOR_COND1_PREHEADER_US:%.*]], label [[FOR_COND_CLEANUP:%.*]]9; CHECK:       for.cond1.preheader.us:10; CHECK-NEXT:    [[I_057_US:%.*]] = phi i32 [ [[INC29_US:%.*]], [[FOR_COND_CLEANUP14_US:%.*]] ], [ 0, [[ENTRY:%.*]] ]11; CHECK-NEXT:    [[MUL_US:%.*]] = mul i32 [[I_057_US]], [[N]]12; CHECK-NEXT:    call void @llvm.set.loop.iterations.i32(i32 [[N]])13; CHECK-NEXT:    br label [[FOR_BODY4_US:%.*]]14; CHECK:       for.body4.us:15; CHECK-NEXT:    [[J_053_US:%.*]] = phi i32 [ 0, [[FOR_COND1_PREHEADER_US]] ], [ [[INC_US:%.*]], [[FOR_BODY4_US]] ]16; CHECK-NEXT:    [[ARRAYIDX_US:%.*]] = getelementptr inbounds i16, ptr [[OFF:%.*]], i32 [[J_053_US]]17; CHECK-NEXT:    [[L2:%.*]] = load i16, ptr [[ARRAYIDX_US]], align 218; CHECK-NEXT:    [[ARRAYIDX5_US:%.*]] = getelementptr inbounds i16, ptr [[DATA:%.*]], i32 [[J_053_US]]19; CHECK-NEXT:    [[L3:%.*]] = load i16, ptr [[ARRAYIDX5_US]], align 220; CHECK-NEXT:    [[ADD_US:%.*]] = add i16 [[L3]], [[L2]]21; CHECK-NEXT:    [[ADD8_US:%.*]] = add i32 [[J_053_US]], [[MUL_US]]22; CHECK-NEXT:    [[ARRAYIDX9_US:%.*]] = getelementptr inbounds i16, ptr [[DATA]], i32 [[ADD8_US]]23; CHECK-NEXT:    store i16 [[ADD_US]], ptr [[ARRAYIDX9_US]], align 224; CHECK-NEXT:    [[INC_US]] = add nuw nsw i32 [[J_053_US]], 125; CHECK-NEXT:    [[TMP0:%.*]] = call i1 @llvm.loop.decrement.i32(i32 1)26; CHECK-NEXT:    br i1 [[TMP0]], label [[FOR_BODY4_US]], label [[FOR_BODY15_US_PREHEADER:%.*]]27; CHECK:       for.body15.us.preheader:28; CHECK-NEXT:    [[J10_055_US_PH:%.*]] = phi i32 [ 0, [[FOR_BODY4_US]] ]29; CHECK-NEXT:    call void @llvm.set.loop.iterations.i32(i32 [[N]])30; CHECK-NEXT:    br label [[FOR_BODY15_US:%.*]]31; CHECK:       for.body15.us:32; CHECK-NEXT:    [[J10_055_US:%.*]] = phi i32 [ [[INC26_US:%.*]], [[FOR_BODY15_US]] ], [ [[J10_055_US_PH]], [[FOR_BODY15_US_PREHEADER]] ]33; CHECK-NEXT:    [[ARRAYIDX16_US:%.*]] = getelementptr inbounds i16, ptr [[OFF]], i32 [[J10_055_US]]34; CHECK-NEXT:    [[L0:%.*]] = load i16, ptr [[ARRAYIDX16_US]], align 235; CHECK-NEXT:    [[ARRAYIDX18_US:%.*]] = getelementptr inbounds i16, ptr [[DATA]], i32 [[J10_055_US]]36; CHECK-NEXT:    [[L1:%.*]] = load i16, ptr [[ARRAYIDX18_US]], align 237; CHECK-NEXT:    [[ADD20_US:%.*]] = add i16 [[L1]], [[L0]]38; CHECK-NEXT:    [[ADD23_US:%.*]] = add i32 [[J10_055_US]], [[MUL_US]]39; CHECK-NEXT:    [[ARRAYIDX24_US:%.*]] = getelementptr inbounds i16, ptr [[DST:%.*]], i32 [[ADD23_US]]40; CHECK-NEXT:    store i16 [[ADD20_US]], ptr [[ARRAYIDX24_US]], align 241; CHECK-NEXT:    [[INC26_US]] = add nuw nsw i32 [[J10_055_US]], 142; CHECK-NEXT:    [[TMP1:%.*]] = call i1 @llvm.loop.decrement.i32(i32 1)43; CHECK-NEXT:    br i1 [[TMP1]], label [[FOR_BODY15_US]], label [[FOR_COND_CLEANUP14_US]]44; CHECK:       for.cond.cleanup14.us:45; CHECK-NEXT:    [[INC29_US]] = add nuw i32 [[I_057_US]], 146; CHECK-NEXT:    [[EXITCOND94:%.*]] = icmp eq i32 [[INC29_US]], [[N]]47; CHECK-NEXT:    br i1 [[EXITCOND94]], label [[FOR_COND_CLEANUP]], label [[FOR_COND1_PREHEADER_US]]48; CHECK:       for.cond.cleanup:49; CHECK-NEXT:    ret void50;51entry:52  %cmp252 = icmp sgt i32 %n, 053  br i1 %cmp252, label %for.cond1.preheader.us, label %for.cond.cleanup54 55for.cond1.preheader.us: ; preds = %entry, %for.cond.cleanup14.us56  %i.057.us = phi i32 [ %inc29.us, %for.cond.cleanup14.us ], [ 0, %entry ]57  %mul.us = mul i32 %i.057.us, %n58  br label %for.body4.us59 60for.body4.us: ; preds = %for.body4.us, %for.cond1.preheader.us61  %j.053.us = phi i32 [ 0, %for.cond1.preheader.us ], [ %inc.us, %for.body4.us ]62  %arrayidx.us = getelementptr inbounds i16, ptr %off, i32 %j.053.us63  %l2 = load i16, ptr %arrayidx.us, align 264  %arrayidx5.us = getelementptr inbounds i16, ptr %data, i32 %j.053.us65  %l3 = load i16, ptr %arrayidx5.us, align 266  %add.us = add i16 %l3, %l267  %add8.us = add i32 %j.053.us, %mul.us68  %arrayidx9.us = getelementptr inbounds i16, ptr %data, i32 %add8.us69  store i16 %add.us, ptr %arrayidx9.us, align 270  %inc.us = add nuw nsw i32 %j.053.us, 171  %exitcond = icmp eq i32 %inc.us, %n72  br i1 %exitcond, label %for.body15.us, label %for.body4.us73 74for.body15.us: ; preds = %for.body4.us, %for.body15.us75  %j10.055.us = phi i32 [ %inc26.us, %for.body15.us ], [ 0, %for.body4.us ]76  %arrayidx16.us = getelementptr inbounds i16, ptr %off, i32 %j10.055.us77  %l0 = load i16, ptr %arrayidx16.us, align 278  %arrayidx18.us = getelementptr inbounds i16, ptr %data, i32 %j10.055.us79  %l1 = load i16, ptr %arrayidx18.us, align 280  %add20.us = add i16 %l1, %l081  %add23.us = add i32 %j10.055.us, %mul.us82  %arrayidx24.us = getelementptr inbounds i16, ptr %dst, i32 %add23.us83  store i16 %add20.us, ptr %arrayidx24.us, align 284  %inc26.us = add nuw nsw i32 %j10.055.us, 185  %exitcond93 = icmp eq i32 %inc26.us, %n86  br i1 %exitcond93, label %for.cond.cleanup14.us, label %for.body15.us87 88for.cond.cleanup14.us: ; preds = %for.body15.us89  %inc29.us = add nuw i32 %i.057.us, 190  %exitcond94 = icmp eq i32 %inc29.us, %n91  br i1 %exitcond94, label %for.cond.cleanup, label %for.cond1.preheader.us92 93for.cond.cleanup: ; preds = %for.cond.cleanup14.us, %entry94  ret void95}96