From 0e4399c1c6874f17803c40ecd643a5de06aaf980 Mon Sep 17 00:00:00 2001 From: Andrey Kasaurov Date: Mon, 26 Aug 2024 15:54:27 -0400 Subject: [PATCH] Update autogenerated tests Change-Id: Ie86d041f9242d562f1e950a8f8c85740d48afbaf --- .../Thumb2/LowOverheadLoops/unpredload.ll | 2 +- .../HWAddressSanitizer/use-after-scope.ll | 160 +++--- .../InterleavedAccess/RISCV/zve32x.ll | 8 +- .../InterleavedAccess/RISCV/zvl32b.ll | 10 +- .../AArch64/transpose-inseltpoison.ll | 34 +- .../SLPVectorizer/AArch64/transpose.ll | 34 +- .../RISCV/vpintrin-scalarization.ll | 535 ++++++++++++------ 7 files changed, 500 insertions(+), 283 deletions(-) diff --git a/llvm/test/CodeGen/Thumb2/LowOverheadLoops/unpredload.ll b/llvm/test/CodeGen/Thumb2/LowOverheadLoops/unpredload.ll index de741c088877e6..6b5b6b2b1b677e 100644 --- a/llvm/test/CodeGen/Thumb2/LowOverheadLoops/unpredload.ll +++ b/llvm/test/CodeGen/Thumb2/LowOverheadLoops/unpredload.ll @@ -5,7 +5,7 @@ define void @arm_cmplx_mag_squared_q15_mve(ptr %pSrc, ptr %pDst, i32 %blockSize) ; CHECK-LABEL: arm_cmplx_mag_squared_q15_mve: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: push {r7, lr} -; CHECK-NEXT: subs.w r12, r2, #8 +; CHECK-NEXT: subs.w r3, r2, #8 ; CHECK-NEXT: dlstp.16 lr, r2 ; CHECK-NEXT: .LBB0_1: @ %do.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 diff --git a/llvm/test/Instrumentation/HWAddressSanitizer/use-after-scope.ll b/llvm/test/Instrumentation/HWAddressSanitizer/use-after-scope.ll index 35a20b14f2f918..82be1cc4496870 100644 --- a/llvm/test/Instrumentation/HWAddressSanitizer/use-after-scope.ll +++ b/llvm/test/Instrumentation/HWAddressSanitizer/use-after-scope.ll @@ -81,21 +81,21 @@ define dso_local i32 @standard_lifetime() local_unnamed_addr sanitize_hwaddress ; AARCH64-SCOPE-LABEL: @standard_lifetime( ; AARCH64-SCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-SCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-SCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1:![0-9]+]]) +; AARCH64-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2:![0-9]+]]) ; AARCH64-SCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-SCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-SCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-SCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-SCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-SCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-SCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-SCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-SCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-SCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-SCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-SCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-SCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -133,21 +133,21 @@ define dso_local i32 @standard_lifetime() local_unnamed_addr sanitize_hwaddress ; AARCH64-NOSCOPE-LABEL: @standard_lifetime( ; AARCH64-NOSCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-NOSCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-NOSCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1:![0-9]+]]) +; AARCH64-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2:![0-9]+]]) ; AARCH64-NOSCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-NOSCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-NOSCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-NOSCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-NOSCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-NOSCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-NOSCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-NOSCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-NOSCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-NOSCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-NOSCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-NOSCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-NOSCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -183,21 +183,21 @@ define dso_local i32 @standard_lifetime() local_unnamed_addr sanitize_hwaddress ; AARCH64-SHORT-SCOPE-LABEL: @standard_lifetime( ; AARCH64-SHORT-SCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-SHORT-SCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-SHORT-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-SHORT-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-SHORT-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1:![0-9]+]]) +; AARCH64-SHORT-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2:![0-9]+]]) ; AARCH64-SHORT-SCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-SHORT-SCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-SHORT-SCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-SHORT-SCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -238,21 +238,21 @@ define dso_local i32 @standard_lifetime() local_unnamed_addr sanitize_hwaddress ; AARCH64-SHORT-NOSCOPE-LABEL: @standard_lifetime( ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1:![0-9]+]]) +; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2:![0-9]+]]) ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-SHORT-NOSCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -362,21 +362,21 @@ define dso_local i32 @standard_lifetime_optnone() local_unnamed_addr optnone noi ; AARCH64-SCOPE-LABEL: @standard_lifetime_optnone( ; AARCH64-SCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-SCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-SCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1]]) +; AARCH64-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2]]) ; AARCH64-SCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-SCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-SCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-SCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-SCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-SCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-SCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-SCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-SCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-SCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-SCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-SCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-SCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -414,21 +414,21 @@ define dso_local i32 @standard_lifetime_optnone() local_unnamed_addr optnone noi ; AARCH64-NOSCOPE-LABEL: @standard_lifetime_optnone( ; AARCH64-NOSCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-NOSCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-NOSCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1]]) +; AARCH64-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2]]) ; AARCH64-NOSCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-NOSCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-NOSCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-NOSCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-NOSCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-NOSCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-NOSCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-NOSCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-NOSCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-NOSCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-NOSCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-NOSCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-NOSCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -464,21 +464,21 @@ define dso_local i32 @standard_lifetime_optnone() local_unnamed_addr optnone noi ; AARCH64-SHORT-SCOPE-LABEL: @standard_lifetime_optnone( ; AARCH64-SHORT-SCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-SHORT-SCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-SHORT-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-SHORT-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-SHORT-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1]]) +; AARCH64-SHORT-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2]]) ; AARCH64-SHORT-SCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-SHORT-SCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-SHORT-SCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-SHORT-SCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -519,21 +519,21 @@ define dso_local i32 @standard_lifetime_optnone() local_unnamed_addr optnone noi ; AARCH64-SHORT-NOSCOPE-LABEL: @standard_lifetime_optnone( ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1]]) +; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2]]) ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-SHORT-NOSCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -633,21 +633,21 @@ define dso_local i32 @multiple_lifetimes() local_unnamed_addr sanitize_hwaddress ; AARCH64-SCOPE-LABEL: @multiple_lifetimes( ; AARCH64-SCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-SCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-SCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1]]) +; AARCH64-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2]]) ; AARCH64-SCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-SCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-SCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-SCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-SCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-SCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-SCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-SCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-SCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-SCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-SCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-SCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-SCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -679,21 +679,21 @@ define dso_local i32 @multiple_lifetimes() local_unnamed_addr sanitize_hwaddress ; AARCH64-NOSCOPE-LABEL: @multiple_lifetimes( ; AARCH64-NOSCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-NOSCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-NOSCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1]]) +; AARCH64-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2]]) ; AARCH64-NOSCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-NOSCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-NOSCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-NOSCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-NOSCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-NOSCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-NOSCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-NOSCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-NOSCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-NOSCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-NOSCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-NOSCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-NOSCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -725,21 +725,21 @@ define dso_local i32 @multiple_lifetimes() local_unnamed_addr sanitize_hwaddress ; AARCH64-SHORT-SCOPE-LABEL: @multiple_lifetimes( ; AARCH64-SHORT-SCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-SHORT-SCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-SHORT-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-SHORT-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-SHORT-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1]]) +; AARCH64-SHORT-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2]]) ; AARCH64-SHORT-SCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-SHORT-SCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-SHORT-SCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-SHORT-SCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -774,21 +774,21 @@ define dso_local i32 @multiple_lifetimes() local_unnamed_addr sanitize_hwaddress ; AARCH64-SHORT-NOSCOPE-LABEL: @multiple_lifetimes( ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1]]) +; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2]]) ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-SHORT-NOSCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -893,21 +893,21 @@ define dso_local i32 @unreachable_exit() local_unnamed_addr sanitize_hwaddress { ; AARCH64-SCOPE-LABEL: @unreachable_exit( ; AARCH64-SCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-SCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-SCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1]]) +; AARCH64-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2]]) ; AARCH64-SCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-SCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-SCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-SCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-SCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-SCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-SCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-SCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-SCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-SCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-SCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-SCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-SCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -950,21 +950,21 @@ define dso_local i32 @unreachable_exit() local_unnamed_addr sanitize_hwaddress { ; AARCH64-NOSCOPE-LABEL: @unreachable_exit( ; AARCH64-NOSCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-NOSCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-NOSCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1]]) +; AARCH64-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2]]) ; AARCH64-NOSCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-NOSCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-NOSCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-NOSCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-NOSCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-NOSCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-NOSCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-NOSCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-NOSCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-NOSCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-NOSCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-NOSCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-NOSCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -1006,21 +1006,21 @@ define dso_local i32 @unreachable_exit() local_unnamed_addr sanitize_hwaddress { ; AARCH64-SHORT-SCOPE-LABEL: @unreachable_exit( ; AARCH64-SHORT-SCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-SHORT-SCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-SHORT-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-SHORT-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-SHORT-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1]]) +; AARCH64-SHORT-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2]]) ; AARCH64-SHORT-SCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-SHORT-SCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-SHORT-SCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-SHORT-SCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -1066,21 +1066,21 @@ define dso_local i32 @unreachable_exit() local_unnamed_addr sanitize_hwaddress { ; AARCH64-SHORT-NOSCOPE-LABEL: @unreachable_exit( ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1]]) +; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2]]) ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-SHORT-NOSCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -1201,21 +1201,21 @@ define dso_local i32 @diamond_lifetime() local_unnamed_addr sanitize_hwaddress { ; AARCH64-SCOPE-LABEL: @diamond_lifetime( ; AARCH64-SCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-SCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-SCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1]]) +; AARCH64-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2]]) ; AARCH64-SCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-SCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-SCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-SCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-SCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-SCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-SCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-SCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-SCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-SCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-SCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-SCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-SCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -1262,21 +1262,21 @@ define dso_local i32 @diamond_lifetime() local_unnamed_addr sanitize_hwaddress { ; AARCH64-NOSCOPE-LABEL: @diamond_lifetime( ; AARCH64-NOSCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-NOSCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-NOSCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1]]) +; AARCH64-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2]]) ; AARCH64-NOSCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-NOSCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-NOSCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-NOSCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-NOSCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-NOSCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-NOSCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-NOSCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-NOSCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-NOSCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-NOSCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-NOSCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-NOSCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -1314,21 +1314,21 @@ define dso_local i32 @diamond_lifetime() local_unnamed_addr sanitize_hwaddress { ; AARCH64-SHORT-SCOPE-LABEL: @diamond_lifetime( ; AARCH64-SHORT-SCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-SHORT-SCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-SHORT-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-SHORT-SCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-SHORT-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1]]) +; AARCH64-SHORT-SCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2]]) ; AARCH64-SHORT-SCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-SHORT-SCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-SHORT-SCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-SHORT-SCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-SHORT-SCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-SHORT-SCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr @@ -1378,21 +1378,21 @@ define dso_local i32 @diamond_lifetime() local_unnamed_addr sanitize_hwaddress { ; AARCH64-SHORT-NOSCOPE-LABEL: @diamond_lifetime( ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP1:%.*]] = call ptr @llvm.thread.pointer() ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP2:%.*]] = getelementptr i8, ptr [[TMP1]], i32 48 -; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 4 +; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP3:%.*]] = load i64, ptr [[TMP2]], align 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP4:%.*]] = ashr i64 [[TMP3]], 3 -; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META1]]) +; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP5:%.*]] = call i64 @llvm.read_register.i64(metadata [[META2]]) ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP6:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP8:%.*]] = shl i64 [[TMP7]], 44 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP9:%.*]] = or i64 [[TMP5]], [[TMP8]] ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP10:%.*]] = inttoptr i64 [[TMP3]] to ptr -; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 4 +; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP9]], ptr [[TMP10]], align 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP11:%.*]] = ashr i64 [[TMP3]], 56 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP12:%.*]] = shl nuw nsw i64 [[TMP11]], 12 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP13:%.*]] = xor i64 [[TMP12]], -1 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP14:%.*]] = add i64 [[TMP3]], 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP15:%.*]] = and i64 [[TMP14]], [[TMP13]] -; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 4 +; AARCH64-SHORT-NOSCOPE-NEXT: store i64 [[TMP15]], ptr [[TMP2]], align 8 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP16:%.*]] = or i64 [[TMP3]], 4294967295 ; AARCH64-SHORT-NOSCOPE-NEXT: [[HWASAN_SHADOW:%.*]] = add i64 [[TMP16]], 1 ; AARCH64-SHORT-NOSCOPE-NEXT: [[TMP17:%.*]] = inttoptr i64 [[HWASAN_SHADOW]] to ptr diff --git a/llvm/test/Transforms/InterleavedAccess/RISCV/zve32x.ll b/llvm/test/Transforms/InterleavedAccess/RISCV/zve32x.ll index b76fbdcef64329..ac3cab6638b8c8 100644 --- a/llvm/test/Transforms/InterleavedAccess/RISCV/zve32x.ll +++ b/llvm/test/Transforms/InterleavedAccess/RISCV/zve32x.ll @@ -13,10 +13,10 @@ define <4 x i1> @load_large_vector(ptr %p) { ; ZVE32X-NEXT: ret <4 x i1> [[RET]] ; ; ZVE64X-LABEL: @load_large_vector( -; ZVE64X-NEXT: [[L:%.*]] = load <12 x ptr>, ptr [[P:%.*]], align 128 -; ZVE64X-NEXT: [[S1:%.*]] = shufflevector <12 x ptr> [[L]], <12 x ptr> poison, <4 x i32> -; ZVE64X-NEXT: [[S2:%.*]] = shufflevector <12 x ptr> [[L]], <12 x ptr> poison, <4 x i32> -; ZVE64X-NEXT: [[RET:%.*]] = icmp ne <4 x ptr> [[S1]], [[S2]] +; ZVE64X-NEXT: [[TMP1:%.*]] = call { <4 x ptr>, <4 x ptr>, <4 x ptr> } @llvm.riscv.seg3.load.v4p0.p0.i64(ptr [[P:%.*]], i64 4) +; ZVE64X-NEXT: [[TMP2:%.*]] = extractvalue { <4 x ptr>, <4 x ptr>, <4 x ptr> } [[TMP1]], 1 +; ZVE64X-NEXT: [[TMP3:%.*]] = extractvalue { <4 x ptr>, <4 x ptr>, <4 x ptr> } [[TMP1]], 0 +; ZVE64X-NEXT: [[RET:%.*]] = icmp ne <4 x ptr> [[TMP3]], [[TMP2]] ; ZVE64X-NEXT: ret <4 x i1> [[RET]] ; %l = load <12 x ptr>, ptr %p diff --git a/llvm/test/Transforms/InterleavedAccess/RISCV/zvl32b.ll b/llvm/test/Transforms/InterleavedAccess/RISCV/zvl32b.ll index 0e8afacdf463bb..a94e6a70e79e68 100644 --- a/llvm/test/Transforms/InterleavedAccess/RISCV/zvl32b.ll +++ b/llvm/test/Transforms/InterleavedAccess/RISCV/zvl32b.ll @@ -16,11 +16,11 @@ define {<16 x i32>, <16 x i32>} @load_factor2_large(ptr %ptr) { ; ZVL32B-NEXT: ret { <16 x i32>, <16 x i32> } [[RES1]] ; ; ZVL128B-LABEL: @load_factor2_large( -; ZVL128B-NEXT: [[INTERLEAVED_VEC:%.*]] = load <32 x i32>, ptr [[PTR:%.*]], align 128 -; ZVL128B-NEXT: [[V0:%.*]] = shufflevector <32 x i32> [[INTERLEAVED_VEC]], <32 x i32> poison, <16 x i32> -; ZVL128B-NEXT: [[V1:%.*]] = shufflevector <32 x i32> [[INTERLEAVED_VEC]], <32 x i32> poison, <16 x i32> -; ZVL128B-NEXT: [[RES0:%.*]] = insertvalue { <16 x i32>, <16 x i32> } undef, <16 x i32> [[V0]], 0 -; ZVL128B-NEXT: [[RES1:%.*]] = insertvalue { <16 x i32>, <16 x i32> } [[RES0]], <16 x i32> [[V1]], 1 +; ZVL128B-NEXT: [[TMP1:%.*]] = call { <16 x i32>, <16 x i32> } @llvm.riscv.seg2.load.v16i32.p0.i32(ptr [[PTR:%.*]], i32 16) +; ZVL128B-NEXT: [[TMP2:%.*]] = extractvalue { <16 x i32>, <16 x i32> } [[TMP1]], 1 +; ZVL128B-NEXT: [[TMP3:%.*]] = extractvalue { <16 x i32>, <16 x i32> } [[TMP1]], 0 +; ZVL128B-NEXT: [[RES0:%.*]] = insertvalue { <16 x i32>, <16 x i32> } undef, <16 x i32> [[TMP3]], 0 +; ZVL128B-NEXT: [[RES1:%.*]] = insertvalue { <16 x i32>, <16 x i32> } [[RES0]], <16 x i32> [[TMP2]], 1 ; ZVL128B-NEXT: ret { <16 x i32>, <16 x i32> } [[RES1]] ; %interleaved.vec = load <32 x i32>, ptr %ptr diff --git a/llvm/test/Transforms/SLPVectorizer/AArch64/transpose-inseltpoison.ll b/llvm/test/Transforms/SLPVectorizer/AArch64/transpose-inseltpoison.ll index 1bd63b79b0f5ca..1304bb248e96ec 100644 --- a/llvm/test/Transforms/SLPVectorizer/AArch64/transpose-inseltpoison.ll +++ b/llvm/test/Transforms/SLPVectorizer/AArch64/transpose-inseltpoison.ll @@ -96,13 +96,17 @@ define <4 x i32> @build_vec_v4i32(<4 x i32> %v0, <4 x i32> %v1) { define <4 x i32> @build_vec_v4i32_reuse_0(<2 x i32> %v0, <2 x i32> %v1) { ; CHECK-LABEL: @build_vec_v4i32_reuse_0( -; CHECK-NEXT: [[TMP1:%.*]] = add <2 x i32> [[V0:%.*]], [[V1:%.*]] -; CHECK-NEXT: [[TMP2:%.*]] = sub <2 x i32> [[V0]], [[V1]] -; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <2 x i32> [[TMP1]], <2 x i32> [[TMP2]], <2 x i32> -; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <2 x i32> [[TMP1]], <2 x i32> [[TMP2]], <2 x i32> -; CHECK-NEXT: [[TMP5:%.*]] = add <2 x i32> [[TMP4]], [[TMP3]] -; CHECK-NEXT: [[TMP6:%.*]] = shufflevector <2 x i32> [[TMP5]], <2 x i32> poison, <4 x i32> -; CHECK-NEXT: ret <4 x i32> [[TMP6]] +; CHECK-NEXT: [[TMP1:%.*]] = sub <2 x i32> [[V0:%.*]], [[V1:%.*]] +; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <2 x i32> [[V1]], <2 x i32> [[V0]], <4 x i32> +; CHECK-NEXT: [[TMP3:%.*]] = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> [[TMP2]]) +; CHECK-NEXT: [[TMP4:%.*]] = extractelement <2 x i32> [[TMP1]], i64 0 +; CHECK-NEXT: [[TMP5:%.*]] = extractelement <2 x i32> [[TMP1]], i64 1 +; CHECK-NEXT: [[TMP2_1:%.*]] = add i32 [[TMP4]], [[TMP5]] +; CHECK-NEXT: [[TMP3_0:%.*]] = insertelement <4 x i32> poison, i32 [[TMP3]], i64 0 +; CHECK-NEXT: [[TMP3_1:%.*]] = insertelement <4 x i32> [[TMP3_0]], i32 [[TMP2_1]], i64 1 +; CHECK-NEXT: [[TMP3_2:%.*]] = insertelement <4 x i32> [[TMP3_1]], i32 [[TMP3]], i64 2 +; CHECK-NEXT: [[TMP3_3:%.*]] = insertelement <4 x i32> [[TMP3_2]], i32 [[TMP2_1]], i64 3 +; CHECK-NEXT: ret <4 x i32> [[TMP3_3]] ; %v0.0 = extractelement <2 x i32> %v0, i32 0 %v0.1 = extractelement <2 x i32> %v0, i32 1 @@ -158,16 +162,20 @@ define <4 x i32> @build_vec_v4i32_reuse_1(<2 x i32> %v0, <2 x i32> %v1) { define <4 x i32> @build_vec_v4i32_3_binops(<2 x i32> %v0, <2 x i32> %v1) { ; CHECK-LABEL: @build_vec_v4i32_3_binops( -; CHECK-NEXT: [[TMP1:%.*]] = add <2 x i32> [[V0:%.*]], [[V1:%.*]] -; CHECK-NEXT: [[TMP2:%.*]] = mul <2 x i32> [[V0]], [[V1]] -; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <2 x i32> [[TMP1]], <2 x i32> [[TMP2]], <2 x i32> -; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <2 x i32> [[TMP1]], <2 x i32> [[TMP2]], <2 x i32> -; CHECK-NEXT: [[TMP5:%.*]] = add <2 x i32> [[TMP4]], [[TMP3]] +; CHECK-NEXT: [[TMP1:%.*]] = mul <2 x i32> [[V0:%.*]], [[V1:%.*]] +; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <2 x i32> [[V1]], <2 x i32> [[V0]], <4 x i32> +; CHECK-NEXT: [[TMP3:%.*]] = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> [[TMP2]]) +; CHECK-NEXT: [[TMP4:%.*]] = extractelement <2 x i32> [[TMP1]], i64 0 +; CHECK-NEXT: [[TMP5:%.*]] = extractelement <2 x i32> [[TMP1]], i64 1 +; CHECK-NEXT: [[TMP2_1:%.*]] = add i32 [[TMP4]], [[TMP5]] ; CHECK-NEXT: [[TMP6:%.*]] = xor <2 x i32> [[V0]], [[V1]] ; CHECK-NEXT: [[TMP7:%.*]] = shufflevector <2 x i32> [[TMP6]], <2 x i32> poison, <2 x i32> ; CHECK-NEXT: [[TMP8:%.*]] = xor <2 x i32> [[V0]], [[V1]] ; CHECK-NEXT: [[TMP9:%.*]] = add <2 x i32> [[TMP7]], [[TMP8]] -; CHECK-NEXT: [[TMP3_31:%.*]] = shufflevector <2 x i32> [[TMP5]], <2 x i32> [[TMP9]], <4 x i32> +; CHECK-NEXT: [[TMP3_0:%.*]] = insertelement <4 x i32> poison, i32 [[TMP3]], i64 0 +; CHECK-NEXT: [[TMP3_1:%.*]] = insertelement <4 x i32> [[TMP3_0]], i32 [[TMP2_1]], i64 1 +; CHECK-NEXT: [[TMP10:%.*]] = shufflevector <2 x i32> [[TMP9]], <2 x i32> poison, <4 x i32> +; CHECK-NEXT: [[TMP3_31:%.*]] = shufflevector <4 x i32> [[TMP3_1]], <4 x i32> [[TMP10]], <4 x i32> ; CHECK-NEXT: ret <4 x i32> [[TMP3_31]] ; %v0.0 = extractelement <2 x i32> %v0, i32 0 diff --git a/llvm/test/Transforms/SLPVectorizer/AArch64/transpose.ll b/llvm/test/Transforms/SLPVectorizer/AArch64/transpose.ll index f99f6ecd333823..66998fd0f8898f 100644 --- a/llvm/test/Transforms/SLPVectorizer/AArch64/transpose.ll +++ b/llvm/test/Transforms/SLPVectorizer/AArch64/transpose.ll @@ -96,13 +96,17 @@ define <4 x i32> @build_vec_v4i32(<4 x i32> %v0, <4 x i32> %v1) { define <4 x i32> @build_vec_v4i32_reuse_0(<2 x i32> %v0, <2 x i32> %v1) { ; CHECK-LABEL: @build_vec_v4i32_reuse_0( -; CHECK-NEXT: [[TMP1:%.*]] = add <2 x i32> [[V0:%.*]], [[V1:%.*]] -; CHECK-NEXT: [[TMP2:%.*]] = sub <2 x i32> [[V0]], [[V1]] -; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <2 x i32> [[TMP1]], <2 x i32> [[TMP2]], <2 x i32> -; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <2 x i32> [[TMP1]], <2 x i32> [[TMP2]], <2 x i32> -; CHECK-NEXT: [[TMP5:%.*]] = add <2 x i32> [[TMP4]], [[TMP3]] -; CHECK-NEXT: [[TMP6:%.*]] = shufflevector <2 x i32> [[TMP5]], <2 x i32> poison, <4 x i32> -; CHECK-NEXT: ret <4 x i32> [[TMP6]] +; CHECK-NEXT: [[TMP1:%.*]] = sub <2 x i32> [[V0:%.*]], [[V1:%.*]] +; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <2 x i32> [[V1]], <2 x i32> [[V0]], <4 x i32> +; CHECK-NEXT: [[TMP3:%.*]] = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> [[TMP2]]) +; CHECK-NEXT: [[TMP4:%.*]] = extractelement <2 x i32> [[TMP1]], i64 0 +; CHECK-NEXT: [[TMP5:%.*]] = extractelement <2 x i32> [[TMP1]], i64 1 +; CHECK-NEXT: [[TMP2_1:%.*]] = add i32 [[TMP4]], [[TMP5]] +; CHECK-NEXT: [[TMP3_0:%.*]] = insertelement <4 x i32> poison, i32 [[TMP3]], i64 0 +; CHECK-NEXT: [[TMP3_1:%.*]] = insertelement <4 x i32> [[TMP3_0]], i32 [[TMP2_1]], i64 1 +; CHECK-NEXT: [[TMP3_2:%.*]] = insertelement <4 x i32> [[TMP3_1]], i32 [[TMP3]], i64 2 +; CHECK-NEXT: [[TMP3_3:%.*]] = insertelement <4 x i32> [[TMP3_2]], i32 [[TMP2_1]], i64 3 +; CHECK-NEXT: ret <4 x i32> [[TMP3_3]] ; %v0.0 = extractelement <2 x i32> %v0, i32 0 %v0.1 = extractelement <2 x i32> %v0, i32 1 @@ -158,16 +162,20 @@ define <4 x i32> @build_vec_v4i32_reuse_1(<2 x i32> %v0, <2 x i32> %v1) { define <4 x i32> @build_vec_v4i32_3_binops(<2 x i32> %v0, <2 x i32> %v1) { ; CHECK-LABEL: @build_vec_v4i32_3_binops( -; CHECK-NEXT: [[TMP1:%.*]] = add <2 x i32> [[V0:%.*]], [[V1:%.*]] -; CHECK-NEXT: [[TMP2:%.*]] = mul <2 x i32> [[V0]], [[V1]] -; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <2 x i32> [[TMP1]], <2 x i32> [[TMP2]], <2 x i32> -; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <2 x i32> [[TMP1]], <2 x i32> [[TMP2]], <2 x i32> -; CHECK-NEXT: [[TMP5:%.*]] = add <2 x i32> [[TMP4]], [[TMP3]] +; CHECK-NEXT: [[TMP1:%.*]] = mul <2 x i32> [[V0:%.*]], [[V1:%.*]] +; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <2 x i32> [[V1]], <2 x i32> [[V0]], <4 x i32> +; CHECK-NEXT: [[TMP3:%.*]] = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> [[TMP2]]) +; CHECK-NEXT: [[TMP4:%.*]] = extractelement <2 x i32> [[TMP1]], i64 0 +; CHECK-NEXT: [[TMP5:%.*]] = extractelement <2 x i32> [[TMP1]], i64 1 +; CHECK-NEXT: [[TMP2_1:%.*]] = add i32 [[TMP4]], [[TMP5]] ; CHECK-NEXT: [[TMP6:%.*]] = xor <2 x i32> [[V0]], [[V1]] ; CHECK-NEXT: [[TMP7:%.*]] = shufflevector <2 x i32> [[TMP6]], <2 x i32> poison, <2 x i32> ; CHECK-NEXT: [[TMP8:%.*]] = xor <2 x i32> [[V0]], [[V1]] ; CHECK-NEXT: [[TMP9:%.*]] = add <2 x i32> [[TMP7]], [[TMP8]] -; CHECK-NEXT: [[TMP3_31:%.*]] = shufflevector <2 x i32> [[TMP5]], <2 x i32> [[TMP9]], <4 x i32> +; CHECK-NEXT: [[TMP3_0:%.*]] = insertelement <4 x i32> poison, i32 [[TMP3]], i64 0 +; CHECK-NEXT: [[TMP3_1:%.*]] = insertelement <4 x i32> [[TMP3_0]], i32 [[TMP2_1]], i64 1 +; CHECK-NEXT: [[TMP10:%.*]] = shufflevector <2 x i32> [[TMP9]], <2 x i32> poison, <4 x i32> +; CHECK-NEXT: [[TMP3_31:%.*]] = shufflevector <4 x i32> [[TMP3_1]], <4 x i32> [[TMP10]], <4 x i32> ; CHECK-NEXT: ret <4 x i32> [[TMP3_31]] ; %v0.0 = extractelement <2 x i32> %v0, i32 0 diff --git a/llvm/test/Transforms/VectorCombine/RISCV/vpintrin-scalarization.ll b/llvm/test/Transforms/VectorCombine/RISCV/vpintrin-scalarization.ll index 908006d43ac9e8..57c92524be58b4 100644 --- a/llvm/test/Transforms/VectorCombine/RISCV/vpintrin-scalarization.ll +++ b/llvm/test/Transforms/VectorCombine/RISCV/vpintrin-scalarization.ll @@ -37,14 +37,14 @@ declare <1 x i64> @llvm.vp.mul.v1i64(<1 x i64>, <1 x i64>, <1 x i1>, i32) declare <4 x i64> @llvm.vp.mul.v4i64(<4 x i64>, <4 x i64>, <4 x i1>, i32) define @add_nxv1i64_allonesmask( %x, i64 %y, i32 zeroext %evl) { -; VEC-COMBINE-LABEL: @add_nxv1i64_allonesmask( -; VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 -; VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP1:%.*]] = add i64 [[Y:%.*]], 42 -; VEC-COMBINE-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 -; VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) -; VEC-COMBINE-NEXT: ret [[TMP3]] +; VEC-COMBINE-64-LABEL: @add_nxv1i64_allonesmask( +; VEC-COMBINE-64-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-64-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP1:%.*]] = add i64 [[Y:%.*]], 42 +; VEC-COMBINE-64-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-64-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-64-NEXT: ret [[TMP3]] ; ; NO-VEC-COMBINE-LABEL: @add_nxv1i64_allonesmask( ; NO-VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 @@ -54,6 +54,15 @@ define @add_nxv1i64_allonesmask( %x, i64 %y ; NO-VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.add.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) ; NO-VEC-COMBINE-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) ; NO-VEC-COMBINE-NEXT: ret [[TMP4]] +; +; VEC-COMBINE-32-LABEL: @add_nxv1i64_allonesmask( +; VEC-COMBINE-32-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-32-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 +; VEC-COMBINE-32-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP3:%.*]] = call @llvm.vp.add.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-32-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; VEC-COMBINE-32-NEXT: ret [[TMP4]] ; %splat = insertelement poison, i1 -1, i32 0 %mask = shufflevector %splat, poison, zeroinitializer @@ -80,14 +89,14 @@ define @add_nxv1i64_anymask( %x, i64 %y, @sub_nxv1i64_allonesmask( %x, i64 %y, i32 zeroext %evl) { -; VEC-COMBINE-LABEL: @sub_nxv1i64_allonesmask( -; VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 -; VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP1:%.*]] = sub i64 [[Y:%.*]], 42 -; VEC-COMBINE-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 -; VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) -; VEC-COMBINE-NEXT: ret [[TMP3]] +; VEC-COMBINE-64-LABEL: @sub_nxv1i64_allonesmask( +; VEC-COMBINE-64-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-64-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP1:%.*]] = sub i64 [[Y:%.*]], 42 +; VEC-COMBINE-64-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-64-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-64-NEXT: ret [[TMP3]] ; ; NO-VEC-COMBINE-LABEL: @sub_nxv1i64_allonesmask( ; NO-VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 @@ -97,6 +106,15 @@ define @sub_nxv1i64_allonesmask( %x, i64 %y ; NO-VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.sub.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) ; NO-VEC-COMBINE-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) ; NO-VEC-COMBINE-NEXT: ret [[TMP4]] +; +; VEC-COMBINE-32-LABEL: @sub_nxv1i64_allonesmask( +; VEC-COMBINE-32-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-32-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 +; VEC-COMBINE-32-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP3:%.*]] = call @llvm.vp.sub.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-32-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; VEC-COMBINE-32-NEXT: ret [[TMP4]] ; %splat = insertelement poison, i1 -1, i32 0 %mask = shufflevector %splat, poison, zeroinitializer @@ -123,14 +141,14 @@ define @sub_nxv1i64_anymask( %x, i64 %y, @mul_nxv1i64_allonesmask( %x, i64 %y, i32 zeroext %evl) { -; VEC-COMBINE-LABEL: @mul_nxv1i64_allonesmask( -; VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 -; VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP1:%.*]] = mul i64 [[Y:%.*]], 42 -; VEC-COMBINE-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 -; VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) -; VEC-COMBINE-NEXT: ret [[TMP3]] +; VEC-COMBINE-64-LABEL: @mul_nxv1i64_allonesmask( +; VEC-COMBINE-64-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-64-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP1:%.*]] = mul i64 [[Y:%.*]], 42 +; VEC-COMBINE-64-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-64-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-64-NEXT: ret [[TMP3]] ; ; NO-VEC-COMBINE-LABEL: @mul_nxv1i64_allonesmask( ; NO-VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 @@ -140,6 +158,15 @@ define @mul_nxv1i64_allonesmask( %x, i64 %y ; NO-VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) ; NO-VEC-COMBINE-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) ; NO-VEC-COMBINE-NEXT: ret [[TMP4]] +; +; VEC-COMBINE-32-LABEL: @mul_nxv1i64_allonesmask( +; VEC-COMBINE-32-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-32-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 +; VEC-COMBINE-32-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-32-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; VEC-COMBINE-32-NEXT: ret [[TMP4]] ; %splat = insertelement poison, i1 -1, i32 0 %mask = shufflevector %splat, poison, zeroinitializer @@ -166,14 +193,32 @@ define @mul_nxv1i64_anymask( %x, i64 %y, @sdiv_nxv1i64_allonesmask( %x, i64 %y, i32 zeroext %evl) { -; ALL-LABEL: @sdiv_nxv1i64_allonesmask( -; ALL-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 -; ALL-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer -; ALL-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 -; ALL-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer -; ALL-NEXT: [[TMP3:%.*]] = call @llvm.vp.sdiv.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) -; ALL-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) -; ALL-NEXT: ret [[TMP4]] +; VEC-COMBINE-64-LABEL: @sdiv_nxv1i64_allonesmask( +; VEC-COMBINE-64-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-64-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP1:%.*]] = sdiv i64 [[Y:%.*]], 42 +; VEC-COMBINE-64-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-64-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-64-NEXT: ret [[TMP3]] +; +; NO-VEC-COMBINE-LABEL: @sdiv_nxv1i64_allonesmask( +; NO-VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; NO-VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 +; NO-VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.sdiv.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; NO-VEC-COMBINE-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; NO-VEC-COMBINE-NEXT: ret [[TMP4]] +; +; VEC-COMBINE-32-LABEL: @sdiv_nxv1i64_allonesmask( +; VEC-COMBINE-32-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-32-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 +; VEC-COMBINE-32-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP3:%.*]] = call @llvm.vp.sdiv.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-32-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; VEC-COMBINE-32-NEXT: ret [[TMP4]] ; %splat = insertelement poison, i1 -1, i32 0 %mask = shufflevector %splat, poison, zeroinitializer @@ -221,14 +266,32 @@ define @sdiv_nxv1i64_unspeculatable(i64 %x, i64 %y, i32 zeroe } define @udiv_nxv1i64_allonesmask( %x, i64 %y, i32 zeroext %evl) { -; ALL-LABEL: @udiv_nxv1i64_allonesmask( -; ALL-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 -; ALL-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer -; ALL-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 -; ALL-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer -; ALL-NEXT: [[TMP3:%.*]] = call @llvm.vp.udiv.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) -; ALL-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) -; ALL-NEXT: ret [[TMP4]] +; VEC-COMBINE-64-LABEL: @udiv_nxv1i64_allonesmask( +; VEC-COMBINE-64-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-64-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP1:%.*]] = udiv i64 [[Y:%.*]], 42 +; VEC-COMBINE-64-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-64-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-64-NEXT: ret [[TMP3]] +; +; NO-VEC-COMBINE-LABEL: @udiv_nxv1i64_allonesmask( +; NO-VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; NO-VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 +; NO-VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.udiv.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; NO-VEC-COMBINE-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; NO-VEC-COMBINE-NEXT: ret [[TMP4]] +; +; VEC-COMBINE-32-LABEL: @udiv_nxv1i64_allonesmask( +; VEC-COMBINE-32-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-32-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 +; VEC-COMBINE-32-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP3:%.*]] = call @llvm.vp.udiv.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-32-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; VEC-COMBINE-32-NEXT: ret [[TMP4]] ; %splat = insertelement poison, i1 -1, i32 0 %mask = shufflevector %splat, poison, zeroinitializer @@ -276,14 +339,32 @@ define @udiv_nxv1i64_unspeculatable(i64 %x, i64 %y, i32 zeroe } define @srem_nxv1i64_allonesmask( %x, i64 %y, i32 zeroext %evl) { -; ALL-LABEL: @srem_nxv1i64_allonesmask( -; ALL-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 -; ALL-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer -; ALL-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 -; ALL-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer -; ALL-NEXT: [[TMP3:%.*]] = call @llvm.vp.srem.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) -; ALL-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) -; ALL-NEXT: ret [[TMP4]] +; VEC-COMBINE-64-LABEL: @srem_nxv1i64_allonesmask( +; VEC-COMBINE-64-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-64-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP1:%.*]] = srem i64 [[Y:%.*]], 42 +; VEC-COMBINE-64-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-64-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-64-NEXT: ret [[TMP3]] +; +; NO-VEC-COMBINE-LABEL: @srem_nxv1i64_allonesmask( +; NO-VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; NO-VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 +; NO-VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.srem.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; NO-VEC-COMBINE-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; NO-VEC-COMBINE-NEXT: ret [[TMP4]] +; +; VEC-COMBINE-32-LABEL: @srem_nxv1i64_allonesmask( +; VEC-COMBINE-32-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-32-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 +; VEC-COMBINE-32-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP3:%.*]] = call @llvm.vp.srem.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-32-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; VEC-COMBINE-32-NEXT: ret [[TMP4]] ; %splat = insertelement poison, i1 -1, i32 0 %mask = shufflevector %splat, poison, zeroinitializer @@ -331,14 +412,32 @@ define @srem_nxv1i64_unspeculatable(i64 %x, i64 %y, i32 zeroe } define @urem_nxv1i64_allonesmask( %x, i64 %y, i32 zeroext %evl) { -; ALL-LABEL: @urem_nxv1i64_allonesmask( -; ALL-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 -; ALL-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer -; ALL-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 -; ALL-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer -; ALL-NEXT: [[TMP3:%.*]] = call @llvm.vp.urem.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) -; ALL-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) -; ALL-NEXT: ret [[TMP4]] +; VEC-COMBINE-64-LABEL: @urem_nxv1i64_allonesmask( +; VEC-COMBINE-64-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-64-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP1:%.*]] = urem i64 [[Y:%.*]], 42 +; VEC-COMBINE-64-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-64-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-64-NEXT: ret [[TMP3]] +; +; NO-VEC-COMBINE-LABEL: @urem_nxv1i64_allonesmask( +; NO-VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; NO-VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 +; NO-VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.urem.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; NO-VEC-COMBINE-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; NO-VEC-COMBINE-NEXT: ret [[TMP4]] +; +; VEC-COMBINE-32-LABEL: @urem_nxv1i64_allonesmask( +; VEC-COMBINE-32-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-32-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 +; VEC-COMBINE-32-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP3:%.*]] = call @llvm.vp.urem.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-32-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; VEC-COMBINE-32-NEXT: ret [[TMP4]] ; %splat = insertelement poison, i1 -1, i32 0 %mask = shufflevector %splat, poison, zeroinitializer @@ -386,15 +485,21 @@ define @urem_nxv1i64_unspeculatable(i64 %x, i64 %y, i32 zeroe } define @sdiv_nxv1i64_allonesmask_knownvl(i64 %x, i64 %y) { -; ALL-LABEL: @sdiv_nxv1i64_allonesmask_knownvl( -; ALL-NEXT: [[MASK_HEAD:%.*]] = insertelement poison, i1 true, i32 0 -; ALL-NEXT: [[MASK:%.*]] = shufflevector [[MASK_HEAD]], poison, zeroinitializer -; ALL-NEXT: [[X_HEAD:%.*]] = insertelement poison, i64 [[X:%.*]], i64 0 -; ALL-NEXT: [[X_SPLAT:%.*]] = shufflevector [[X_HEAD]], poison, zeroinitializer -; ALL-NEXT: [[Y_HEAD:%.*]] = insertelement poison, i64 [[X]], i64 0 -; ALL-NEXT: [[Y_SPLAT:%.*]] = shufflevector [[Y_HEAD]], poison, zeroinitializer -; ALL-NEXT: [[RES:%.*]] = call @llvm.vp.sdiv.nxv1i64( [[X_SPLAT]], [[Y_SPLAT]], [[MASK]], i32 4) -; ALL-NEXT: ret [[RES]] +; VEC-COMBINE-LABEL: @sdiv_nxv1i64_allonesmask_knownvl( +; VEC-COMBINE-NEXT: [[TMP1:%.*]] = sdiv i64 [[X:%.*]], [[X]] +; VEC-COMBINE-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-NEXT: [[RES:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-NEXT: ret [[RES]] +; +; NO-VEC-COMBINE-LABEL: @sdiv_nxv1i64_allonesmask_knownvl( +; NO-VEC-COMBINE-NEXT: [[MASK_HEAD:%.*]] = insertelement poison, i1 true, i32 0 +; NO-VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[MASK_HEAD]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[X_HEAD:%.*]] = insertelement poison, i64 [[X:%.*]], i64 0 +; NO-VEC-COMBINE-NEXT: [[X_SPLAT:%.*]] = shufflevector [[X_HEAD]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[Y_HEAD:%.*]] = insertelement poison, i64 [[X]], i64 0 +; NO-VEC-COMBINE-NEXT: [[Y_SPLAT:%.*]] = shufflevector [[Y_HEAD]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[RES:%.*]] = call @llvm.vp.sdiv.nxv1i64( [[X_SPLAT]], [[Y_SPLAT]], [[MASK]], i32 4) +; NO-VEC-COMBINE-NEXT: ret [[RES]] ; %mask.head = insertelement poison, i1 -1, i32 0 %mask = shufflevector %mask.head, poison, zeroinitializer @@ -424,15 +529,21 @@ define @sdiv_nxv1i64_anymask_knownvl(i64 %x, i64 %y, @udiv_nxv1i64_allonesmask_knownvl(i64 %x, i64 %y) { -; ALL-LABEL: @udiv_nxv1i64_allonesmask_knownvl( -; ALL-NEXT: [[MASK_HEAD:%.*]] = insertelement poison, i1 true, i32 0 -; ALL-NEXT: [[MASK:%.*]] = shufflevector [[MASK_HEAD]], poison, zeroinitializer -; ALL-NEXT: [[X_HEAD:%.*]] = insertelement poison, i64 [[X:%.*]], i64 0 -; ALL-NEXT: [[X_SPLAT:%.*]] = shufflevector [[X_HEAD]], poison, zeroinitializer -; ALL-NEXT: [[Y_HEAD:%.*]] = insertelement poison, i64 [[X]], i64 0 -; ALL-NEXT: [[Y_SPLAT:%.*]] = shufflevector [[Y_HEAD]], poison, zeroinitializer -; ALL-NEXT: [[RES:%.*]] = call @llvm.vp.udiv.nxv1i64( [[X_SPLAT]], [[Y_SPLAT]], [[MASK]], i32 4) -; ALL-NEXT: ret [[RES]] +; VEC-COMBINE-LABEL: @udiv_nxv1i64_allonesmask_knownvl( +; VEC-COMBINE-NEXT: [[TMP1:%.*]] = udiv i64 [[X:%.*]], [[X]] +; VEC-COMBINE-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-NEXT: [[RES:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-NEXT: ret [[RES]] +; +; NO-VEC-COMBINE-LABEL: @udiv_nxv1i64_allonesmask_knownvl( +; NO-VEC-COMBINE-NEXT: [[MASK_HEAD:%.*]] = insertelement poison, i1 true, i32 0 +; NO-VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[MASK_HEAD]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[X_HEAD:%.*]] = insertelement poison, i64 [[X:%.*]], i64 0 +; NO-VEC-COMBINE-NEXT: [[X_SPLAT:%.*]] = shufflevector [[X_HEAD]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[Y_HEAD:%.*]] = insertelement poison, i64 [[X]], i64 0 +; NO-VEC-COMBINE-NEXT: [[Y_SPLAT:%.*]] = shufflevector [[Y_HEAD]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[RES:%.*]] = call @llvm.vp.udiv.nxv1i64( [[X_SPLAT]], [[Y_SPLAT]], [[MASK]], i32 4) +; NO-VEC-COMBINE-NEXT: ret [[RES]] ; %mask.head = insertelement poison, i1 -1, i32 0 %mask = shufflevector %mask.head, poison, zeroinitializer @@ -462,15 +573,21 @@ define @udiv_nxv1i64_anymask_knownvl(i64 %x, i64 %y, @srem_nxv1i64_allonesmask_knownvl(i64 %x, i64 %y) { -; ALL-LABEL: @srem_nxv1i64_allonesmask_knownvl( -; ALL-NEXT: [[MASK_HEAD:%.*]] = insertelement poison, i1 true, i32 0 -; ALL-NEXT: [[MASK:%.*]] = shufflevector [[MASK_HEAD]], poison, zeroinitializer -; ALL-NEXT: [[X_HEAD:%.*]] = insertelement poison, i64 [[X:%.*]], i64 0 -; ALL-NEXT: [[X_SPLAT:%.*]] = shufflevector [[X_HEAD]], poison, zeroinitializer -; ALL-NEXT: [[Y_HEAD:%.*]] = insertelement poison, i64 [[X]], i64 0 -; ALL-NEXT: [[Y_SPLAT:%.*]] = shufflevector [[Y_HEAD]], poison, zeroinitializer -; ALL-NEXT: [[RES:%.*]] = call @llvm.vp.srem.nxv1i64( [[X_SPLAT]], [[Y_SPLAT]], [[MASK]], i32 4) -; ALL-NEXT: ret [[RES]] +; VEC-COMBINE-LABEL: @srem_nxv1i64_allonesmask_knownvl( +; VEC-COMBINE-NEXT: [[TMP1:%.*]] = srem i64 [[X:%.*]], [[X]] +; VEC-COMBINE-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-NEXT: [[RES:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-NEXT: ret [[RES]] +; +; NO-VEC-COMBINE-LABEL: @srem_nxv1i64_allonesmask_knownvl( +; NO-VEC-COMBINE-NEXT: [[MASK_HEAD:%.*]] = insertelement poison, i1 true, i32 0 +; NO-VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[MASK_HEAD]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[X_HEAD:%.*]] = insertelement poison, i64 [[X:%.*]], i64 0 +; NO-VEC-COMBINE-NEXT: [[X_SPLAT:%.*]] = shufflevector [[X_HEAD]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[Y_HEAD:%.*]] = insertelement poison, i64 [[X]], i64 0 +; NO-VEC-COMBINE-NEXT: [[Y_SPLAT:%.*]] = shufflevector [[Y_HEAD]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[RES:%.*]] = call @llvm.vp.srem.nxv1i64( [[X_SPLAT]], [[Y_SPLAT]], [[MASK]], i32 4) +; NO-VEC-COMBINE-NEXT: ret [[RES]] ; %mask.head = insertelement poison, i1 -1, i32 0 %mask = shufflevector %mask.head, poison, zeroinitializer @@ -500,15 +617,21 @@ define @srem_nxv1i64_anymask_knownvl(i64 %x, i64 %y, @urem_nxv1i64_allonesmask_knownvl(i64 %x, i64 %y) { -; ALL-LABEL: @urem_nxv1i64_allonesmask_knownvl( -; ALL-NEXT: [[MASK_HEAD:%.*]] = insertelement poison, i1 true, i32 0 -; ALL-NEXT: [[MASK:%.*]] = shufflevector [[MASK_HEAD]], poison, zeroinitializer -; ALL-NEXT: [[X_HEAD:%.*]] = insertelement poison, i64 [[X:%.*]], i64 0 -; ALL-NEXT: [[X_SPLAT:%.*]] = shufflevector [[X_HEAD]], poison, zeroinitializer -; ALL-NEXT: [[Y_HEAD:%.*]] = insertelement poison, i64 [[X]], i64 0 -; ALL-NEXT: [[Y_SPLAT:%.*]] = shufflevector [[Y_HEAD]], poison, zeroinitializer -; ALL-NEXT: [[RES:%.*]] = call @llvm.vp.urem.nxv1i64( [[X_SPLAT]], [[Y_SPLAT]], [[MASK]], i32 4) -; ALL-NEXT: ret [[RES]] +; VEC-COMBINE-LABEL: @urem_nxv1i64_allonesmask_knownvl( +; VEC-COMBINE-NEXT: [[TMP1:%.*]] = urem i64 [[X:%.*]], [[X]] +; VEC-COMBINE-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-NEXT: [[RES:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-NEXT: ret [[RES]] +; +; NO-VEC-COMBINE-LABEL: @urem_nxv1i64_allonesmask_knownvl( +; NO-VEC-COMBINE-NEXT: [[MASK_HEAD:%.*]] = insertelement poison, i1 true, i32 0 +; NO-VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[MASK_HEAD]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[X_HEAD:%.*]] = insertelement poison, i64 [[X:%.*]], i64 0 +; NO-VEC-COMBINE-NEXT: [[X_SPLAT:%.*]] = shufflevector [[X_HEAD]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[Y_HEAD:%.*]] = insertelement poison, i64 [[X]], i64 0 +; NO-VEC-COMBINE-NEXT: [[Y_SPLAT:%.*]] = shufflevector [[Y_HEAD]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[RES:%.*]] = call @llvm.vp.urem.nxv1i64( [[X_SPLAT]], [[Y_SPLAT]], [[MASK]], i32 4) +; NO-VEC-COMBINE-NEXT: ret [[RES]] ; %mask.head = insertelement poison, i1 -1, i32 0 %mask = shufflevector %mask.head, poison, zeroinitializer @@ -538,14 +661,14 @@ define @urem_nxv1i64_anymask_knownvl(i64 %x, i64 %y, @ashr_nxv1i64_allonesmask( %x, i64 %y, i32 zeroext %evl) { -; VEC-COMBINE-LABEL: @ashr_nxv1i64_allonesmask( -; VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 -; VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP1:%.*]] = ashr i64 [[Y:%.*]], 42 -; VEC-COMBINE-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 -; VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) -; VEC-COMBINE-NEXT: ret [[TMP3]] +; VEC-COMBINE-64-LABEL: @ashr_nxv1i64_allonesmask( +; VEC-COMBINE-64-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-64-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP1:%.*]] = ashr i64 [[Y:%.*]], 42 +; VEC-COMBINE-64-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-64-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-64-NEXT: ret [[TMP3]] ; ; NO-VEC-COMBINE-LABEL: @ashr_nxv1i64_allonesmask( ; NO-VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 @@ -555,6 +678,15 @@ define @ashr_nxv1i64_allonesmask( %x, i64 % ; NO-VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.ashr.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) ; NO-VEC-COMBINE-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) ; NO-VEC-COMBINE-NEXT: ret [[TMP4]] +; +; VEC-COMBINE-32-LABEL: @ashr_nxv1i64_allonesmask( +; VEC-COMBINE-32-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-32-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 +; VEC-COMBINE-32-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP3:%.*]] = call @llvm.vp.ashr.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-32-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; VEC-COMBINE-32-NEXT: ret [[TMP4]] ; %splat = insertelement poison, i1 -1, i32 0 %mask = shufflevector %splat, poison, zeroinitializer @@ -581,14 +713,14 @@ define @ashr_nxv1i64_anymask( %x, i64 %y, < } define @lshr_nxv1i64_allonesmask( %x, i64 %y, i32 zeroext %evl) { -; VEC-COMBINE-LABEL: @lshr_nxv1i64_allonesmask( -; VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 -; VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP1:%.*]] = lshr i64 [[Y:%.*]], 42 -; VEC-COMBINE-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 -; VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) -; VEC-COMBINE-NEXT: ret [[TMP3]] +; VEC-COMBINE-64-LABEL: @lshr_nxv1i64_allonesmask( +; VEC-COMBINE-64-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-64-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP1:%.*]] = lshr i64 [[Y:%.*]], 42 +; VEC-COMBINE-64-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-64-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-64-NEXT: ret [[TMP3]] ; ; NO-VEC-COMBINE-LABEL: @lshr_nxv1i64_allonesmask( ; NO-VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 @@ -598,6 +730,15 @@ define @lshr_nxv1i64_allonesmask( %x, i64 % ; NO-VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.lshr.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) ; NO-VEC-COMBINE-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) ; NO-VEC-COMBINE-NEXT: ret [[TMP4]] +; +; VEC-COMBINE-32-LABEL: @lshr_nxv1i64_allonesmask( +; VEC-COMBINE-32-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-32-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 +; VEC-COMBINE-32-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP3:%.*]] = call @llvm.vp.lshr.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-32-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; VEC-COMBINE-32-NEXT: ret [[TMP4]] ; %splat = insertelement poison, i1 -1, i32 0 %mask = shufflevector %splat, poison, zeroinitializer @@ -624,14 +765,14 @@ define @lshr_nxv1i64_anymask( %x, i64 %y, < } define @shl_nxv1i64_allonesmask( %x, i64 %y, i32 zeroext %evl) { -; VEC-COMBINE-LABEL: @shl_nxv1i64_allonesmask( -; VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 -; VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP1:%.*]] = shl i64 [[Y:%.*]], 42 -; VEC-COMBINE-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 -; VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) -; VEC-COMBINE-NEXT: ret [[TMP3]] +; VEC-COMBINE-64-LABEL: @shl_nxv1i64_allonesmask( +; VEC-COMBINE-64-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-64-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP1:%.*]] = shl i64 [[Y:%.*]], 42 +; VEC-COMBINE-64-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-64-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-64-NEXT: ret [[TMP3]] ; ; NO-VEC-COMBINE-LABEL: @shl_nxv1i64_allonesmask( ; NO-VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 @@ -641,6 +782,15 @@ define @shl_nxv1i64_allonesmask( %x, i64 %y ; NO-VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.shl.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) ; NO-VEC-COMBINE-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) ; NO-VEC-COMBINE-NEXT: ret [[TMP4]] +; +; VEC-COMBINE-32-LABEL: @shl_nxv1i64_allonesmask( +; VEC-COMBINE-32-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-32-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 +; VEC-COMBINE-32-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP3:%.*]] = call @llvm.vp.shl.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-32-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; VEC-COMBINE-32-NEXT: ret [[TMP4]] ; %splat = insertelement poison, i1 -1, i32 0 %mask = shufflevector %splat, poison, zeroinitializer @@ -667,14 +817,14 @@ define @shl_nxv1i64_anymask( %x, i64 %y, @or_nxv1i64_allonesmask( %x, i64 %y, i32 zeroext %evl) { -; VEC-COMBINE-LABEL: @or_nxv1i64_allonesmask( -; VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 -; VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP1:%.*]] = or i64 [[Y:%.*]], 42 -; VEC-COMBINE-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 -; VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) -; VEC-COMBINE-NEXT: ret [[TMP3]] +; VEC-COMBINE-64-LABEL: @or_nxv1i64_allonesmask( +; VEC-COMBINE-64-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-64-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP1:%.*]] = or i64 [[Y:%.*]], 42 +; VEC-COMBINE-64-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-64-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-64-NEXT: ret [[TMP3]] ; ; NO-VEC-COMBINE-LABEL: @or_nxv1i64_allonesmask( ; NO-VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 @@ -684,6 +834,15 @@ define @or_nxv1i64_allonesmask( %x, i64 %y, ; NO-VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.or.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) ; NO-VEC-COMBINE-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) ; NO-VEC-COMBINE-NEXT: ret [[TMP4]] +; +; VEC-COMBINE-32-LABEL: @or_nxv1i64_allonesmask( +; VEC-COMBINE-32-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-32-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 +; VEC-COMBINE-32-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP3:%.*]] = call @llvm.vp.or.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-32-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; VEC-COMBINE-32-NEXT: ret [[TMP4]] ; %splat = insertelement poison, i1 -1, i32 0 %mask = shufflevector %splat, poison, zeroinitializer @@ -710,14 +869,14 @@ define @or_nxv1i64_anymask( %x, i64 %y, @and_nxv1i64_allonesmask( %x, i64 %y, i32 zeroext %evl) { -; VEC-COMBINE-LABEL: @and_nxv1i64_allonesmask( -; VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 -; VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP1:%.*]] = and i64 [[Y:%.*]], 42 -; VEC-COMBINE-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 -; VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) -; VEC-COMBINE-NEXT: ret [[TMP3]] +; VEC-COMBINE-64-LABEL: @and_nxv1i64_allonesmask( +; VEC-COMBINE-64-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-64-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP1:%.*]] = and i64 [[Y:%.*]], 42 +; VEC-COMBINE-64-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-64-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-64-NEXT: ret [[TMP3]] ; ; NO-VEC-COMBINE-LABEL: @and_nxv1i64_allonesmask( ; NO-VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 @@ -727,6 +886,15 @@ define @and_nxv1i64_allonesmask( %x, i64 %y ; NO-VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.and.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) ; NO-VEC-COMBINE-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) ; NO-VEC-COMBINE-NEXT: ret [[TMP4]] +; +; VEC-COMBINE-32-LABEL: @and_nxv1i64_allonesmask( +; VEC-COMBINE-32-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-32-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 +; VEC-COMBINE-32-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP3:%.*]] = call @llvm.vp.and.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-32-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; VEC-COMBINE-32-NEXT: ret [[TMP4]] ; %splat = insertelement poison, i1 -1, i32 0 %mask = shufflevector %splat, poison, zeroinitializer @@ -753,14 +921,14 @@ define @and_nxv1i64_anymask( %x, i64 %y, @xor_nxv1i64_allonesmask( %x, i64 %y, i32 zeroext %evl) { -; VEC-COMBINE-LABEL: @xor_nxv1i64_allonesmask( -; VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 -; VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP1:%.*]] = xor i64 [[Y:%.*]], 42 -; VEC-COMBINE-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 -; VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer -; VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) -; VEC-COMBINE-NEXT: ret [[TMP3]] +; VEC-COMBINE-64-LABEL: @xor_nxv1i64_allonesmask( +; VEC-COMBINE-64-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-64-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP1:%.*]] = xor i64 [[Y:%.*]], 42 +; VEC-COMBINE-64-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-64-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP3:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-64-NEXT: ret [[TMP3]] ; ; NO-VEC-COMBINE-LABEL: @xor_nxv1i64_allonesmask( ; NO-VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 @@ -770,6 +938,15 @@ define @xor_nxv1i64_allonesmask( %x, i64 %y ; NO-VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.xor.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) ; NO-VEC-COMBINE-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) ; NO-VEC-COMBINE-NEXT: ret [[TMP4]] +; +; VEC-COMBINE-32-LABEL: @xor_nxv1i64_allonesmask( +; VEC-COMBINE-32-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-32-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP1:%.*]] = insertelement poison, i64 [[Y:%.*]], i64 0 +; VEC-COMBINE-32-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP3:%.*]] = call @llvm.vp.xor.nxv1i64( [[TMP2]], shufflevector ( insertelement ( poison, i64 42, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-32-NEXT: [[TMP4:%.*]] = call @llvm.vp.mul.nxv1i64( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; VEC-COMBINE-32-NEXT: ret [[TMP4]] ; %splat = insertelement poison, i1 -1, i32 0 %mask = shufflevector %splat, poison, zeroinitializer @@ -1082,14 +1259,23 @@ define @fdiv_nxv1f32_anymask( %x, float } define @frem_nxv1f32_allonesmask( %x, float %y, i32 zeroext %evl) { -; ALL-LABEL: @frem_nxv1f32_allonesmask( -; ALL-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 -; ALL-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer -; ALL-NEXT: [[TMP1:%.*]] = insertelement poison, float [[Y:%.*]], i64 0 -; ALL-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer -; ALL-NEXT: [[TMP3:%.*]] = call @llvm.vp.frem.nxv1f32( [[TMP2]], shufflevector ( insertelement ( poison, float 4.200000e+01, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) -; ALL-NEXT: [[TMP4:%.*]] = call @llvm.vp.fadd.nxv1f32( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) -; ALL-NEXT: ret [[TMP4]] +; VEC-COMBINE-LABEL: @frem_nxv1f32_allonesmask( +; VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-NEXT: [[TMP1:%.*]] = frem float [[Y:%.*]], 4.200000e+01 +; VEC-COMBINE-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, float [[TMP1]], i64 0 +; VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.fadd.nxv1f32( [[X:%.*]], [[TMP2]], [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-NEXT: ret [[TMP3]] +; +; NO-VEC-COMBINE-LABEL: @frem_nxv1f32_allonesmask( +; NO-VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; NO-VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[TMP1:%.*]] = insertelement poison, float [[Y:%.*]], i64 0 +; NO-VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.frem.nxv1f32( [[TMP2]], shufflevector ( insertelement ( poison, float 4.200000e+01, i64 0), poison, zeroinitializer), [[MASK]], i32 [[EVL:%.*]]) +; NO-VEC-COMBINE-NEXT: [[TMP4:%.*]] = call @llvm.vp.fadd.nxv1f32( [[X:%.*]], [[TMP3]], [[MASK]], i32 [[EVL]]) +; NO-VEC-COMBINE-NEXT: ret [[TMP4]] ; @@ -1166,14 +1352,23 @@ define @fdiv_nxv1f32_anymask_knownvl( % } define @frem_nxv1f32_allonesmask_knownvl( %x, float %y) { -; ALL-LABEL: @frem_nxv1f32_allonesmask_knownvl( -; ALL-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 -; ALL-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer -; ALL-NEXT: [[TMP1:%.*]] = insertelement poison, float [[Y:%.*]], i64 0 -; ALL-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer -; ALL-NEXT: [[TMP3:%.*]] = call @llvm.vp.frem.nxv1f32( [[TMP2]], shufflevector ( insertelement ( poison, float 4.200000e+01, i64 0), poison, zeroinitializer), [[MASK]], i32 4) -; ALL-NEXT: [[TMP4:%.*]] = call @llvm.vp.fadd.nxv1f32( [[X:%.*]], [[TMP3]], [[MASK]], i32 4) -; ALL-NEXT: ret [[TMP4]] +; VEC-COMBINE-LABEL: @frem_nxv1f32_allonesmask_knownvl( +; VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; VEC-COMBINE-NEXT: [[TMP1:%.*]] = frem float [[Y:%.*]], 4.200000e+01 +; VEC-COMBINE-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, float [[TMP1]], i64 0 +; VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer +; VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.fadd.nxv1f32( [[X:%.*]], [[TMP2]], [[MASK]], i32 4) +; VEC-COMBINE-NEXT: ret [[TMP3]] +; +; NO-VEC-COMBINE-LABEL: @frem_nxv1f32_allonesmask_knownvl( +; NO-VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement poison, i1 true, i32 0 +; NO-VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector [[SPLAT]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[TMP1:%.*]] = insertelement poison, float [[Y:%.*]], i64 0 +; NO-VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector [[TMP1]], poison, zeroinitializer +; NO-VEC-COMBINE-NEXT: [[TMP3:%.*]] = call @llvm.vp.frem.nxv1f32( [[TMP2]], shufflevector ( insertelement ( poison, float 4.200000e+01, i64 0), poison, zeroinitializer), [[MASK]], i32 4) +; NO-VEC-COMBINE-NEXT: [[TMP4:%.*]] = call @llvm.vp.fadd.nxv1f32( [[X:%.*]], [[TMP3]], [[MASK]], i32 4) +; NO-VEC-COMBINE-NEXT: ret [[TMP4]] ; @@ -1417,14 +1612,14 @@ define @fadd_nxv8f16_anymask( %x, half %y } define <1 x i64> @add_v1i64_allonesmask(<1 x i64> %x, i64 %y, i32 zeroext %evl) { -; VEC-COMBINE-LABEL: @add_v1i64_allonesmask( -; VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement <1 x i1> poison, i1 true, i32 0 -; VEC-COMBINE-NEXT: [[MASK:%.*]] = shufflevector <1 x i1> [[SPLAT]], <1 x i1> poison, <1 x i32> zeroinitializer -; VEC-COMBINE-NEXT: [[TMP1:%.*]] = add i64 [[Y:%.*]], 42 -; VEC-COMBINE-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <1 x i64> poison, i64 [[TMP1]], i64 0 -; VEC-COMBINE-NEXT: [[TMP2:%.*]] = shufflevector <1 x i64> [[DOTSPLATINSERT]], <1 x i64> poison, <1 x i32> zeroinitializer -; VEC-COMBINE-NEXT: [[TMP3:%.*]] = call <1 x i64> @llvm.vp.mul.v1i64(<1 x i64> [[X:%.*]], <1 x i64> [[TMP2]], <1 x i1> [[MASK]], i32 [[EVL:%.*]]) -; VEC-COMBINE-NEXT: ret <1 x i64> [[TMP3]] +; VEC-COMBINE-64-LABEL: @add_v1i64_allonesmask( +; VEC-COMBINE-64-NEXT: [[SPLAT:%.*]] = insertelement <1 x i1> poison, i1 true, i32 0 +; VEC-COMBINE-64-NEXT: [[MASK:%.*]] = shufflevector <1 x i1> [[SPLAT]], <1 x i1> poison, <1 x i32> zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP1:%.*]] = add i64 [[Y:%.*]], 42 +; VEC-COMBINE-64-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <1 x i64> poison, i64 [[TMP1]], i64 0 +; VEC-COMBINE-64-NEXT: [[TMP2:%.*]] = shufflevector <1 x i64> [[DOTSPLATINSERT]], <1 x i64> poison, <1 x i32> zeroinitializer +; VEC-COMBINE-64-NEXT: [[TMP3:%.*]] = call <1 x i64> @llvm.vp.mul.v1i64(<1 x i64> [[X:%.*]], <1 x i64> [[TMP2]], <1 x i1> [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-64-NEXT: ret <1 x i64> [[TMP3]] ; ; NO-VEC-COMBINE-LABEL: @add_v1i64_allonesmask( ; NO-VEC-COMBINE-NEXT: [[SPLAT:%.*]] = insertelement <1 x i1> poison, i1 true, i32 0 @@ -1434,6 +1629,15 @@ define <1 x i64> @add_v1i64_allonesmask(<1 x i64> %x, i64 %y, i32 zeroext %evl) ; NO-VEC-COMBINE-NEXT: [[TMP3:%.*]] = call <1 x i64> @llvm.vp.add.v1i64(<1 x i64> [[TMP2]], <1 x i64> , <1 x i1> [[MASK]], i32 [[EVL:%.*]]) ; NO-VEC-COMBINE-NEXT: [[TMP4:%.*]] = call <1 x i64> @llvm.vp.mul.v1i64(<1 x i64> [[X:%.*]], <1 x i64> [[TMP3]], <1 x i1> [[MASK]], i32 [[EVL]]) ; NO-VEC-COMBINE-NEXT: ret <1 x i64> [[TMP4]] +; +; VEC-COMBINE-32-LABEL: @add_v1i64_allonesmask( +; VEC-COMBINE-32-NEXT: [[SPLAT:%.*]] = insertelement <1 x i1> poison, i1 true, i32 0 +; VEC-COMBINE-32-NEXT: [[MASK:%.*]] = shufflevector <1 x i1> [[SPLAT]], <1 x i1> poison, <1 x i32> zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP1:%.*]] = insertelement <1 x i64> poison, i64 [[Y:%.*]], i64 0 +; VEC-COMBINE-32-NEXT: [[TMP2:%.*]] = shufflevector <1 x i64> [[TMP1]], <1 x i64> poison, <1 x i32> zeroinitializer +; VEC-COMBINE-32-NEXT: [[TMP3:%.*]] = call <1 x i64> @llvm.vp.add.v1i64(<1 x i64> [[TMP2]], <1 x i64> , <1 x i1> [[MASK]], i32 [[EVL:%.*]]) +; VEC-COMBINE-32-NEXT: [[TMP4:%.*]] = call <1 x i64> @llvm.vp.mul.v1i64(<1 x i64> [[X:%.*]], <1 x i64> [[TMP3]], <1 x i1> [[MASK]], i32 [[EVL]]) +; VEC-COMBINE-32-NEXT: ret <1 x i64> [[TMP4]] ; %splat = insertelement <1 x i1> poison, i1 -1, i32 0 %mask = shufflevector <1 x i1> %splat, <1 x i1> poison, <1 x i32> zeroinitializer @@ -1501,6 +1705,3 @@ define <4 x i64> @add_v4i64_anymask(<4 x i64> %x, i64 %y, <4 x i1> %mask, i32 ze %4 = call <4 x i64> @llvm.vp.mul.v4i64(<4 x i64> %x, <4 x i64> %3, <4 x i1> %mask, i32 %evl) ret <4 x i64> %4 } -;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: -; VEC-COMBINE-32: {{.*}} -; VEC-COMBINE-64: {{.*}}