brintos

brintos / llvm-project-archived public Read only

0
0
Text · 924 B · f95bb77 Raw
49 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<optree>' -polly-print-optree -disable-output < %s | FileCheck %s -match-full-lines2;3; Not the entire operand tree can be forwarded,4; some scalar dependencies would remain.5;6; for (int j = 0; j < n; j += 1) {7; bodyA:8;   double val = f() + 21.0;9;10; bodyB:11;   A[0] = val;12; }13;14declare double @f(...) #115 16define void @func(i32 %n, ptr noalias nonnull %A) {17entry:18  br label %for19 20for:21  %j = phi i32 [0, %entry], [%j.inc, %inc]22  %j.cmp = icmp slt i32 %j, %n23  br i1 %j.cmp, label %bodyA, label %exit24 25    bodyA:26      %v = call double (...) @f()27      %val = fadd double %v, 21.028      br label %bodyB29 30    bodyB:31      store double %val, ptr %A32      br label %inc33 34inc:35  %j.inc = add nuw nsw i32 %j, 136  br label %for37 38exit:39  br label %return40 41return:42  ret void43}44 45attributes #1 = { nounwind readnone }46 47 48; CHECK: ForwardOpTree executed, but did not modify anything49