brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.5 KiB · f6c39eb Raw
87 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<optree;opt-isl;codegen>' -S < %s | FileCheck %s2;3; llvm.org/PR353624; isl codegen does not allow to generate isl_ast_expr from pw_aff which have an5; empty domain. This happens in this case because the pw_aff's domain is6; excluded by the SCoP's parameter context.7 8target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"9 10@c = external local_unnamed_addr global i811@a = external local_unnamed_addr global i1612@b = external local_unnamed_addr global i813 14define void @fn1() {15entry:16  %a.promoted = load i16, ptr @a17  br label %for.cond18 19for.cond:                                         ; preds = %for.cond3.for.end_crit_edge, %entry20  %inc.lcssa17 = phi i16 [ 0, %for.cond3.for.end_crit_edge ], [ %a.promoted, %entry ]21  br label %for.body22 23for.body:                                         ; preds = %for.cond24  %conv = zext i16 %inc.lcssa17 to i3225  %div = udiv i32 -286702568, %conv26  br i1 undef, label %if.end, label %if.then27 28if.then:                                          ; preds = %for.body29  unreachable30 31if.end:                                           ; preds = %for.body32  br label %for.body5.lr.ph33 34for.body5.lr.ph:                                  ; preds = %if.end35  %tmp = load i8, ptr @b, align 136  %cmp = icmp eq i32 %div, 137  br i1 %cmp, label %for.body5.lr.ph.split.us, label %for.body5.lr.ph.split38 39for.body5.lr.ph.split.us:                         ; preds = %for.body5.lr.ph40  br label %lor.end.us.peel41 42lor.end.us.peel:                                  ; preds = %for.body5.lr.ph.split.us43  %inc.us.peel = add i16 %inc.lcssa17, 144  br i1 false, label %for.cond3.for.end_crit_edge, label %for.body5.us.peel.next45 46for.body5.us.peel.next:                           ; preds = %lor.end.us.peel47  br label %lor.end.us48 49lor.end.us:                                       ; preds = %lor.end.us, %for.body5.us.peel.next50  %tmp1 = phi i16 [ %inc.us.peel, %for.body5.us.peel.next ], [ %inc.us, %lor.end.us ]51  %inc.us = add i16 %tmp1, 152  %tobool4.us = icmp eq i16 %inc.us, 053  br i1 %tobool4.us, label %for.cond3.for.end_crit_edge, label %lor.end.us54 55for.body5.lr.ph.split:                            ; preds = %for.body5.lr.ph56  br label %lor.end.peel57 58lor.end.peel:                                     ; preds = %for.body5.lr.ph.split59  %inc.peel = add i16 %inc.lcssa17, 160  br i1 false, label %for.cond3.for.end_crit_edge, label %for.body5.peel.next61 62for.body5.peel.next:                              ; preds = %lor.end.peel63  br label %lor.end64 65lor.end:                                          ; preds = %lor.end, %for.body5.peel.next66  %tmp2 = phi i16 [ %inc.peel, %for.body5.peel.next ], [ %inc, %lor.end ]67  %inc = add i16 %tmp2, 168  %tobool4 = icmp eq i16 %inc, 069  br i1 %tobool4, label %for.cond3.for.end_crit_edge, label %lor.end70 71for.cond3.for.end_crit_edge:                      ; preds = %lor.end, %lor.end.peel, %lor.end.us, %lor.end.us.peel72  %tmp3 = phi i8 [ %tmp, %lor.end.us.peel ], [ %tmp, %lor.end.peel ], [ %tmp, %lor.end.us ], [ %tmp, %lor.end ]73  store i8 4, ptr @c74  br label %for.cond75}76 77 78; The reference to @b should have been generated from an isl_ast_expr.79; Because isl is unable to generate it in this case, the code generator80; resorted to use the pointer argument of %tmp = load ... .81; It is not important since this code will never be executed.82 83; CHECK:      polly.stmt.lor.end.us.peel:84; CHECK-NEXT:   %tmp_p_scalar_2 = load i8, ptr @b85; CHECK-NEXT:   store i8 %tmp_p_scalar_2, ptr %tmp3.phiops86; CHECK-NEXT:   br label %polly.merge87