diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp index 3202ba81be78e..d24a48da8c589 100644 --- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp +++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp @@ -2999,20 +2999,12 @@ LoopAccessInfo::LoopAccessInfo(Loop *L, ScalarEvolution *SE, : PSE(std::make_unique(*SE, *L)), PtrRtChecking(nullptr), TheLoop(L) { unsigned MaxTargetVectorWidthInBits = std::numeric_limits::max(); - if (TTI) { - TypeSize FixedWidth = - TTI->getRegisterBitWidth(TargetTransformInfo::RGK_FixedWidthVector); - if (FixedWidth.isNonZero()) { - // Scale the vector width by 2 as rough estimate to also consider - // interleaving. - MaxTargetVectorWidthInBits = FixedWidth.getFixedValue() * 2; - } + if (TTI && !TTI->enableScalableVectorization()) + // Scale the vector width by 2 as rough estimate to also consider + // interleaving. + MaxTargetVectorWidthInBits = + TTI->getRegisterBitWidth(TargetTransformInfo::RGK_FixedWidthVector) * 2; - TypeSize ScalableWidth = - TTI->getRegisterBitWidth(TargetTransformInfo::RGK_ScalableVector); - if (ScalableWidth.isNonZero()) - MaxTargetVectorWidthInBits = std::numeric_limits::max(); - } DepChecker = std::make_unique(*PSE, L, SymbolicStrides, MaxTargetVectorWidthInBits); PtrRtChecking = std::make_unique(*DepChecker, SE); diff --git a/llvm/test/Analysis/LoopAccessAnalysis/multiple-strides-rt-memory-checks.ll b/llvm/test/Analysis/LoopAccessAnalysis/multiple-strides-rt-memory-checks.ll index cb50b2c75ccb7..20fc0bea43b71 100644 --- a/llvm/test/Analysis/LoopAccessAnalysis/multiple-strides-rt-memory-checks.ll +++ b/llvm/test/Analysis/LoopAccessAnalysis/multiple-strides-rt-memory-checks.ll @@ -1,10 +1,11 @@ +; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5 ; RUN: opt -passes='print' -disable-output < %s 2>&1 | FileCheck %s ; This is the test case from PR26314. -; When we were retrying dependence checking with memchecks only, -; the loop-invariant access in the inner loop was incorrectly determined to be wrapping +; When we were retrying dependence checking with memchecks only, +; the loop-invariant access in the inner loop was incorrectly determined to be wrapping ; because it was not strided in the inner loop. - + ; #define Z 32 ; typedef struct s { ; int v1[Z]; @@ -21,19 +22,52 @@ ; } ; } -; CHECK: function 'Test': -; CHECK: .inner: -; CHECK-NEXT: Memory dependences are safe with run-time checks -; CHECK-NEXT: Dependences: -; CHECK-NEXT: Run-time memory checks: -; CHECK: Check 0: -; CHECK: Check 1: - target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" %struct.s = type { [32 x i32], [32 x i32], [32 x [32 x i32]] } define void @Test(ptr nocapture %obj, i64 %z) #0 { +; CHECK-LABEL: 'Test' +; CHECK-NEXT: .inner: +; CHECK-NEXT: Memory dependences are safe with a maximum safe vector width of 2048 bits with run-time checks +; CHECK-NEXT: Dependences: +; CHECK-NEXT: Run-time memory checks: +; CHECK-NEXT: Check 0: +; CHECK-NEXT: Comparing group ([[GRP1:0x[0-9a-f]+]]): +; CHECK-NEXT: %6 = getelementptr inbounds %struct.s, ptr %obj, i64 0, i32 2, i64 %i, i64 %j +; CHECK-NEXT: Against group ([[GRP2:0x[0-9a-f]+]]): +; CHECK-NEXT: %2 = getelementptr inbounds %struct.s, ptr %obj, i64 0, i32 0, i64 %j +; CHECK-NEXT: Check 1: +; CHECK-NEXT: Comparing group ([[GRP1]]): +; CHECK-NEXT: %6 = getelementptr inbounds %struct.s, ptr %obj, i64 0, i32 2, i64 %i, i64 %j +; CHECK-NEXT: Against group ([[GRP3:0x[0-9a-f]+]]): +; CHECK-NEXT: %1 = getelementptr inbounds %struct.s, ptr %obj, i64 0, i32 1, i64 %i +; CHECK-NEXT: Grouped accesses: +; CHECK-NEXT: Group [[GRP1]]: +; CHECK-NEXT: (Low: {(256 + %obj),+,128}<%.outer.preheader> High: {(256 + (4 * %z) + %obj),+,128}<%.outer.preheader>) +; CHECK-NEXT: Member: {{\{\{}}(256 + %obj),+,128}<%.outer.preheader>,+,4}<%.inner> +; CHECK-NEXT: Group [[GRP2]]: +; CHECK-NEXT: (Low: %obj High: ((4 * %z) + %obj)) +; CHECK-NEXT: Member: {%obj,+,4}<%.inner> +; CHECK-NEXT: Group [[GRP3]]: +; CHECK-NEXT: (Low: {(128 + %obj),+,4}<%.outer.preheader> High: {(132 + %obj),+,4}<%.outer.preheader>) +; CHECK-NEXT: Member: {(128 + %obj),+,4}<%.outer.preheader> +; CHECK-EMPTY: +; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop. +; CHECK-NEXT: SCEV assumptions: +; CHECK-EMPTY: +; CHECK-NEXT: Expressions re-written: +; CHECK-NEXT: .outer.preheader: +; CHECK-NEXT: Report: loop is not the innermost loop +; CHECK-NEXT: Dependences: +; CHECK-NEXT: Run-time memory checks: +; CHECK-NEXT: Grouped accesses: +; CHECK-EMPTY: +; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop. +; CHECK-NEXT: SCEV assumptions: +; CHECK-EMPTY: +; CHECK-NEXT: Expressions re-written: +; br label %.outer.preheader @@ -44,7 +78,7 @@ define void @Test(ptr nocapture %obj, i64 %z) #0 { .exit: ret void - + .outer: %i.next = add nuw nsw i64 %i, 1 %exitcond.outer = icmp eq i64 %i.next, 32 @@ -59,7 +93,7 @@ define void @Test(ptr nocapture %obj, i64 %z) #0 { %6 = getelementptr inbounds %struct.s, ptr %obj, i64 0, i32 2, i64 %i, i64 %j %7 = load i32, ptr %6 %8 = add nsw i32 %5, %7 - store i32 %8, ptr %6 + store i32 %8, ptr %6 %j.next = add nuw nsw i64 %j, 1 %exitcond.inner = icmp eq i64 %j.next, %z br i1 %exitcond.inner, label %.outer, label %.inner diff --git a/llvm/test/Analysis/LoopAccessAnalysis/non-constant-distance-backward.ll b/llvm/test/Analysis/LoopAccessAnalysis/non-constant-distance-backward.ll index 0058135a30d67..f939680aa279d 100644 --- a/llvm/test/Analysis/LoopAccessAnalysis/non-constant-distance-backward.ll +++ b/llvm/test/Analysis/LoopAccessAnalysis/non-constant-distance-backward.ll @@ -1,7 +1,12 @@ -; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 4 -; RUN: opt -passes='print' -disable-output %s 2>&1 | FileCheck --check-prefixes=COMMON,MAXLEN %s -; RUN: opt -passes='print' -disable-output -mtriple=arm64-apple-macosx %s 2>&1 | FileCheck --check-prefixes=COMMON,VW128 %s -; RUN: opt -passes='print' -disable-output -mtriple=arm64-apple-macosx -mattr=+sve %s 2>&1 | FileCheck --check-prefixes=COMMON,MAXLEN %s +; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5 +; RUN: opt -passes='print' -disable-output %s 2>&1 \ +; RUN: | FileCheck %s --check-prefixes=COMMON,CHECK +; RUN: opt -passes='print' -disable-output \ +; RUN: -mtriple=arm64-apple-macosx %s 2>&1 \ +; RUN: | FileCheck %s --check-prefixes=COMMON,VW128 +; RUN: opt -passes='print' -disable-output \ +; RUN: -mtriple=arm64-apple-macosx -mattr=+sve %s 2>&1 \ +; RUN: | FileCheck %s --check-prefixes=COMMON,MAXLEN ; REQUIRES: aarch64-registered-target @@ -72,38 +77,97 @@ exit: } define void @backward_min_distance_120(ptr %A, i64 %N) { -; COMMON-LABEL: 'backward_min_distance_120' -; COMMON-NEXT: loop: -; COMMON-NEXT: Memory dependences are safe with run-time checks -; COMMON-NEXT: Dependences: -; COMMON-NEXT: Run-time memory checks: -; COMMON-NEXT: Check 0: -; COMMON-NEXT: Comparing group ([[GRP3:0x[0-9a-f]+]]): -; COMMON-NEXT: %gep.off.iv = getelementptr inbounds i8, ptr %gep.off, i64 %iv -; COMMON-NEXT: Against group ([[GRP4:0x[0-9a-f]+]]): -; COMMON-NEXT: %gep = getelementptr inbounds i8, ptr %A, i64 %iv -; COMMON-NEXT: Grouped accesses: -; COMMON-NEXT: Group [[GRP3]]: -; COMMON-NEXT: (Low: {(15 + %A),+,1}<%outer.header> High: {(271 + %A),+,1}<%outer.header>) -; COMMON-NEXT: Member: {{\{\{}}(15 + %A),+,1}<%outer.header>,+,1}<%loop> -; COMMON-NEXT: Group [[GRP4]]: -; COMMON-NEXT: (Low: %A High: (256 + %A)) -; COMMON-NEXT: Member: {%A,+,1}<%loop> -; COMMON-EMPTY: -; COMMON-NEXT: Non vectorizable stores to invariant address were not found in loop. -; COMMON-NEXT: SCEV assumptions: -; COMMON-EMPTY: -; COMMON-NEXT: Expressions re-written: -; COMMON-NEXT: outer.header: -; COMMON-NEXT: Report: loop is not the innermost loop -; COMMON-NEXT: Dependences: -; COMMON-NEXT: Run-time memory checks: -; COMMON-NEXT: Grouped accesses: -; COMMON-EMPTY: -; COMMON-NEXT: Non vectorizable stores to invariant address were not found in loop. -; COMMON-NEXT: SCEV assumptions: -; COMMON-EMPTY: -; COMMON-NEXT: Expressions re-written: +; CHECK-LABEL: 'backward_min_distance_120' +; CHECK-NEXT: loop: +; CHECK-NEXT: Memory dependences are safe with a maximum safe vector width of 120 bits +; CHECK-NEXT: Dependences: +; CHECK-NEXT: BackwardVectorizable: +; CHECK-NEXT: %l = load i8, ptr %gep, align 4 -> +; CHECK-NEXT: store i8 %add, ptr %gep.off.iv, align 4 +; CHECK-EMPTY: +; CHECK-NEXT: Run-time memory checks: +; CHECK-NEXT: Grouped accesses: +; CHECK-EMPTY: +; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop. +; CHECK-NEXT: SCEV assumptions: +; CHECK-EMPTY: +; CHECK-NEXT: Expressions re-written: +; CHECK-NEXT: outer.header: +; CHECK-NEXT: Report: loop is not the innermost loop +; CHECK-NEXT: Dependences: +; CHECK-NEXT: Run-time memory checks: +; CHECK-NEXT: Grouped accesses: +; CHECK-EMPTY: +; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop. +; CHECK-NEXT: SCEV assumptions: +; CHECK-EMPTY: +; CHECK-NEXT: Expressions re-written: +; +; VW128-LABEL: 'backward_min_distance_120' +; VW128-NEXT: loop: +; VW128-NEXT: Memory dependences are safe with run-time checks +; VW128-NEXT: Dependences: +; VW128-NEXT: Run-time memory checks: +; VW128-NEXT: Check 0: +; VW128-NEXT: Comparing group ([[GRP7:0x[0-9a-f]+]]): +; VW128-NEXT: %gep.off.iv = getelementptr inbounds i8, ptr %gep.off, i64 %iv +; VW128-NEXT: Against group ([[GRP8:0x[0-9a-f]+]]): +; VW128-NEXT: %gep = getelementptr inbounds i8, ptr %A, i64 %iv +; VW128-NEXT: Grouped accesses: +; VW128-NEXT: Group [[GRP7]]: +; VW128-NEXT: (Low: {(15 + %A),+,1}<%outer.header> High: {(271 + %A),+,1}<%outer.header>) +; VW128-NEXT: Member: {{\{\{}}(15 + %A),+,1}<%outer.header>,+,1}<%loop> +; VW128-NEXT: Group [[GRP8]]: +; VW128-NEXT: (Low: %A High: (256 + %A)) +; VW128-NEXT: Member: {%A,+,1}<%loop> +; VW128-EMPTY: +; VW128-NEXT: Non vectorizable stores to invariant address were not found in loop. +; VW128-NEXT: SCEV assumptions: +; VW128-EMPTY: +; VW128-NEXT: Expressions re-written: +; VW128-NEXT: outer.header: +; VW128-NEXT: Report: loop is not the innermost loop +; VW128-NEXT: Dependences: +; VW128-NEXT: Run-time memory checks: +; VW128-NEXT: Grouped accesses: +; VW128-EMPTY: +; VW128-NEXT: Non vectorizable stores to invariant address were not found in loop. +; VW128-NEXT: SCEV assumptions: +; VW128-EMPTY: +; VW128-NEXT: Expressions re-written: +; +; MAXLEN-LABEL: 'backward_min_distance_120' +; MAXLEN-NEXT: loop: +; MAXLEN-NEXT: Memory dependences are safe with run-time checks +; MAXLEN-NEXT: Dependences: +; MAXLEN-NEXT: Run-time memory checks: +; MAXLEN-NEXT: Check 0: +; MAXLEN-NEXT: Comparing group ([[GRP9:0x[0-9a-f]+]]): +; MAXLEN-NEXT: %gep.off.iv = getelementptr inbounds i8, ptr %gep.off, i64 %iv +; MAXLEN-NEXT: Against group ([[GRP10:0x[0-9a-f]+]]): +; MAXLEN-NEXT: %gep = getelementptr inbounds i8, ptr %A, i64 %iv +; MAXLEN-NEXT: Grouped accesses: +; MAXLEN-NEXT: Group [[GRP9]]: +; MAXLEN-NEXT: (Low: {(15 + %A),+,1}<%outer.header> High: {(271 + %A),+,1}<%outer.header>) +; MAXLEN-NEXT: Member: {{\{\{}}(15 + %A),+,1}<%outer.header>,+,1}<%loop> +; MAXLEN-NEXT: Group [[GRP10]]: +; MAXLEN-NEXT: (Low: %A High: (256 + %A)) +; MAXLEN-NEXT: Member: {%A,+,1}<%loop> +; MAXLEN-EMPTY: +; MAXLEN-NEXT: Non vectorizable stores to invariant address were not found in loop. +; MAXLEN-NEXT: SCEV assumptions: +; MAXLEN-EMPTY: +; MAXLEN-NEXT: Expressions re-written: +; MAXLEN-NEXT: outer.header: +; MAXLEN-NEXT: Report: loop is not the innermost loop +; MAXLEN-NEXT: Dependences: +; MAXLEN-NEXT: Run-time memory checks: +; MAXLEN-NEXT: Grouped accesses: +; MAXLEN-EMPTY: +; MAXLEN-NEXT: Non vectorizable stores to invariant address were not found in loop. +; MAXLEN-NEXT: SCEV assumptions: +; MAXLEN-EMPTY: +; MAXLEN-NEXT: Expressions re-written: ; entry: br label %outer.header @@ -134,38 +198,97 @@ exit: } define void @backward_min_distance_128(ptr %A, i64 %N) { -; COMMON-LABEL: 'backward_min_distance_128' -; COMMON-NEXT: loop: -; COMMON-NEXT: Memory dependences are safe with run-time checks -; COMMON-NEXT: Dependences: -; COMMON-NEXT: Run-time memory checks: -; COMMON-NEXT: Check 0: -; COMMON-NEXT: Comparing group ([[GRP13:0x[0-9a-f]+]]): -; COMMON-NEXT: %gep.off.iv = getelementptr inbounds i8, ptr %gep.off, i64 %iv -; COMMON-NEXT: Against group ([[GRP14:0x[0-9a-f]+]]): -; COMMON-NEXT: %gep = getelementptr inbounds i8, ptr %A, i64 %iv -; COMMON-NEXT: Grouped accesses: -; COMMON-NEXT: Group [[GRP13]]: -; COMMON-NEXT: (Low: {(16 + %A),+,1}<%outer.header> High: {(272 + %A),+,1}<%outer.header>) -; COMMON-NEXT: Member: {{\{\{}}(16 + %A),+,1}<%outer.header>,+,1}<%loop> -; COMMON-NEXT: Group [[GRP14]]: -; COMMON-NEXT: (Low: %A High: (256 + %A)) -; COMMON-NEXT: Member: {%A,+,1}<%loop> -; COMMON-EMPTY: -; COMMON-NEXT: Non vectorizable stores to invariant address were not found in loop. -; COMMON-NEXT: SCEV assumptions: -; COMMON-EMPTY: -; COMMON-NEXT: Expressions re-written: -; COMMON-NEXT: outer.header: -; COMMON-NEXT: Report: loop is not the innermost loop -; COMMON-NEXT: Dependences: -; COMMON-NEXT: Run-time memory checks: -; COMMON-NEXT: Grouped accesses: -; COMMON-EMPTY: -; COMMON-NEXT: Non vectorizable stores to invariant address were not found in loop. -; COMMON-NEXT: SCEV assumptions: -; COMMON-EMPTY: -; COMMON-NEXT: Expressions re-written: +; CHECK-LABEL: 'backward_min_distance_128' +; CHECK-NEXT: loop: +; CHECK-NEXT: Memory dependences are safe with a maximum safe vector width of 128 bits +; CHECK-NEXT: Dependences: +; CHECK-NEXT: BackwardVectorizable: +; CHECK-NEXT: %l = load i8, ptr %gep, align 4 -> +; CHECK-NEXT: store i8 %add, ptr %gep.off.iv, align 4 +; CHECK-EMPTY: +; CHECK-NEXT: Run-time memory checks: +; CHECK-NEXT: Grouped accesses: +; CHECK-EMPTY: +; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop. +; CHECK-NEXT: SCEV assumptions: +; CHECK-EMPTY: +; CHECK-NEXT: Expressions re-written: +; CHECK-NEXT: outer.header: +; CHECK-NEXT: Report: loop is not the innermost loop +; CHECK-NEXT: Dependences: +; CHECK-NEXT: Run-time memory checks: +; CHECK-NEXT: Grouped accesses: +; CHECK-EMPTY: +; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop. +; CHECK-NEXT: SCEV assumptions: +; CHECK-EMPTY: +; CHECK-NEXT: Expressions re-written: +; +; VW128-LABEL: 'backward_min_distance_128' +; VW128-NEXT: loop: +; VW128-NEXT: Memory dependences are safe with run-time checks +; VW128-NEXT: Dependences: +; VW128-NEXT: Run-time memory checks: +; VW128-NEXT: Check 0: +; VW128-NEXT: Comparing group ([[GRP11:0x[0-9a-f]+]]): +; VW128-NEXT: %gep.off.iv = getelementptr inbounds i8, ptr %gep.off, i64 %iv +; VW128-NEXT: Against group ([[GRP12:0x[0-9a-f]+]]): +; VW128-NEXT: %gep = getelementptr inbounds i8, ptr %A, i64 %iv +; VW128-NEXT: Grouped accesses: +; VW128-NEXT: Group [[GRP11]]: +; VW128-NEXT: (Low: {(16 + %A),+,1}<%outer.header> High: {(272 + %A),+,1}<%outer.header>) +; VW128-NEXT: Member: {{\{\{}}(16 + %A),+,1}<%outer.header>,+,1}<%loop> +; VW128-NEXT: Group [[GRP12]]: +; VW128-NEXT: (Low: %A High: (256 + %A)) +; VW128-NEXT: Member: {%A,+,1}<%loop> +; VW128-EMPTY: +; VW128-NEXT: Non vectorizable stores to invariant address were not found in loop. +; VW128-NEXT: SCEV assumptions: +; VW128-EMPTY: +; VW128-NEXT: Expressions re-written: +; VW128-NEXT: outer.header: +; VW128-NEXT: Report: loop is not the innermost loop +; VW128-NEXT: Dependences: +; VW128-NEXT: Run-time memory checks: +; VW128-NEXT: Grouped accesses: +; VW128-EMPTY: +; VW128-NEXT: Non vectorizable stores to invariant address were not found in loop. +; VW128-NEXT: SCEV assumptions: +; VW128-EMPTY: +; VW128-NEXT: Expressions re-written: +; +; MAXLEN-LABEL: 'backward_min_distance_128' +; MAXLEN-NEXT: loop: +; MAXLEN-NEXT: Memory dependences are safe with run-time checks +; MAXLEN-NEXT: Dependences: +; MAXLEN-NEXT: Run-time memory checks: +; MAXLEN-NEXT: Check 0: +; MAXLEN-NEXT: Comparing group ([[GRP13:0x[0-9a-f]+]]): +; MAXLEN-NEXT: %gep.off.iv = getelementptr inbounds i8, ptr %gep.off, i64 %iv +; MAXLEN-NEXT: Against group ([[GRP14:0x[0-9a-f]+]]): +; MAXLEN-NEXT: %gep = getelementptr inbounds i8, ptr %A, i64 %iv +; MAXLEN-NEXT: Grouped accesses: +; MAXLEN-NEXT: Group [[GRP13]]: +; MAXLEN-NEXT: (Low: {(16 + %A),+,1}<%outer.header> High: {(272 + %A),+,1}<%outer.header>) +; MAXLEN-NEXT: Member: {{\{\{}}(16 + %A),+,1}<%outer.header>,+,1}<%loop> +; MAXLEN-NEXT: Group [[GRP14]]: +; MAXLEN-NEXT: (Low: %A High: (256 + %A)) +; MAXLEN-NEXT: Member: {%A,+,1}<%loop> +; MAXLEN-EMPTY: +; MAXLEN-NEXT: Non vectorizable stores to invariant address were not found in loop. +; MAXLEN-NEXT: SCEV assumptions: +; MAXLEN-EMPTY: +; MAXLEN-NEXT: Expressions re-written: +; MAXLEN-NEXT: outer.header: +; MAXLEN-NEXT: Report: loop is not the innermost loop +; MAXLEN-NEXT: Dependences: +; MAXLEN-NEXT: Run-time memory checks: +; MAXLEN-NEXT: Grouped accesses: +; MAXLEN-EMPTY: +; MAXLEN-NEXT: Non vectorizable stores to invariant address were not found in loop. +; MAXLEN-NEXT: SCEV assumptions: +; MAXLEN-EMPTY: +; MAXLEN-NEXT: Expressions re-written: ; entry: br label %outer.header @@ -196,21 +319,73 @@ exit: } define void @backward_min_distance_256(ptr %A, i64 %N) { +; CHECK-LABEL: 'backward_min_distance_256' +; CHECK-NEXT: loop: +; CHECK-NEXT: Memory dependences are safe with a maximum safe vector width of 256 bits +; CHECK-NEXT: Dependences: +; CHECK-NEXT: BackwardVectorizable: +; CHECK-NEXT: %l = load i8, ptr %gep, align 4 -> +; CHECK-NEXT: store i8 %add, ptr %gep.off.iv, align 4 +; CHECK-EMPTY: +; CHECK-NEXT: Run-time memory checks: +; CHECK-NEXT: Grouped accesses: +; CHECK-EMPTY: +; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop. +; CHECK-NEXT: SCEV assumptions: +; CHECK-EMPTY: +; CHECK-NEXT: Expressions re-written: +; CHECK-NEXT: outer.header: +; CHECK-NEXT: Report: loop is not the innermost loop +; CHECK-NEXT: Dependences: +; CHECK-NEXT: Run-time memory checks: +; CHECK-NEXT: Grouped accesses: +; CHECK-EMPTY: +; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop. +; CHECK-NEXT: SCEV assumptions: +; CHECK-EMPTY: +; CHECK-NEXT: Expressions re-written: +; +; VW128-LABEL: 'backward_min_distance_256' +; VW128-NEXT: loop: +; VW128-NEXT: Memory dependences are safe with a maximum safe vector width of 256 bits +; VW128-NEXT: Dependences: +; VW128-NEXT: BackwardVectorizable: +; VW128-NEXT: %l = load i8, ptr %gep, align 4 -> +; VW128-NEXT: store i8 %add, ptr %gep.off.iv, align 4 +; VW128-EMPTY: +; VW128-NEXT: Run-time memory checks: +; VW128-NEXT: Grouped accesses: +; VW128-EMPTY: +; VW128-NEXT: Non vectorizable stores to invariant address were not found in loop. +; VW128-NEXT: SCEV assumptions: +; VW128-EMPTY: +; VW128-NEXT: Expressions re-written: +; VW128-NEXT: outer.header: +; VW128-NEXT: Report: loop is not the innermost loop +; VW128-NEXT: Dependences: +; VW128-NEXT: Run-time memory checks: +; VW128-NEXT: Grouped accesses: +; VW128-EMPTY: +; VW128-NEXT: Non vectorizable stores to invariant address were not found in loop. +; VW128-NEXT: SCEV assumptions: +; VW128-EMPTY: +; VW128-NEXT: Expressions re-written: +; ; MAXLEN-LABEL: 'backward_min_distance_256' ; MAXLEN-NEXT: loop: ; MAXLEN-NEXT: Memory dependences are safe with run-time checks ; MAXLEN-NEXT: Dependences: ; MAXLEN-NEXT: Run-time memory checks: ; MAXLEN-NEXT: Check 0: -; MAXLEN-NEXT: Comparing group ([[GRP17:0x[0-9a-f]+]]): +; MAXLEN-NEXT: Comparing group ([[GRP15:0x[0-9a-f]+]]): ; MAXLEN-NEXT: %gep.off.iv = getelementptr inbounds i8, ptr %gep.off, i64 %iv -; MAXLEN-NEXT: Against group ([[GRP18:0x[0-9a-f]+]]): +; MAXLEN-NEXT: Against group ([[GRP16:0x[0-9a-f]+]]): ; MAXLEN-NEXT: %gep = getelementptr inbounds i8, ptr %A, i64 %iv ; MAXLEN-NEXT: Grouped accesses: -; MAXLEN-NEXT: Group [[GRP17]]: +; MAXLEN-NEXT: Group [[GRP15]]: ; MAXLEN-NEXT: (Low: {(32 + %A),+,1}<%outer.header> High: {(288 + %A),+,1}<%outer.header>) ; MAXLEN-NEXT: Member: {{\{\{}}(32 + %A),+,1}<%outer.header>,+,1}<%loop> -; MAXLEN-NEXT: Group [[GRP18]]: +; MAXLEN-NEXT: Group [[GRP16]]: ; MAXLEN-NEXT: (Low: %A High: (256 + %A)) ; MAXLEN-NEXT: Member: {%A,+,1}<%loop> ; MAXLEN-EMPTY: @@ -229,32 +404,6 @@ define void @backward_min_distance_256(ptr %A, i64 %N) { ; MAXLEN-EMPTY: ; MAXLEN-NEXT: Expressions re-written: ; -; VW128-LABEL: 'backward_min_distance_256' -; VW128-NEXT: loop: -; VW128-NEXT: Memory dependences are safe with a maximum safe vector width of 256 bits -; VW128-NEXT: Dependences: -; VW128-NEXT: BackwardVectorizable: -; VW128-NEXT: %l = load i8, ptr %gep, align 4 -> -; VW128-NEXT: store i8 %add, ptr %gep.off.iv, align 4 -; VW128-EMPTY: -; VW128-NEXT: Run-time memory checks: -; VW128-NEXT: Grouped accesses: -; VW128-EMPTY: -; VW128-NEXT: Non vectorizable stores to invariant address were not found in loop. -; VW128-NEXT: SCEV assumptions: -; VW128-EMPTY: -; VW128-NEXT: Expressions re-written: -; VW128-NEXT: outer.header: -; VW128-NEXT: Report: loop is not the innermost loop -; VW128-NEXT: Dependences: -; VW128-NEXT: Run-time memory checks: -; VW128-NEXT: Grouped accesses: -; VW128-EMPTY: -; VW128-NEXT: Non vectorizable stores to invariant address were not found in loop. -; VW128-NEXT: SCEV assumptions: -; VW128-EMPTY: -; VW128-NEXT: Expressions re-written: -; entry: br label %outer.header