39 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<delicm>' -disable-output < %s2; RUN: opt %loadNPMPolly '-passes=polly-custom<delicm>' -polly-print-delicm -disable-output < %s | FileCheck %s3; RUN: opt %loadNPMPolly '-passes=polly-custom<delicm>' -polly-print-delicm -disable-output < %s | FileCheck %s4;5; Simple test for the existence of the DeLICM pass.6;7; // Simplest detected SCoP to run DeLICM on.8; for (int j = 0; j < n; j += 1) {9; body: A[0] = 0.0;10; }11;12define void @func(i32 %n, ptr noalias nonnull %A) {13entry:14 br label %for15 16for:17 %j = phi i32 [0, %entry], [%j.inc, %inc]18 %j.cmp = icmp slt i32 %j, %n19 br i1 %j.cmp, label %body, label %exit20 21 body:22 store double 0.0, ptr %A23 br label %inc24 25inc:26 %j.inc = add nuw nsw i32 %j, 127 br label %for28 29exit:30 br label %return31 32return:33 ret void34}35 36 37; Verify that the DeLICM has a custom printScop() function.38; CHECK: DeLICM result:39