brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 06b082c Raw
45 lines · plain
1; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb '-passes=polly-custom<simplify>' -polly-print-scops -polly-print-simplify -disable-output < %s 2>&1 | FileCheck %s2;3; %tmp5 must keep the Value WRITE MemoryAccess, because as an incoming value of4; %tmp4, it is an "external use".5;6; A common mistake is to assume that %tmp5 is used by %tmp4 in bb3, when7; practically it's the incoming block %bb9 which is the user.8;9target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"10 11define void @hoge() {12bb:13  br label %bb214 15bb2:                                              ; preds = %bb16  %tmp = load ptr, ptr undef17  br label %bb318 19bb3:                                              ; preds = %bb9, %bb220  %tmp4 = phi ptr [ %tmp, %bb2 ], [ %tmp5, %bb9 ]21  %tmp5 = getelementptr inbounds i64, ptr %tmp4, i64 122  %tmp6 = load i64, ptr %tmp523  %tmp7 = and i64 %tmp6, 416074956824  br i1 false, label %bb8, label %bb925 26bb8:                                              ; preds = %bb327  br label %bb928 29bb9:                                              ; preds = %bb8, %bb330  %tmp10 = icmp eq i64 %tmp7, 13421772831  br i1 %tmp10, label %bb11, label %bb332 33bb11:                                             ; preds = %bb934  br label %bb1235 36bb12:                                             ; preds = %bb1137  ret void38}39 40 41; CHECK:      MustWriteAccess :=  [Reduction Type: NONE] [Scalar: 1]42; CHECK-NEXT:     [p_0] -> { Stmt_bb3[] -> MemRef_tmp5[] };43 44; CHECK: SCoP could not be simplified45