diff --git a/llvm/test/CodeGen/AArch64/sve2-intrinsics-binary-narrowing-shr.ll b/llvm/test/CodeGen/AArch64/sve2-intrinsics-binary-narrowing-shr.ll --- a/llvm/test/CodeGen/AArch64/sve2-intrinsics-binary-narrowing-shr.ll +++ b/llvm/test/CodeGen/AArch64/sve2-intrinsics-binary-narrowing-shr.ll @@ -31,6 +31,37 @@ ret %out } +; +; RSHRNB +; + +define @rshrnb_h( %a) { +; CHECK-LABEL: rshrnb_h: +; CHECK: rshrnb z0.b, z0.h, #2 +; CHECK-NEXT: ret + %out = call @llvm.aarch64.sve.rshrnb.nxv8i16( %a, + i32 2) + ret %out +} + +define @rshrnb_s( %a) { +; CHECK-LABEL: rshrnb_s: +; CHECK: rshrnb z0.h, z0.s, #2 +; CHECK-NEXT: ret + %out = call @llvm.aarch64.sve.rshrnb.nxv4i32( %a, + i32 2) + ret %out +} + +define @rshrnb_d( %a) { +; CHECK-LABEL: rshrnb_d: +; CHECK: rshrnb z0.s, z0.d, #2 +; CHECK-NEXT: ret + %out = call @llvm.aarch64.sve.rshrnb.nxv2i64( %a, + i32 2) + ret %out +} + ; ; UQSHRNB ; @@ -251,6 +282,40 @@ ret %out } +; +; RSHRNT +; + +define @rshrnt_h( %a, %b) { +; CHECK-LABEL: rshrnt_h: +; CHECK: rshrnt z0.b, z1.h, #1 +; CHECK-NEXT: ret + %out = call @llvm.aarch64.sve.rshrnt.nxv8i16( %a, + %b, + i32 1) + ret %out +} + +define @rshrnt_s( %a, %b) { +; CHECK-LABEL: rshrnt_s: +; CHECK: rshrnt z0.h, z1.s, #5 +; CHECK-NEXT: ret + %out = call @llvm.aarch64.sve.rshrnt.nxv4i32( %a, + %b, + i32 5) + ret %out +} + +define @rshrnt_d( %a, %b) { +; CHECK-LABEL: rshrnt_d: +; CHECK: rshrnt z0.s, z1.d, #5 +; CHECK-NEXT: ret + %out = call @llvm.aarch64.sve.rshrnt.nxv2i64( %a, + %b, + i32 5) + ret %out +} + ; ; UQSHRNT ; @@ -459,6 +524,10 @@ declare @llvm.aarch64.sve.shrnb.nxv4i32(, i32) declare @llvm.aarch64.sve.shrnb.nxv2i64(, i32) +declare @llvm.aarch64.sve.rshrnb.nxv8i16(, i32) +declare @llvm.aarch64.sve.rshrnb.nxv4i32(, i32) +declare @llvm.aarch64.sve.rshrnb.nxv2i64(, i32) + declare @llvm.aarch64.sve.uqshrnb.nxv8i16(, i32) declare @llvm.aarch64.sve.uqshrnb.nxv4i32(, i32) declare @llvm.aarch64.sve.uqshrnb.nxv2i64(, i32) @@ -487,6 +556,10 @@ declare @llvm.aarch64.sve.shrnt.nxv4i32(, , i32) declare @llvm.aarch64.sve.shrnt.nxv2i64(, , i32) +declare @llvm.aarch64.sve.rshrnt.nxv8i16(, , i32) +declare @llvm.aarch64.sve.rshrnt.nxv4i32(, , i32) +declare @llvm.aarch64.sve.rshrnt.nxv2i64(, , i32) + declare @llvm.aarch64.sve.uqshrnt.nxv8i16(, , i32) declare @llvm.aarch64.sve.uqshrnt.nxv4i32(, , i32) declare @llvm.aarch64.sve.uqshrnt.nxv2i64(, , i32)