47 lines · plain
1; REQUIRES: asserts2; RUN: opt -passes='loop-mssa(loop-rotate,licm)' %s -disable-output -debug-only=licm 2>&1 | FileCheck %s -check-prefix=LICM3; RUN: opt -passes='loop-mssa(loop-rotate,licm)' %s -S | FileCheck %s4 5; LICM-NOT: LICM sinking instruction: %.pre = load i8, ptr %arrayidx.phi.trans.insert6 7; CHECK-LABEL: @fn18; CHECK-LABEL: entry:9; CHECK: br i1 true, label %[[END:.*]], label %[[PH:.*]]10; CHECK: [[PH]]:11; CHECK: br label %[[CRIT:.*]]12; CHECK: [[CRIT]]:13; CHECK: load i814; CHECK: store i815; CHECK: br i1 true, label %[[ENDCRIT:.*]], label %[[CRIT]]16; CHECK: [[ENDCRIT]]:17; CHECK-NOT: load i818; CHECK: br label %[[END]]19 20target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64"21target triple = "s390x-unknown-linux-gnu"22 23define void @fn1() {24entry:25 %g = alloca [9 x i8], align 126 br label %for.body27 28for.body: ; preds = %for.body.for.body_crit_edge, %entry29 %0 = phi i64 [ 0, %entry ], [ %phitmp, %for.body.for.body_crit_edge ]30 %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body.for.body_crit_edge ]31 %arrayidx = getelementptr inbounds [9 x i8], ptr %g, i64 0, i64 %indvars.iv32 store i8 2, ptr %arrayidx, align 133 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 134 br i1 undef, label %for.end18, label %for.body.for.body_crit_edge35 36for.body.for.body_crit_edge: ; preds = %for.body37 %arrayidx.phi.trans.insert = getelementptr inbounds [9 x i8], ptr %g, i64 0, i64 %indvars.iv.next38 %.pre = load i8, ptr %arrayidx.phi.trans.insert, align 139 %phitmp = zext i8 %.pre to i6440 br label %for.body41 42for.end18: ; preds = %for.body43 store i64 %0, ptr undef, align 844 ret void45}46 47