70 lines · plain
1; RUN: opt %loadNPMPolly -S '-passes=polly<no-default-opts>' < %s | FileCheck %s2;3; Check that we do not crash as described here: http://llvm.org/PR211674;5; In case the piecewise affine function used to create an isl_ast_expr6; had empty cases (e.g., with contradicting constraints on the7; parameters), it was possible that the condition of the isl_ast_expr8; select was not a comparison but a constant (thus of type i64).9; However, we shouldn't crash in such a case :)10;11; CHECK: polly.split_new_and_old12;13target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"14 15; Function Attrs: nounwind uwtable16define void @dradb4(i32 %ido, i32 %l1, ptr %cc, ptr %ch, ptr %wa1, ptr %wa3) #0 {17entry:18 %mul = mul nsw i32 %l1, %ido19 br i1 undef, label %for.end256, label %if.end20 21if.end: ; preds = %entry22 br i1 undef, label %L105, label %for.cond45.preheader23 24for.cond45.preheader: ; preds = %if.end25 br i1 undef, label %for.body47, label %for.end19826 27for.body47: ; preds = %for.inc096, %for.cond45.preheader28 br i1 undef, label %for.body53.lr.ph, label %for.inc09629 30for.body53.lr.ph: ; preds = %for.body4731 br label %for.body5332 33for.body53: ; preds = %for.body53, %for.body53.lr.ph34 %t7.014 = phi i32 [ 0, %for.body53.lr.ph ], [ %add58, %for.body53 ]35 %i.013 = phi i32 [ 2, %for.body53.lr.ph ], [ %add193, %for.body53 ]36 %add58 = add nsw i32 %t7.014, 237 store float undef, ptr %ch, align 438 %add129 = add nsw i32 %add58, %mul39 %idxprom142 = sext i32 %add129 to i6440 %arrayidx143 = getelementptr inbounds float, ptr %ch, i64 %idxprom14241 store float undef, ptr %arrayidx143, align 442 %add153 = add nsw i32 %add129, %mul43 %add177 = add nsw i32 %add153, %mul44 %sub178 = add nsw i32 %add177, -145 %idxprom179 = sext i32 %sub178 to i6446 %arrayidx180 = getelementptr inbounds float, ptr %ch, i64 %idxprom17947 store float undef, ptr %arrayidx180, align 448 %0 = load float, ptr %wa3, align 449 %mul184 = fmul float undef, %050 %add189 = fadd float %mul184, 0.000000e+0051 %idxprom190 = sext i32 %add177 to i6452 %arrayidx191 = getelementptr inbounds float, ptr %ch, i64 %idxprom19053 store float %add189, ptr %arrayidx191, align 454 %add193 = add nsw i32 %i.013, 255 %cmp52 = icmp slt i32 %add193, %ido56 br i1 %cmp52, label %for.body53, label %for.inc09657 58for.inc096: ; preds = %for.body53, %for.body4759 br i1 undef, label %for.body47, label %for.end19860 61for.end198: ; preds = %for.inc096, %for.cond45.preheader62 br i1 false, label %for.end256, label %L10563 64L105: ; preds = %for.end198, %if.end65 br label %for.end25666 67for.end256: ; preds = %L105, %for.end198, %entry68 ret void69}70