48 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<optree>' -polly-print-optree -disable-output < %s | FileCheck %s -match-full-lines2 3; In the code below, %0 is known to be equal to the content of @c (constant 0).4; Thus, in order to save a scalar dependency, forward-optree replaces5; the use of %0 in Stmt_lor_end93 by a load from @c by changing the6; access find from a scalar access to a array accesses.7; llvm.org/PR48034 describes a crash caused by the mid-processing change.8 9target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"10target triple = "x86_64-unknown-linux-gnu"11 12@c = external dso_local global i64, align 813 14define void @func() {15entry:16 br label %lor.end17 18while.cond.loopexit:19 %conv102.le = trunc i64 %xor101 to i820 ret void21 22lor.end:23 %tobool72.not = icmp eq i64 0, 024 br i1 %tobool72.not, label %lor.rhs87, label %lor.end.thread25 26lor.end.thread:27 br label %lor.rhs8728 29lor.rhs87:30 %0 = phi i64 [ 0, %lor.end.thread ], [ 0, %lor.end ]31 store i64 %0, ptr @c, align 832 %neg79 = xor i64 %0, -133 br label %lor.end9334 35lor.end93:36 %tobool93 = icmp ne i64 undef, 037 %conv95 = zext i1 %tobool93 to i6438 %and100 = and i64 %conv95, undef39 %xor101 = xor i64 %and100, %neg7940 %xor103 = xor i64 %0, %conv9541 br label %while.cond.loopexit42}43 44 45; CHECK: Statistics {46; CHECK: Reloads: 047; CHECK: }48