brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 859bd45 Raw
47 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<import-jscop;simplify-0>' -polly-print-simplify -polly-import-jscop-postfix=transformed -polly-allow-nonaffine-loops -disable-output < %s | FileCheck %s -match-full-lines2;3; Do not remove the store in region_entry. It can be executed multiple times4; due to being part of a non-affine loop.5;6define void @notredundant_region_loop(i32 %n, ptr noalias nonnull %A) {7entry:8  br label %for9 10for:11  %j = phi i32 [0, %entry], [%j.inc, %inc]12  %j.cmp = icmp slt i32 %j, %n13  br i1 %j.cmp, label %body, label %exit14 15 16    body:17      %val = fadd double 21.0, 21.018      br label %region_entry19 20    region_entry:21      store double %val, ptr %A22      %sqr = mul i32 %j, %j23      %cmp = icmp eq i32 %sqr, 4224      br i1 %cmp, label %region_true, label %region_exit25 26    region_true:27      store double 0.0, ptr %A28      br label %region_entry29 30    region_exit:31      br label %inc32 33 34inc:35  %j.inc = add nuw nsw i32 %j, 136  br label %for37 38exit:39  br label %return40 41return:42  ret void43}44 45 46; CHECK: SCoP could not be simplified47