diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp --- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp +++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp @@ -254,6 +254,14 @@ return DerefBytes; } +/// Return the maximal extent from \p V to the end of the underlying object, +/// assuming the result is used in an aliasing query. +static uint64_t getMaximalExtentFrom(const Value &V, + const LocationSize &LocSize, + const DataLayout &DL) { + return V.getPointerMaxObjSizeBytes(DL); +} + /// Returns true if we can prove that the object specified by V has size Size. static bool isObjectSize(const Value *V, uint64_t Size, const DataLayout &DL, const TargetLibraryInfo &TLI, bool NullIsValidLoc) { @@ -1824,12 +1832,16 @@ // If the size of one access is larger than the entire object on the other // side, then we know such behavior is undefined and can assume no alias. bool NullIsValidLocation = NullPointerIsDefined(&F); - if ((isObjectSmallerThan( - O2, getMinimalExtentFrom(*V1, V1Size, DL, NullIsValidLocation), DL, - TLI, NullIsValidLocation)) || - (isObjectSmallerThan( - O1, getMinimalExtentFrom(*V2, V2Size, DL, NullIsValidLocation), DL, - TLI, NullIsValidLocation))) + uint64_t V1MinSize = + getMinimalExtentFrom(*V1, V1Size, DL, NullIsValidLocation); + uint64_t V2MinSize = + getMinimalExtentFrom(*V2, V2Size, DL, NullIsValidLocation); + uint64_t V1MaxSize = getMaximalExtentFrom(*V1, V1Size, DL); + uint64_t V2MaxSize = getMaximalExtentFrom(*V2, V2Size, DL); + + if (V1MaxSize < V2MinSize || V2MaxSize < V1MinSize || + isObjectSmallerThan(O2, V1MinSize, DL, TLI, NullIsValidLocation) || + isObjectSmallerThan(O1, V2MinSize, DL, TLI, NullIsValidLocation)) return NoAlias; // Check the cache before climbing up use-def chains. This also terminates diff --git a/llvm/test/Transforms/Attributor/readattrs.ll b/llvm/test/Transforms/Attributor/readattrs.ll --- a/llvm/test/Transforms/Attributor/readattrs.ll +++ b/llvm/test/Transforms/Attributor/readattrs.ll @@ -163,11 +163,17 @@ ; CHECK-NOT: readnone ; CHECK-NOT: readonly define void @test9(<4 x i32*> %ptrs, <4 x i32>%val) { -; CHECK: Function Attrs: nounwind willreturn -; CHECK-LABEL: define {{[^@]+}}@test9 -; CHECK-SAME: (<4 x i32*> [[PTRS:%.*]], <4 x i32> [[VAL:%.*]]) [[ATTR4:#.*]] { -; CHECK-NEXT: call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> [[VAL]], <4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef ) [[ATTR11:#.*]] -; CHECK-NEXT: ret void +; IS__TUNIT____: Function Attrs: nounwind willreturn writeonly +; IS__TUNIT____-LABEL: define {{[^@]+}}@test9 +; IS__TUNIT____-SAME: (<4 x i32*> [[PTRS:%.*]], <4 x i32> [[VAL:%.*]]) [[ATTR4:#.*]] { +; IS__TUNIT____-NEXT: call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> [[VAL]], <4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef ) [[ATTR11:#.*]] +; IS__TUNIT____-NEXT: ret void +; +; IS__CGSCC____: Function Attrs: nounwind willreturn writeonly +; IS__CGSCC____-LABEL: define {{[^@]+}}@test9 +; IS__CGSCC____-SAME: (<4 x i32*> [[PTRS:%.*]], <4 x i32> [[VAL:%.*]]) [[ATTR4:#.*]] { +; IS__CGSCC____-NEXT: call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> [[VAL]], <4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef ) [[ATTR12:#.*]] +; IS__CGSCC____-NEXT: ret void ; call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32>%val, <4 x i32*> %ptrs, i32 4, <4 x i1>) ret void @@ -176,11 +182,17 @@ ; CHECK: declare <4 x i32> @llvm.masked.gather declare <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*>, i32, <4 x i1>, <4 x i32>) define <4 x i32> @test10(<4 x i32*> %ptrs) { -; CHECK: Function Attrs: nounwind readonly willreturn -; CHECK-LABEL: define {{[^@]+}}@test10 -; CHECK-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR5:#.*]] { -; CHECK-NEXT: [[RES:%.*]] = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef , <4 x i32> undef) [[ATTR12:#.*]] -; CHECK-NEXT: ret <4 x i32> [[RES]] +; IS__TUNIT____: Function Attrs: nounwind readonly willreturn +; IS__TUNIT____-LABEL: define {{[^@]+}}@test10 +; IS__TUNIT____-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR5:#.*]] { +; IS__TUNIT____-NEXT: [[RES:%.*]] = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef , <4 x i32> undef) [[ATTR12:#.*]] +; IS__TUNIT____-NEXT: ret <4 x i32> [[RES]] +; +; IS__CGSCC____: Function Attrs: nounwind readonly willreturn +; IS__CGSCC____-LABEL: define {{[^@]+}}@test10 +; IS__CGSCC____-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR5:#.*]] { +; IS__CGSCC____-NEXT: [[RES:%.*]] = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef , <4 x i32> undef) [[ATTR13:#.*]] +; IS__CGSCC____-NEXT: ret <4 x i32> [[RES]] ; %res = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> %ptrs, i32 4, <4 x i1>, <4 x i32>undef) ret <4 x i32> %res @@ -202,11 +214,17 @@ declare <4 x i32> @test12_1(<4 x i32*>) argmemonly nounwind ; CHECK-NOT: readnone define <4 x i32> @test12_2(<4 x i32*> %ptrs) { -; CHECK: Function Attrs: argmemonly nounwind -; CHECK-LABEL: define {{[^@]+}}@test12_2 -; CHECK-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR7:#.*]] { -; CHECK-NEXT: [[RES:%.*]] = call <4 x i32> @test12_1(<4 x i32*> [[PTRS]]) [[ATTR13:#.*]] -; CHECK-NEXT: ret <4 x i32> [[RES]] +; IS__TUNIT____: Function Attrs: argmemonly nounwind +; IS__TUNIT____-LABEL: define {{[^@]+}}@test12_2 +; IS__TUNIT____-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR7:#.*]] { +; IS__TUNIT____-NEXT: [[RES:%.*]] = call <4 x i32> @test12_1(<4 x i32*> [[PTRS]]) [[ATTR13:#.*]] +; IS__TUNIT____-NEXT: ret <4 x i32> [[RES]] +; +; IS__CGSCC____: Function Attrs: argmemonly nounwind +; IS__CGSCC____-LABEL: define {{[^@]+}}@test12_2 +; IS__CGSCC____-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR7:#.*]] { +; IS__CGSCC____-NEXT: [[RES:%.*]] = call <4 x i32> @test12_1(<4 x i32*> [[PTRS]]) [[ATTR14:#.*]] +; IS__CGSCC____-NEXT: ret <4 x i32> [[RES]] ; %res = call <4 x i32> @test12_1(<4 x i32*> %ptrs) ret <4 x i32> %res diff --git a/llvm/test/Transforms/DeadStoreElimination/MSSA/calloc-store.ll b/llvm/test/Transforms/DeadStoreElimination/MSSA/calloc-store.ll --- a/llvm/test/Transforms/DeadStoreElimination/MSSA/calloc-store.ll +++ b/llvm/test/Transforms/DeadStoreElimination/MSSA/calloc-store.ll @@ -1,72 +1,97 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; RUN: opt < %s -basic-aa -dse -S | FileCheck %s declare noalias i8* @calloc(i64, i64) define i32* @test1() { -; CHECK-LABEL: test1 +; CHECK-LABEL: @test1( +; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @calloc(i64 1, i64 4) +; CHECK-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32* +; CHECK-NEXT: ret i32* [[TMP2]] +; %1 = tail call noalias i8* @calloc(i64 1, i64 4) %2 = bitcast i8* %1 to i32* ; This store is dead and should be removed store i32 0, i32* %2, align 4 -; CHECK-NOT: store i32 0, i32* %2, align 4 ret i32* %2 } define i32* @test2() { -; CHECK-LABEL: test2 +; CHECK-LABEL: @test2( +; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @calloc(i64 1, i64 4) +; CHECK-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32* +; CHECK-NEXT: ret i32* [[TMP2]] +; %1 = tail call noalias i8* @calloc(i64 1, i64 4) %2 = bitcast i8* %1 to i32* %3 = getelementptr i32, i32* %2, i32 5 store i32 0, i32* %3, align 4 -; CHECK-NOT: store i32 0, i32* %2, align 4 ret i32* %2 } define i32* @test3(i32 *%arg) { -; CHECK-LABEL: test3 +; CHECK-LABEL: @test3( +; CHECK-NEXT: store i32 0, i32* [[ARG:%.*]], align 4 +; CHECK-NEXT: ret i32* [[ARG]] +; store i32 0, i32* %arg, align 4 -; CHECK: store i32 0, i32* %arg, align 4 ret i32* %arg } declare void @clobber_memory(i8*) define i8* @test4() { -; CHECK-LABEL: test4 +; CHECK-LABEL: @test4( +; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @calloc(i64 1, i64 4) +; CHECK-NEXT: call void @clobber_memory(i8* [[TMP1]]) +; CHECK-NEXT: store i8 0, i8* [[TMP1]], align 4 +; CHECK-NEXT: ret i8* [[TMP1]] +; %1 = tail call noalias i8* @calloc(i64 1, i64 4) call void @clobber_memory(i8* %1) store i8 0, i8* %1, align 4 -; CHECK: store i8 0, i8* %1, align 4 ret i8* %1 } define i32* @test5() { -; CHECK-LABEL: test5 +; CHECK-LABEL: @test5( +; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @calloc(i64 1, i64 4) +; CHECK-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32* +; CHECK-NEXT: store volatile i32 0, i32* [[TMP2]], align 4 +; CHECK-NEXT: ret i32* [[TMP2]] +; %1 = tail call noalias i8* @calloc(i64 1, i64 4) %2 = bitcast i8* %1 to i32* store volatile i32 0, i32* %2, align 4 -; CHECK: store volatile i32 0, i32* %2, align 4 ret i32* %2 } define i8* @test6() { -; CHECK-LABEL: test6 +; CHECK-LABEL: @test6( +; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @calloc(i64 1, i64 4) +; CHECK-NEXT: store i8 5, i8* [[TMP1]], align 4 +; CHECK-NEXT: ret i8* [[TMP1]] +; %1 = tail call noalias i8* @calloc(i64 1, i64 4) store i8 5, i8* %1, align 4 -; CHECK: store i8 5, i8* %1, align 4 ret i8* %1 } define i8* @test7(i8 %arg) { -; CHECK-LABEL: test7 +; CHECK-LABEL: @test7( +; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @calloc(i64 1, i64 4) +; CHECK-NEXT: store i8 [[ARG:%.*]], i8* [[TMP1]], align 4 +; CHECK-NEXT: ret i8* [[TMP1]] +; %1 = tail call noalias i8* @calloc(i64 1, i64 4) store i8 %arg, i8* %1, align 4 -; CHECK: store i8 %arg, i8* %1, align 4 ret i8* %1 } define i8* @test8() { -; CHECK-LABEL: test8 -; CHECK-NOT: store +; CHECK-LABEL: @test8( +; CHECK-NEXT: [[P:%.*]] = tail call noalias i8* @calloc(i64 1, i64 4) +; CHECK-NEXT: ret i8* [[P]] +; %p = tail call noalias i8* @calloc(i64 1, i64 4) store i8 0, i8* %p, align 1 %p.1 = getelementptr i8, i8* %p, i32 1 @@ -79,10 +104,11 @@ } define i8* @test9() { -; CHECK-LABEL: test9 -; CHECK-NEXT: %p = tail call noalias i8* @calloc(i64 1, i64 4) -; CHECK-NEXT: store i8 5, i8* %p, align 1 -; CHECK-NEXT: ret i8* %p +; CHECK-LABEL: @test9( +; CHECK-NEXT: [[P:%.*]] = tail call noalias i8* @calloc(i64 1, i64 4) +; CHECK-NEXT: store i8 5, i8* [[P]], align 1 +; CHECK-NEXT: ret i8* [[P]] +; %p = tail call noalias i8* @calloc(i64 1, i64 4) store i8 5, i8* %p, align 1 diff --git a/llvm/test/Transforms/InstCombine/pr46680.ll b/llvm/test/Transforms/InstCombine/pr46680.ll --- a/llvm/test/Transforms/InstCombine/pr46680.ll +++ b/llvm/test/Transforms/InstCombine/pr46680.ll @@ -24,17 +24,11 @@ ; CHECK-NEXT: br label [[BB22:%.*]] ; CHECK: bb13: ; CHECK-NEXT: [[I14:%.*]] = load i16, i16* [[ARG]], align 2 -; CHECK-NEXT: [[I15:%.*]] = trunc i16 [[I14]] to i8 -; CHECK-NEXT: store i8 [[I15]], i8* @c, align 1 +; CHECK-NEXT: [[I19:%.*]] = trunc i16 [[I14]] to i8 +; CHECK-NEXT: store i8 [[I19]], i8* @c, align 1 ; CHECK-NEXT: br label [[BB22]] ; CHECK: bb22: -; CHECK-NEXT: [[STOREMERGE2_IN:%.*]] = load i16, i16* [[ARG]], align 2 -; CHECK-NEXT: [[STOREMERGE2:%.*]] = trunc i16 [[STOREMERGE2_IN]] to i8 -; CHECK-NEXT: store i8 [[STOREMERGE2]], i8* @c, align 1 -; CHECK-NEXT: [[STOREMERGE1_IN:%.*]] = load i16, i16* [[ARG]], align 2 -; CHECK-NEXT: [[STOREMERGE1:%.*]] = trunc i16 [[STOREMERGE1_IN]] to i8 -; CHECK-NEXT: store i8 [[STOREMERGE1]], i8* @c, align 1 -; CHECK-NEXT: [[STOREMERGE_IN:%.*]] = load i16, i16* [[ARG]], align 2 +; CHECK-NEXT: [[STOREMERGE_IN:%.*]] = phi i16 [ [[I5]], [[BB4]] ], [ [[I14]], [[BB13]] ] ; CHECK-NEXT: [[STOREMERGE:%.*]] = trunc i16 [[STOREMERGE_IN]] to i8 ; CHECK-NEXT: store i8 [[STOREMERGE]], i8* @c, align 1 ; CHECK-NEXT: br label [[BB23:%.*]] diff --git a/llvm/test/Transforms/LoopVectorize/X86/pr23997.ll b/llvm/test/Transforms/LoopVectorize/X86/pr23997.ll --- a/llvm/test/Transforms/LoopVectorize/X86/pr23997.ll +++ b/llvm/test/Transforms/LoopVectorize/X86/pr23997.ll @@ -27,8 +27,8 @@ ; CHECK-NEXT: [[SCEVGEP2:%.*]] = getelementptr i8, i8 addrspace(1)* [[TMP1]], i64 [[TMP6]] ; CHECK-NEXT: [[BOUND0:%.*]] = icmp ult i8 addrspace(1)* [[DOT10]], [[SCEVGEP2]] ; CHECK-NEXT: [[BOUND1:%.*]] = icmp ult i8 addrspace(1)* [[DOT12]], [[SCEVGEP]] -; CHECK-NEXT: [[MEMCHECK_CONFLICT:%.*]] = and i1 [[BOUND0]], [[BOUND1]] -; CHECK-NEXT: br i1 [[MEMCHECK_CONFLICT]], label [[SCALAR_PH]], label [[VECTOR_PH:%.*]] +; CHECK-NEXT: [[FOUND_CONFLICT:%.*]] = and i1 [[BOUND0]], [[BOUND1]] +; CHECK-NEXT: br i1 [[FOUND_CONFLICT]], label [[SCALAR_PH]], label [[VECTOR_PH:%.*]] ; CHECK: vector.ph: ; CHECK-NEXT: [[N_VEC:%.*]] = and i64 [[UMAX]], -16 ; CHECK-NEXT: br label [[VECTOR_BODY:%.*]] @@ -39,28 +39,28 @@ ; CHECK-NEXT: [[WIDE_LOAD:%.*]] = load <4 x i8 addrspace(1)*>, <4 x i8 addrspace(1)*> addrspace(1)* [[TMP8]], align 8, !alias.scope !0 ; CHECK-NEXT: [[TMP9:%.*]] = getelementptr inbounds i8 addrspace(1)*, i8 addrspace(1)* addrspace(1)* [[TMP7]], i64 4 ; CHECK-NEXT: [[TMP10:%.*]] = bitcast i8 addrspace(1)* addrspace(1)* [[TMP9]] to <4 x i8 addrspace(1)*> addrspace(1)* -; CHECK-NEXT: [[WIDE_LOAD6:%.*]] = load <4 x i8 addrspace(1)*>, <4 x i8 addrspace(1)*> addrspace(1)* [[TMP10]], align 8, !alias.scope !0 +; CHECK-NEXT: [[WIDE_LOAD3:%.*]] = load <4 x i8 addrspace(1)*>, <4 x i8 addrspace(1)*> addrspace(1)* [[TMP10]], align 8, !alias.scope !0 ; CHECK-NEXT: [[TMP11:%.*]] = getelementptr inbounds i8 addrspace(1)*, i8 addrspace(1)* addrspace(1)* [[TMP7]], i64 8 ; CHECK-NEXT: [[TMP12:%.*]] = bitcast i8 addrspace(1)* addrspace(1)* [[TMP11]] to <4 x i8 addrspace(1)*> addrspace(1)* -; CHECK-NEXT: [[WIDE_LOAD7:%.*]] = load <4 x i8 addrspace(1)*>, <4 x i8 addrspace(1)*> addrspace(1)* [[TMP12]], align 8, !alias.scope !0 +; CHECK-NEXT: [[WIDE_LOAD4:%.*]] = load <4 x i8 addrspace(1)*>, <4 x i8 addrspace(1)*> addrspace(1)* [[TMP12]], align 8, !alias.scope !0 ; CHECK-NEXT: [[TMP13:%.*]] = getelementptr inbounds i8 addrspace(1)*, i8 addrspace(1)* addrspace(1)* [[TMP7]], i64 12 ; CHECK-NEXT: [[TMP14:%.*]] = bitcast i8 addrspace(1)* addrspace(1)* [[TMP13]] to <4 x i8 addrspace(1)*> addrspace(1)* -; CHECK-NEXT: [[WIDE_LOAD8:%.*]] = load <4 x i8 addrspace(1)*>, <4 x i8 addrspace(1)*> addrspace(1)* [[TMP14]], align 8, !alias.scope !0 +; CHECK-NEXT: [[WIDE_LOAD5:%.*]] = load <4 x i8 addrspace(1)*>, <4 x i8 addrspace(1)*> addrspace(1)* [[TMP14]], align 8, !alias.scope !0 ; CHECK-NEXT: [[TMP15:%.*]] = getelementptr inbounds i8 addrspace(1)*, i8 addrspace(1)* addrspace(1)* [[DOT11]], i64 [[INDEX]] ; CHECK-NEXT: [[TMP16:%.*]] = bitcast i8 addrspace(1)* addrspace(1)* [[TMP15]] to <4 x i8 addrspace(1)*> addrspace(1)* ; CHECK-NEXT: store <4 x i8 addrspace(1)*> [[WIDE_LOAD]], <4 x i8 addrspace(1)*> addrspace(1)* [[TMP16]], align 8, !alias.scope !3, !noalias !0 ; CHECK-NEXT: [[TMP17:%.*]] = getelementptr inbounds i8 addrspace(1)*, i8 addrspace(1)* addrspace(1)* [[TMP15]], i64 4 ; CHECK-NEXT: [[TMP18:%.*]] = bitcast i8 addrspace(1)* addrspace(1)* [[TMP17]] to <4 x i8 addrspace(1)*> addrspace(1)* -; CHECK-NEXT: store <4 x i8 addrspace(1)*> [[WIDE_LOAD6]], <4 x i8 addrspace(1)*> addrspace(1)* [[TMP18]], align 8, !alias.scope !3, !noalias !0 +; CHECK-NEXT: store <4 x i8 addrspace(1)*> [[WIDE_LOAD3]], <4 x i8 addrspace(1)*> addrspace(1)* [[TMP18]], align 8, !alias.scope !3, !noalias !0 ; CHECK-NEXT: [[TMP19:%.*]] = getelementptr inbounds i8 addrspace(1)*, i8 addrspace(1)* addrspace(1)* [[TMP15]], i64 8 ; CHECK-NEXT: [[TMP20:%.*]] = bitcast i8 addrspace(1)* addrspace(1)* [[TMP19]] to <4 x i8 addrspace(1)*> addrspace(1)* -; CHECK-NEXT: store <4 x i8 addrspace(1)*> [[WIDE_LOAD7]], <4 x i8 addrspace(1)*> addrspace(1)* [[TMP20]], align 8, !alias.scope !3, !noalias !0 +; CHECK-NEXT: store <4 x i8 addrspace(1)*> [[WIDE_LOAD4]], <4 x i8 addrspace(1)*> addrspace(1)* [[TMP20]], align 8, !alias.scope !3, !noalias !0 ; CHECK-NEXT: [[TMP21:%.*]] = getelementptr inbounds i8 addrspace(1)*, i8 addrspace(1)* addrspace(1)* [[TMP15]], i64 12 ; CHECK-NEXT: [[TMP22:%.*]] = bitcast i8 addrspace(1)* addrspace(1)* [[TMP21]] to <4 x i8 addrspace(1)*> addrspace(1)* -; CHECK-NEXT: store <4 x i8 addrspace(1)*> [[WIDE_LOAD8]], <4 x i8 addrspace(1)*> addrspace(1)* [[TMP22]], align 8, !alias.scope !3, !noalias !0 +; CHECK-NEXT: store <4 x i8 addrspace(1)*> [[WIDE_LOAD5]], <4 x i8 addrspace(1)*> addrspace(1)* [[TMP22]], align 8, !alias.scope !3, !noalias !0 ; CHECK-NEXT: [[INDEX_NEXT]] = add i64 [[INDEX]], 16 ; CHECK-NEXT: [[TMP23:%.*]] = icmp eq i64 [[INDEX_NEXT]], [[N_VEC]] -; CHECK-NEXT: br i1 [[TMP23]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop !5 +; CHECK-NEXT: br i1 [[TMP23]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], [[LOOP5:!llvm.loop !.*]] ; CHECK: middle.block: ; CHECK-NEXT: [[CMP_N:%.*]] = icmp eq i64 [[UMAX]], [[N_VEC]] ; CHECK-NEXT: br i1 [[CMP_N]], label [[LOOPEXIT:%.*]], label [[SCALAR_PH]] @@ -75,7 +75,7 @@ ; CHECK-NEXT: store i8 addrspace(1)* [[V]], i8 addrspace(1)* addrspace(1)* [[DOT20]], align 8 ; CHECK-NEXT: [[INDVARS_IV_NEXT4]] = add nuw nsw i64 [[INDVARS_IV3]], 1 ; CHECK-NEXT: [[DOT21:%.*]] = icmp ult i64 [[INDVARS_IV_NEXT4]], [[TMP2]] -; CHECK-NEXT: br i1 [[DOT21]], label [[LOOP]], label [[LOOPEXIT]], !llvm.loop !7 +; CHECK-NEXT: br i1 [[DOT21]], label [[LOOP]], label [[LOOPEXIT]], [[LOOP7:!llvm.loop !.*]] ; CHECK: loopexit: ; CHECK-NEXT: ret void ;