brintos

brintos / llvm-project-archived public Read only

0
0
Text · 855 B · be7d159 Raw
39 lines · plain
1; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb '-passes=polly-custom<import-jscop;simplify-0>' -polly-print-simplify -polly-import-jscop-postfix=transformed -disable-output < %s | FileCheck -match-full-lines %s2;3; Do not combine stores if there is a write between them.4;5; for (int j = 0; j < n; j += 1) {6;   A[0] = 42.0;7;   A[0] = 21.0;8;   A[0] = 42.0;9; }10;11define void @nocoalesce_writebetween(i32 %n, ptr noalias nonnull %A) {12entry:13  br label %for14 15for:16  %j = phi i32 [0, %entry], [%j.inc, %inc]17  %j.cmp = icmp slt i32 %j, %n18  br i1 %j.cmp, label %body, label %exit19 20    body:21      store double 42.0, ptr %A22      store double 21.0, ptr %A23      store double 42.0, ptr %A24      br label %inc25 26inc:27  %j.inc = add nuw nsw i32 %j, 128  br label %for29 30exit:31  br label %return32 33return:34  ret void35}36 37 38; CHECK: SCoP could not be simplified39