; RUN: llc -march=hexagon < %s | FileCheck %s ; REQUIRES: asserts ; Test that the HexagonVectorCombine pass does not move an instruction ; incorrectly, which causes a GEP to have a base that is not defined. ; If the pass runs correctly, the unaligned loads are converted to ; aligned loads instead of crashing. ; CHECK-NOT: vmemu define dllexport void @test() local_unnamed_addr #0 { entry: br label %for_begin77 for_begin77: %0 = load ptr, ptr undef, align 4 %1 = getelementptr i8, ptr %0, i32 1794 %2 = call <64 x half> @llvm.masked.load.v64f16.p0(ptr %1, i32 1, <64 x i1> , <64 x half> undef) %3 = getelementptr i8, ptr %0, i32 1922 %4 = call <64 x half> @llvm.masked.load.v64f16.p0(ptr %3, i32 1, <64 x i1> , <64 x half> undef) %5 = shufflevector <64 x half> %2, <64 x half> %4, <64 x i32> call void @llvm.assume(i1 true) [ "align"(ptr null, i32 128) ] %6 = getelementptr i8, ptr null, i32 128 %7 = fadd <64 x half> zeroinitializer, %5 %8 = shufflevector <64 x half> %7, <64 x half> undef, <64 x i32> %9 = getelementptr i8, ptr %0, i32 1920 %unmaskedload243 = load <64 x half>, ptr %9, align 128 %10 = fadd <64 x half> %8, %unmaskedload243 store <64 x half> %10, ptr %6, align 128 br label %for_begin77 } ; Function Attrs: nofree nosync nounwind willreturn declare void @llvm.assume(i1 noundef) #1 ; Function Attrs: argmemonly nofree nosync nounwind readonly willreturn declare <64 x half> @llvm.masked.load.v64f16.p0(ptr, i32 immarg, <64 x i1>, <64 x half>) #2 attributes #0 = { "target-features"="+hvxv68,+hvx-length128b,+hvx-qfloat" } attributes #1 = { nofree nosync nounwind willreturn } attributes #2 = { argmemonly nofree nosync nounwind readonly willreturn }