[llvm] [AArch64] fix copy from GPR32 to FPR16 (PR #176594)

Folkert de Vries via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 22 11:05:43 PST 2026


================
@@ -8,3 +9,28 @@ define void @test_asm() {
   call void asm sideeffect "mov x0, $0", "r"(i64 42)
   ret void
 }
+
+; regression test for https://github.com/llvm/llvm-project/issues/79822
+define i16 @test_16bit_reg(i16 %x) {
+; CHECK-LABEL: test_16bit_reg
+; CHECK: fmov s0, w0 
+; CHECK: fmov w0, s0 
+  %ret = call i16 asm "", "=&{h0},0"(i16 %x)
+  ret i16 %ret
+}
----------------
folkertdev wrote:

@arsenm I moved these over (and they now run with `-O0` and `-O1`. Did you have anything more in mind? it's not really obvious based on this test what that would be.

https://github.com/llvm/llvm-project/pull/176594


More information about the llvm-commits mailing list