39 lines · plain
1; REQUIRES: asserts2; RUN: opt -loop-reduce -debug-only=loop-reduce -S < %s 2>&1 | FileCheck %s3 4target datalayout = "e-m:e-i64:64-n32:64"5target triple = "powerpc64le-unknown-linux-gnu"6 7; CHECK: LSR Use: Kind=Address8; CHECK: LSR Use: Kind=Address9; CHECK-NOT: LSR Use: Kind=Basic10; CHECK-NOT: LSR Use: Kind=Basic11 12declare <4 x i32> @llvm.ppc.altivec.lvx(ptr)13declare void @llvm.ppc.altivec.stvx(<4 x i32>, ptr)14 15; Function Attrs: nofree norecurse nounwind16define void @foo(ptr %0, ptr %1, i32 signext %2) {17 %4 = icmp sgt i32 %2, 018 br i1 %4, label %5, label %719 205: ; preds = %321 %6 = zext i32 %2 to i6422 br label %823 247: ; preds = %8, %325 ret void26 278: ; preds = %5, %828 %9 = phi i64 [ 0, %5 ], [ %15, %8 ]29 %10 = getelementptr inbounds <4 x i32>, ptr %1, i64 %930 %11 = bitcast ptr %10 to ptr31 %12 = call <4 x i32> @llvm.ppc.altivec.lvx(ptr %11)32 %13 = getelementptr inbounds <4 x i32>, ptr %0, i64 %933 %14 = bitcast ptr %13 to ptr34 call void @llvm.ppc.altivec.stvx(<4 x i32> %12, ptr %14)35 %15 = add nuw nsw i64 %9, 1036 %16 = icmp ult i64 %15, %637 br i1 %16, label %8, label %738}39