brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 638b098 Raw
50 lines · plain
1; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb -polly-use-llvm-names=0 '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s -match-full-lines -check-prefix=IDX2; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb -polly-use-llvm-names=1 '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s -match-full-lines -check-prefix=BB3; RUN: opt %loadNPMPolly -polly-stmt-granularity=scalar-indep -polly-use-llvm-names=0 '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s -match-full-lines -check-prefix=IDX4; RUN: opt %loadNPMPolly -polly-stmt-granularity=scalar-indep -polly-use-llvm-names=1 '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s -match-full-lines -check-prefix=BB5;6; Check that the statement has the same name, regardless of how the7; basic block is split into multiple statements.8; Note that %unrelatedA and %unrelatedB can be put into separate9; statements, but are removed because those have no side-effects.10;11; for (int j = 0; j < n; j += 1) {12; body:13;   double unrelatedA = 21.0 + 21.0;14;   A[0] = 0.0;15;   double unrelatedB = 21.0 + 21.0;16; }17;18define void @func(i32 %n, ptr noalias nonnull %A) {19entry:20  br label %for21 22for:23  %j = phi i32 [0, %entry], [%j.inc, %inc]24  %j.cmp = icmp slt i32 %j, %n25  br i1 %j.cmp, label %body, label %exit26 27    body:28      %unrelatedA = fadd double 21.0, 21.029      store double 0.0, ptr %A30      %unrelatedB = fadd double 21.0, 21.031      br label %inc32 33inc:34  %j.inc = add nuw nsw i32 %j, 135  br label %for36 37exit:38  br label %return39 40return:41  ret void42}43 44 45; IDX:      Statements {46; IDX-NEXT:     Stmt147 48; BB:       Statements {49; BB-NEXT:      Stmt_body50