[llvm] [LoongArch] Add support for the ud macro instruction (PR #171583)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 10 19:07:53 PST 2025


================
@@ -33,6 +33,13 @@ rdtimeh.w $a7, $a1
 # CHECK-ASM: encoding: [0x03,0x6d,0x00,0x00]
 cpucfg $sp, $a4
 
+# CHECK-ASM-AND-OBJ: ud 0
----------------
heiher wrote:

Now we still allow users to write `amswap.w zero, rk, zero` pattern instruction manually, so I will add a corresponding test case for `amswap.w zero, r1, zero`. There is already a test case for `amswap.w zero, non-r1, zero`:

https://github.com/llvm/llvm-project/blob/main/llvm/test/MC/LoongArch/Basic/Integer/atomic.s#L44-L46



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


More information about the llvm-commits mailing list