47 lines · plain
1; RUN: opt -passes=loop-vectorize -force-vector-width=2 -S < %s2;3; Cleaned up version of fe_tools.all_dimensions.ll from PR36311.4; Forcing VF=2 to trigger vector code gen5;6; This is a test case that let's vectorizer's code gen to modify CFG and get7; DomTree out of date, such that an assert from SCEV would trigger if8; reanalysis of SCEV happens subsequently. Once vector code gen starts,9; vectorizer should not invoke recomputation of Analysis.10 11$test = comdat any12 13define void @test(ptr %p, i1 %arg) {14entry:15 br label %for.body5116 17for.body51: ; preds = %for.body51, %entry18 br i1 %arg, label %for.body51, label %for.body89.lr.ph19 20for.cond80.loopexit: ; preds = %for.body8921 %inc94.lcssa = phi i32 [ %inc94, %for.body89 ]22 br i1 %arg, label %for.body89.lr.ph, label %nrvo.skipdtor.loopexit23 24for.body89.lr.ph: ; preds = %for.cond80.loopexit, %for.body5125 %i79.0179 = phi i32 [ %add90, %for.cond80.loopexit ], [ 0, %for.body51 ]26 %next_index.4178 = phi i32 [ %inc94.lcssa, %for.cond80.loopexit ], [ 0, %for.body51 ]27 %add90 = add nuw i32 %i79.0179, 128 %mul91 = mul i32 %add90, 729 br label %for.body8930 31for.body89: ; preds = %for.body89, %for.body89.lr.ph32 %j.0175 = phi i32 [ 0, %for.body89.lr.ph ], [ %add92, %for.body89 ]33 %next_index.5174 = phi i32 [ %next_index.4178, %for.body89.lr.ph ], [ %inc94, %for.body89 ]34 %add92 = add nuw i32 %j.0175, 135 %add93 = add i32 %add92, %mul9136 %inc94 = add i32 %next_index.5174, 137 %conv95 = zext i32 %next_index.5174 to i6438 %arrayidx.i160 = getelementptr inbounds i32, ptr %p, i64 %conv9539 store i32 %add93, ptr %arrayidx.i160, align 440;, !tbaa !141 %cmp87 = icmp ult i32 %add92, 12342 br i1 %cmp87, label %for.body89, label %for.cond80.loopexit43 44nrvo.skipdtor.loopexit: ; preds = %for.cond80.loopexit45 ret void46}47