diff --git a/llvm/lib/Target/AArch64/SMEInstrFormats.td b/llvm/lib/Target/AArch64/SMEInstrFormats.td index 70f3c2c99f0f0..44d9a8ac7cb67 100644 --- a/llvm/lib/Target/AArch64/SMEInstrFormats.td +++ b/llvm/lib/Target/AArch64/SMEInstrFormats.td @@ -1268,7 +1268,7 @@ multiclass sve2_int_perm_revd { } class sve2_clamp sz, bit U, ZPRRegOp zpr_ty> - : I<(outs zpr_ty:$Zd), (ins zpr_ty:$Zn, zpr_ty:$Zm, zpr_ty:$_Zd), + : I<(outs zpr_ty:$Zd), (ins zpr_ty:$_Zd, zpr_ty:$Zn, zpr_ty:$Zm), asm, "\t$Zd, $Zn, $Zm", "", []>, Sched<[]> { bits<5> Zm; diff --git a/llvm/test/CodeGen/AArch64/sve2-min-max-clamp.ll b/llvm/test/CodeGen/AArch64/sve2-min-max-clamp.ll index 28ec430aff3d3..365fd53454849 100644 --- a/llvm/test/CodeGen/AArch64/sve2-min-max-clamp.ll +++ b/llvm/test/CodeGen/AArch64/sve2-min-max-clamp.ll @@ -3,7 +3,7 @@ ; Replace pattern min(max(v1,v2),v3) by clamp -define @uclampi8( %c, %a, %b) { +define @uclampi8( %a, %b, %c) { ; CHECK-LABEL: uclampi8: ; CHECK: // %bb.0: ; CHECK-NEXT: uclamp z0.b, z1.b, z2.b @@ -13,7 +13,7 @@ define @uclampi8( %c, %a ret %res } -define @uclampi16( %c, %a, %b) { +define @uclampi16( %a, %b, %c) { ; CHECK-LABEL: uclampi16: ; CHECK: // %bb.0: ; CHECK-NEXT: uclamp z0.h, z1.h, z2.h @@ -23,7 +23,7 @@ define @uclampi16( %c, % ret %res } -define @uclampi32( %c, %a, %b) { +define @uclampi32( %a, %b, %c) { ; CHECK-LABEL: uclampi32: ; CHECK: // %bb.0: ; CHECK-NEXT: uclamp z0.s, z1.s, z2.s @@ -33,7 +33,7 @@ define @uclampi32( %c, % ret %res } -define @uclampi64( %c, %a, %b) { +define @uclampi64( %a, %b, %c) { ; CHECK-LABEL: uclampi64: ; CHECK: // %bb.0: ; CHECK-NEXT: uclamp z0.d, z1.d, z2.d @@ -43,7 +43,7 @@ define @uclampi64( %c, % ret %res } -define @sclampi8( %c, %a, %b) { +define @sclampi8( %a, %b, %c) { ; CHECK-LABEL: sclampi8: ; CHECK: // %bb.0: ; CHECK-NEXT: sclamp z0.b, z1.b, z2.b @@ -53,7 +53,7 @@ define @sclampi8( %c, %a ret %res } -define @sclampi16( %c, %a, %b) { +define @sclampi16( %a, %b, %c) { ; CHECK-LABEL: sclampi16: ; CHECK: // %bb.0: ; CHECK-NEXT: sclamp z0.h, z1.h, z2.h @@ -63,7 +63,7 @@ define @sclampi16( %c, % ret %res } -define @sclampi32( %c, %a, %b) { +define @sclampi32( %a, %b, %c) { ; CHECK-LABEL: sclampi32: ; CHECK: // %bb.0: ; CHECK-NEXT: sclamp z0.s, z1.s, z2.s @@ -73,7 +73,7 @@ define @sclampi32( %c, % ret %res } -define @sclampi64( %c, %a, %b) { +define @sclampi64( %a, %b, %c) { ; CHECK-LABEL: sclampi64: ; CHECK: // %bb.0: ; CHECK-NEXT: sclamp z0.d, z1.d, z2.d diff --git a/llvm/test/CodeGen/AArch64/sve2p1-intrinsics-sclamp.ll b/llvm/test/CodeGen/AArch64/sve2p1-intrinsics-sclamp.ll index cf59036d42dbf..912d5d853aa8d 100644 --- a/llvm/test/CodeGen/AArch64/sve2p1-intrinsics-sclamp.ll +++ b/llvm/test/CodeGen/AArch64/sve2p1-intrinsics-sclamp.ll @@ -6,8 +6,7 @@ target triple = "aarch64-linux-gnu" define @test_sclamp_i8( %a, %b, %c) #0 { ; CHECK-LABEL: test_sclamp_i8: ; CHECK: // %bb.0: -; CHECK-NEXT: sclamp z2.b, z0.b, z1.b -; CHECK-NEXT: mov z0.d, z2.d +; CHECK-NEXT: sclamp z0.b, z1.b, z2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sclamp.nxv16i8( %a, %b, %c) ret %res @@ -16,8 +15,7 @@ define @test_sclamp_i8( %a, @test_sclamp_i16( %a, %b, %c) #0 { ; CHECK-LABEL: test_sclamp_i16: ; CHECK: // %bb.0: -; CHECK-NEXT: sclamp z2.h, z0.h, z1.h -; CHECK-NEXT: mov z0.d, z2.d +; CHECK-NEXT: sclamp z0.h, z1.h, z2.h ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sclamp.nxv8i16( %a, %b, %c) ret %res @@ -26,8 +24,7 @@ define @test_sclamp_i16( %a, @test_sclamp_i32( %a, %b, %c) #0 { ; CHECK-LABEL: test_sclamp_i32: ; CHECK: // %bb.0: -; CHECK-NEXT: sclamp z2.s, z0.s, z1.s -; CHECK-NEXT: mov z0.d, z2.d +; CHECK-NEXT: sclamp z0.s, z1.s, z2.s ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sclamp.nxv4i32( %a, %b, %c) ret %res @@ -36,8 +33,7 @@ define @test_sclamp_i32( %a, @test_sclamp_i64( %a, %b, %c) #0 { ; CHECK-LABEL: test_sclamp_i64: ; CHECK: // %bb.0: -; CHECK-NEXT: sclamp z2.d, z0.d, z1.d -; CHECK-NEXT: mov z0.d, z2.d +; CHECK-NEXT: sclamp z0.d, z1.d, z2.d ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sclamp.nxv2i64( %a, %b, %c) ret %res diff --git a/llvm/test/CodeGen/AArch64/sve2p1-intrinsics-uclamp.ll b/llvm/test/CodeGen/AArch64/sve2p1-intrinsics-uclamp.ll index 81a34e82d8450..de1695162c98e 100644 --- a/llvm/test/CodeGen/AArch64/sve2p1-intrinsics-uclamp.ll +++ b/llvm/test/CodeGen/AArch64/sve2p1-intrinsics-uclamp.ll @@ -6,8 +6,7 @@ target triple = "aarch64-linux-gnu" define @test_uclamp_i8( %a, %b, %c) #0 { ; CHECK-LABEL: test_uclamp_i8: ; CHECK: // %bb.0: -; CHECK-NEXT: uclamp z2.b, z0.b, z1.b -; CHECK-NEXT: mov z0.d, z2.d +; CHECK-NEXT: uclamp z0.b, z1.b, z2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.uclamp.nxv16i8( %a, %b, %c) ret %res @@ -16,8 +15,7 @@ define @test_uclamp_i8( %a, @test_uclamp_i16( %a, %b, %c) #0 { ; CHECK-LABEL: test_uclamp_i16: ; CHECK: // %bb.0: -; CHECK-NEXT: uclamp z2.h, z0.h, z1.h -; CHECK-NEXT: mov z0.d, z2.d +; CHECK-NEXT: uclamp z0.h, z1.h, z2.h ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.uclamp.nxv8i16( %a, %b, %c) ret %res @@ -26,8 +24,7 @@ define @test_uclamp_i16( %a, @test_uclamp_i32( %a, %b, %c) #0 { ; CHECK-LABEL: test_uclamp_i32: ; CHECK: // %bb.0: -; CHECK-NEXT: uclamp z2.s, z0.s, z1.s -; CHECK-NEXT: mov z0.d, z2.d +; CHECK-NEXT: uclamp z0.s, z1.s, z2.s ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.uclamp.nxv4i32( %a, %b, %c) ret %res @@ -36,8 +33,7 @@ define @test_uclamp_i32( %a, @test_uclamp_i64( %a, %b, %c) #0 { ; CHECK-LABEL: test_uclamp_i64: ; CHECK: // %bb.0: -; CHECK-NEXT: uclamp z2.d, z0.d, z1.d -; CHECK-NEXT: mov z0.d, z2.d +; CHECK-NEXT: uclamp z0.d, z1.d, z2.d ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.uclamp.nxv2i64( %a, %b, %c) ret %res