diff --git a/llvm/test/MC/LoongArch/lasx/absd.s b/llvm/test/MC/LoongArch/lasx/absd.s new file mode 100644 index 00000000000000..9ac1bece8780b0 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/absd.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvabsd.b $xr22, $xr1, $xr17 +# CHECK-INST: xvabsd.b $xr22, $xr1, $xr17 +# CHECK-ENCODING: encoding: [0x36,0x44,0x60,0x74] + +xvabsd.h $xr17, $xr24, $xr9 +# CHECK-INST: xvabsd.h $xr17, $xr24, $xr9 +# CHECK-ENCODING: encoding: [0x11,0xa7,0x60,0x74] + +xvabsd.w $xr28, $xr9, $xr29 +# CHECK-INST: xvabsd.w $xr28, $xr9, $xr29 +# CHECK-ENCODING: encoding: [0x3c,0x75,0x61,0x74] + +xvabsd.d $xr30, $xr23, $xr19 +# CHECK-INST: xvabsd.d $xr30, $xr23, $xr19 +# CHECK-ENCODING: encoding: [0xfe,0xce,0x61,0x74] + +xvabsd.bu $xr16, $xr4, $xr15 +# CHECK-INST: xvabsd.bu $xr16, $xr4, $xr15 +# CHECK-ENCODING: encoding: [0x90,0x3c,0x62,0x74] + +xvabsd.hu $xr13, $xr23, $xr27 +# CHECK-INST: xvabsd.hu $xr13, $xr23, $xr27 +# CHECK-ENCODING: encoding: [0xed,0xee,0x62,0x74] + +xvabsd.wu $xr31, $xr18, $xr15 +# CHECK-INST: xvabsd.wu $xr31, $xr18, $xr15 +# CHECK-ENCODING: encoding: [0x5f,0x3e,0x63,0x74] + +xvabsd.du $xr26, $xr10, $xr4 +# CHECK-INST: xvabsd.du $xr26, $xr10, $xr4 +# CHECK-ENCODING: encoding: [0x5a,0x91,0x63,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/add.s b/llvm/test/MC/LoongArch/lasx/add.s new file mode 100644 index 00000000000000..b7f92ef826ec9c --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/add.s @@ -0,0 +1,24 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvadd.b $xr20, $xr19, $xr5 +# CHECK-INST: xvadd.b $xr20, $xr19, $xr5 +# CHECK-ENCODING: encoding: [0x74,0x16,0x0a,0x74] + +xvadd.h $xr24, $xr7, $xr14 +# CHECK-INST: xvadd.h $xr24, $xr7, $xr14 +# CHECK-ENCODING: encoding: [0xf8,0xb8,0x0a,0x74] + +xvadd.w $xr19, $xr1, $xr21 +# CHECK-INST: xvadd.w $xr19, $xr1, $xr21 +# CHECK-ENCODING: encoding: [0x33,0x54,0x0b,0x74] + +xvadd.d $xr19, $xr6, $xr13 +# CHECK-INST: xvadd.d $xr19, $xr6, $xr13 +# CHECK-ENCODING: encoding: [0xd3,0xb4,0x0b,0x74] + +xvadd.q $xr4, $xr28, $xr6 +# CHECK-INST: xvadd.q $xr4, $xr28, $xr6 +# CHECK-ENCODING: encoding: [0x84,0x1b,0x2d,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/adda.s b/llvm/test/MC/LoongArch/lasx/adda.s new file mode 100644 index 00000000000000..849c560173b6cf --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/adda.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvadda.b $xr10, $xr24, $xr27 +# CHECK-INST: xvadda.b $xr10, $xr24, $xr27 +# CHECK-ENCODING: encoding: [0x0a,0x6f,0x5c,0x74] + +xvadda.h $xr0, $xr28, $xr29 +# CHECK-INST: xvadda.h $xr0, $xr28, $xr29 +# CHECK-ENCODING: encoding: [0x80,0xf7,0x5c,0x74] + +xvadda.w $xr31, $xr9, $xr9 +# CHECK-INST: xvadda.w $xr31, $xr9, $xr9 +# CHECK-ENCODING: encoding: [0x3f,0x25,0x5d,0x74] + +xvadda.d $xr10, $xr1, $xr25 +# CHECK-INST: xvadda.d $xr10, $xr1, $xr25 +# CHECK-ENCODING: encoding: [0x2a,0xe4,0x5d,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/addi.s b/llvm/test/MC/LoongArch/lasx/addi.s new file mode 100644 index 00000000000000..0bd5cd96562643 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/addi.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvaddi.bu $xr1, $xr22, 2 +# CHECK-INST: xvaddi.bu $xr1, $xr22, 2 +# CHECK-ENCODING: encoding: [0xc1,0x0a,0x8a,0x76] + +xvaddi.hu $xr3, $xr10, 29 +# CHECK-INST: xvaddi.hu $xr3, $xr10, 29 +# CHECK-ENCODING: encoding: [0x43,0xf5,0x8a,0x76] + +xvaddi.wu $xr5, $xr11, 3 +# CHECK-INST: xvaddi.wu $xr5, $xr11, 3 +# CHECK-ENCODING: encoding: [0x65,0x0d,0x8b,0x76] + +xvaddi.du $xr6, $xr0, 7 +# CHECK-INST: xvaddi.du $xr6, $xr0, 7 +# CHECK-ENCODING: encoding: [0x06,0x9c,0x8b,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/addw.s b/llvm/test/MC/LoongArch/lasx/addw.s new file mode 100644 index 00000000000000..c9fb22a70f09f7 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/addw.s @@ -0,0 +1,100 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvaddwev.h.b $xr23, $xr30, $xr4 +# CHECK-INST: xvaddwev.h.b $xr23, $xr30, $xr4 +# CHECK-ENCODING: encoding: [0xd7,0x13,0x1e,0x74] + +xvaddwev.w.h $xr20, $xr19, $xr31 +# CHECK-INST: xvaddwev.w.h $xr20, $xr19, $xr31 +# CHECK-ENCODING: encoding: [0x74,0xfe,0x1e,0x74] + +xvaddwev.d.w $xr8, $xr9, $xr25 +# CHECK-INST: xvaddwev.d.w $xr8, $xr9, $xr25 +# CHECK-ENCODING: encoding: [0x28,0x65,0x1f,0x74] + +xvaddwev.q.d $xr29, $xr22, $xr29 +# CHECK-INST: xvaddwev.q.d $xr29, $xr22, $xr29 +# CHECK-ENCODING: encoding: [0xdd,0xf6,0x1f,0x74] + +xvaddwev.h.bu $xr30, $xr13, $xr26 +# CHECK-INST: xvaddwev.h.bu $xr30, $xr13, $xr26 +# CHECK-ENCODING: encoding: [0xbe,0x69,0x2e,0x74] + +xvaddwev.w.hu $xr15, $xr31, $xr16 +# CHECK-INST: xvaddwev.w.hu $xr15, $xr31, $xr16 +# CHECK-ENCODING: encoding: [0xef,0xc3,0x2e,0x74] + +xvaddwev.d.wu $xr16, $xr16, $xr20 +# CHECK-INST: xvaddwev.d.wu $xr16, $xr16, $xr20 +# CHECK-ENCODING: encoding: [0x10,0x52,0x2f,0x74] + +xvaddwev.q.du $xr10, $xr18, $xr18 +# CHECK-INST: xvaddwev.q.du $xr10, $xr18, $xr18 +# CHECK-ENCODING: encoding: [0x4a,0xca,0x2f,0x74] + +xvaddwev.h.bu.b $xr3, $xr7, $xr9 +# CHECK-INST: xvaddwev.h.bu.b $xr3, $xr7, $xr9 +# CHECK-ENCODING: encoding: [0xe3,0x24,0x3e,0x74] + +xvaddwev.w.hu.h $xr26, $xr16, $xr27 +# CHECK-INST: xvaddwev.w.hu.h $xr26, $xr16, $xr27 +# CHECK-ENCODING: encoding: [0x1a,0xee,0x3e,0x74] + +xvaddwev.d.wu.w $xr0, $xr13, $xr8 +# CHECK-INST: xvaddwev.d.wu.w $xr0, $xr13, $xr8 +# CHECK-ENCODING: encoding: [0xa0,0x21,0x3f,0x74] + +xvaddwev.q.du.d $xr19, $xr10, $xr3 +# CHECK-INST: xvaddwev.q.du.d $xr19, $xr10, $xr3 +# CHECK-ENCODING: encoding: [0x53,0x8d,0x3f,0x74] + +xvaddwod.h.b $xr14, $xr21, $xr24 +# CHECK-INST: xvaddwod.h.b $xr14, $xr21, $xr24 +# CHECK-ENCODING: encoding: [0xae,0x62,0x22,0x74] + +xvaddwod.w.h $xr19, $xr26, $xr23 +# CHECK-INST: xvaddwod.w.h $xr19, $xr26, $xr23 +# CHECK-ENCODING: encoding: [0x53,0xdf,0x22,0x74] + +xvaddwod.d.w $xr12, $xr9, $xr20 +# CHECK-INST: xvaddwod.d.w $xr12, $xr9, $xr20 +# CHECK-ENCODING: encoding: [0x2c,0x51,0x23,0x74] + +xvaddwod.q.d $xr11, $xr2, $xr8 +# CHECK-INST: xvaddwod.q.d $xr11, $xr2, $xr8 +# CHECK-ENCODING: encoding: [0x4b,0xa0,0x23,0x74] + +xvaddwod.h.bu $xr6, $xr6, $xr9 +# CHECK-INST: xvaddwod.h.bu $xr6, $xr6, $xr9 +# CHECK-ENCODING: encoding: [0xc6,0x24,0x32,0x74] + +xvaddwod.w.hu $xr1, $xr27, $xr25 +# CHECK-INST: xvaddwod.w.hu $xr1, $xr27, $xr25 +# CHECK-ENCODING: encoding: [0x61,0xe7,0x32,0x74] + +xvaddwod.d.wu $xr26, $xr19, $xr11 +# CHECK-INST: xvaddwod.d.wu $xr26, $xr19, $xr11 +# CHECK-ENCODING: encoding: [0x7a,0x2e,0x33,0x74] + +xvaddwod.q.du $xr21, $xr22, $xr8 +# CHECK-INST: xvaddwod.q.du $xr21, $xr22, $xr8 +# CHECK-ENCODING: encoding: [0xd5,0xa2,0x33,0x74] + +xvaddwod.h.bu.b $xr21, $xr26, $xr24 +# CHECK-INST: xvaddwod.h.bu.b $xr21, $xr26, $xr24 +# CHECK-ENCODING: encoding: [0x55,0x63,0x40,0x74] + +xvaddwod.w.hu.h $xr31, $xr6, $xr16 +# CHECK-INST: xvaddwod.w.hu.h $xr31, $xr6, $xr16 +# CHECK-ENCODING: encoding: [0xdf,0xc0,0x40,0x74] + +xvaddwod.d.wu.w $xr12, $xr28, $xr31 +# CHECK-INST: xvaddwod.d.wu.w $xr12, $xr28, $xr31 +# CHECK-ENCODING: encoding: [0x8c,0x7f,0x41,0x74] + +xvaddwod.q.du.d $xr29, $xr4, $xr12 +# CHECK-INST: xvaddwod.q.du.d $xr29, $xr4, $xr12 +# CHECK-ENCODING: encoding: [0x9d,0xb0,0x41,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/and.s b/llvm/test/MC/LoongArch/lasx/and.s new file mode 100644 index 00000000000000..8c865d3424e087 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/and.s @@ -0,0 +1,8 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvand.v $xr14, $xr23, $xr19 +# CHECK-INST: xvand.v $xr14, $xr23, $xr19 +# CHECK-ENCODING: encoding: [0xee,0x4e,0x26,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/andi.s b/llvm/test/MC/LoongArch/lasx/andi.s new file mode 100644 index 00000000000000..6f198dcfd9e5bd --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/andi.s @@ -0,0 +1,8 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvandi.b $xr11, $xr7, 66 +# CHECK-INST: xvandi.b $xr11, $xr7, 66 +# CHECK-ENCODING: encoding: [0xeb,0x08,0xd1,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/andn.s b/llvm/test/MC/LoongArch/lasx/andn.s new file mode 100644 index 00000000000000..815ecc3732042e --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/andn.s @@ -0,0 +1,8 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvandn.v $xr3, $xr15, $xr3 +# CHECK-INST: xvandn.v $xr3, $xr15, $xr3 +# CHECK-ENCODING: encoding: [0xe3,0x0d,0x28,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/avg.s b/llvm/test/MC/LoongArch/lasx/avg.s new file mode 100644 index 00000000000000..cdb2bd8cfde115 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/avg.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvavg.b $xr5, $xr30, $xr21 +# CHECK-INST: xvavg.b $xr5, $xr30, $xr21 +# CHECK-ENCODING: encoding: [0xc5,0x57,0x64,0x74] + +xvavg.h $xr18, $xr17, $xr21 +# CHECK-INST: xvavg.h $xr18, $xr17, $xr21 +# CHECK-ENCODING: encoding: [0x32,0xd6,0x64,0x74] + +xvavg.w $xr3, $xr23, $xr20 +# CHECK-INST: xvavg.w $xr3, $xr23, $xr20 +# CHECK-ENCODING: encoding: [0xe3,0x52,0x65,0x74] + +xvavg.d $xr27, $xr0, $xr27 +# CHECK-INST: xvavg.d $xr27, $xr0, $xr27 +# CHECK-ENCODING: encoding: [0x1b,0xec,0x65,0x74] + +xvavg.bu $xr11, $xr4, $xr16 +# CHECK-INST: xvavg.bu $xr11, $xr4, $xr16 +# CHECK-ENCODING: encoding: [0x8b,0x40,0x66,0x74] + +xvavg.hu $xr2, $xr1, $xr19 +# CHECK-INST: xvavg.hu $xr2, $xr1, $xr19 +# CHECK-ENCODING: encoding: [0x22,0xcc,0x66,0x74] + +xvavg.wu $xr27, $xr20, $xr27 +# CHECK-INST: xvavg.wu $xr27, $xr20, $xr27 +# CHECK-ENCODING: encoding: [0x9b,0x6e,0x67,0x74] + +xvavg.du $xr23, $xr20, $xr29 +# CHECK-INST: xvavg.du $xr23, $xr20, $xr29 +# CHECK-ENCODING: encoding: [0x97,0xf6,0x67,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/avgr.s b/llvm/test/MC/LoongArch/lasx/avgr.s new file mode 100644 index 00000000000000..f28a48d249ef17 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/avgr.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvavgr.b $xr29, $xr15, $xr7 +# CHECK-INST: xvavgr.b $xr29, $xr15, $xr7 +# CHECK-ENCODING: encoding: [0xfd,0x1d,0x68,0x74] + +xvavgr.h $xr0, $xr26, $xr15 +# CHECK-INST: xvavgr.h $xr0, $xr26, $xr15 +# CHECK-ENCODING: encoding: [0x40,0xbf,0x68,0x74] + +xvavgr.w $xr23, $xr0, $xr0 +# CHECK-INST: xvavgr.w $xr23, $xr0, $xr0 +# CHECK-ENCODING: encoding: [0x17,0x00,0x69,0x74] + +xvavgr.d $xr29, $xr23, $xr0 +# CHECK-INST: xvavgr.d $xr29, $xr23, $xr0 +# CHECK-ENCODING: encoding: [0xfd,0x82,0x69,0x74] + +xvavgr.bu $xr22, $xr2, $xr25 +# CHECK-INST: xvavgr.bu $xr22, $xr2, $xr25 +# CHECK-ENCODING: encoding: [0x56,0x64,0x6a,0x74] + +xvavgr.hu $xr25, $xr10, $xr21 +# CHECK-INST: xvavgr.hu $xr25, $xr10, $xr21 +# CHECK-ENCODING: encoding: [0x59,0xd5,0x6a,0x74] + +xvavgr.wu $xr17, $xr14, $xr3 +# CHECK-INST: xvavgr.wu $xr17, $xr14, $xr3 +# CHECK-ENCODING: encoding: [0xd1,0x0d,0x6b,0x74] + +xvavgr.du $xr2, $xr11, $xr13 +# CHECK-INST: xvavgr.du $xr2, $xr11, $xr13 +# CHECK-ENCODING: encoding: [0x62,0xb5,0x6b,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/bitclr.s b/llvm/test/MC/LoongArch/lasx/bitclr.s new file mode 100644 index 00000000000000..5cb47cdf3616cf --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/bitclr.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvbitclr.b $xr24, $xr5, $xr14 +# CHECK-INST: xvbitclr.b $xr24, $xr5, $xr14 +# CHECK-ENCODING: encoding: [0xb8,0x38,0x0c,0x75] + +xvbitclr.h $xr30, $xr9, $xr13 +# CHECK-INST: xvbitclr.h $xr30, $xr9, $xr13 +# CHECK-ENCODING: encoding: [0x3e,0xb5,0x0c,0x75] + +xvbitclr.w $xr2, $xr3, $xr7 +# CHECK-INST: xvbitclr.w $xr2, $xr3, $xr7 +# CHECK-ENCODING: encoding: [0x62,0x1c,0x0d,0x75] + +xvbitclr.d $xr14, $xr5, $xr25 +# CHECK-INST: xvbitclr.d $xr14, $xr5, $xr25 +# CHECK-ENCODING: encoding: [0xae,0xe4,0x0d,0x75] + +xvbitclri.b $xr22, $xr26, 7 +# CHECK-INST: xvbitclri.b $xr22, $xr26, 7 +# CHECK-ENCODING: encoding: [0x56,0x3f,0x10,0x77] + +xvbitclri.h $xr2, $xr14, 13 +# CHECK-INST: xvbitclri.h $xr2, $xr14, 13 +# CHECK-ENCODING: encoding: [0xc2,0x75,0x10,0x77] + +xvbitclri.w $xr3, $xr2, 0 +# CHECK-INST: xvbitclri.w $xr3, $xr2, 0 +# CHECK-ENCODING: encoding: [0x43,0x80,0x10,0x77] + +xvbitclri.d $xr10, $xr12, 7 +# CHECK-INST: xvbitclri.d $xr10, $xr12, 7 +# CHECK-ENCODING: encoding: [0x8a,0x1d,0x11,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/bitrev.s b/llvm/test/MC/LoongArch/lasx/bitrev.s new file mode 100644 index 00000000000000..aab31cd9dc5d3d --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/bitrev.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvbitrev.b $xr16, $xr20, $xr3 +# CHECK-INST: xvbitrev.b $xr16, $xr20, $xr3 +# CHECK-ENCODING: encoding: [0x90,0x0e,0x10,0x75] + +xvbitrev.h $xr16, $xr3, $xr20 +# CHECK-INST: xvbitrev.h $xr16, $xr3, $xr20 +# CHECK-ENCODING: encoding: [0x70,0xd0,0x10,0x75] + +xvbitrev.w $xr24, $xr26, $xr23 +# CHECK-INST: xvbitrev.w $xr24, $xr26, $xr23 +# CHECK-ENCODING: encoding: [0x58,0x5f,0x11,0x75] + +xvbitrev.d $xr13, $xr1, $xr27 +# CHECK-INST: xvbitrev.d $xr13, $xr1, $xr27 +# CHECK-ENCODING: encoding: [0x2d,0xec,0x11,0x75] + +xvbitrevi.b $xr7, $xr11, 5 +# CHECK-INST: xvbitrevi.b $xr7, $xr11, 5 +# CHECK-ENCODING: encoding: [0x67,0x35,0x18,0x77] + +xvbitrevi.h $xr1, $xr5, 15 +# CHECK-INST: xvbitrevi.h $xr1, $xr5, 15 +# CHECK-ENCODING: encoding: [0xa1,0x7c,0x18,0x77] + +xvbitrevi.w $xr13, $xr21, 18 +# CHECK-INST: xvbitrevi.w $xr13, $xr21, 18 +# CHECK-ENCODING: encoding: [0xad,0xca,0x18,0x77] + +xvbitrevi.d $xr1, $xr3, 9 +# CHECK-INST: xvbitrevi.d $xr1, $xr3, 9 +# CHECK-ENCODING: encoding: [0x61,0x24,0x19,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/bitsel.s b/llvm/test/MC/LoongArch/lasx/bitsel.s new file mode 100644 index 00000000000000..e61a4c277f6b3c --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/bitsel.s @@ -0,0 +1,8 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvbitsel.v $xr18, $xr29, $xr15, $xr21 +# CHECK-INST: xvbitsel.v $xr18, $xr29, $xr15, $xr21 +# CHECK-ENCODING: encoding: [0xb2,0xbf,0x2a,0x0d] diff --git a/llvm/test/MC/LoongArch/lasx/bitseli.s b/llvm/test/MC/LoongArch/lasx/bitseli.s new file mode 100644 index 00000000000000..18212e9966de0c --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/bitseli.s @@ -0,0 +1,8 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvbitseli.b $xr13, $xr21, 121 +# CHECK-INST: xvbitseli.b $xr13, $xr21, 121 +# CHECK-ENCODING: encoding: [0xad,0xe6,0xc5,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/bitset.s b/llvm/test/MC/LoongArch/lasx/bitset.s new file mode 100644 index 00000000000000..65eaef758520c0 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/bitset.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvbitset.b $xr6, $xr16, $xr28 +# CHECK-INST: xvbitset.b $xr6, $xr16, $xr28 +# CHECK-ENCODING: encoding: [0x06,0x72,0x0e,0x75] + +xvbitset.h $xr5, $xr13, $xr31 +# CHECK-INST: xvbitset.h $xr5, $xr13, $xr31 +# CHECK-ENCODING: encoding: [0xa5,0xfd,0x0e,0x75] + +xvbitset.w $xr7, $xr28, $xr8 +# CHECK-INST: xvbitset.w $xr7, $xr28, $xr8 +# CHECK-ENCODING: encoding: [0x87,0x23,0x0f,0x75] + +xvbitset.d $xr4, $xr16, $xr12 +# CHECK-INST: xvbitset.d $xr4, $xr16, $xr12 +# CHECK-ENCODING: encoding: [0x04,0xb2,0x0f,0x75] + +xvbitseti.b $xr26, $xr3, 0 +# CHECK-INST: xvbitseti.b $xr26, $xr3, 0 +# CHECK-ENCODING: encoding: [0x7a,0x20,0x14,0x77] + +xvbitseti.h $xr9, $xr19, 9 +# CHECK-INST: xvbitseti.h $xr9, $xr19, 9 +# CHECK-ENCODING: encoding: [0x69,0x66,0x14,0x77] + +xvbitseti.w $xr12, $xr19, 2 +# CHECK-INST: xvbitseti.w $xr12, $xr19, 2 +# CHECK-ENCODING: encoding: [0x6c,0x8a,0x14,0x77] + +xvbitseti.d $xr20, $xr7, 2 +# CHECK-INST: xvbitseti.d $xr20, $xr7, 2 +# CHECK-ENCODING: encoding: [0xf4,0x08,0x15,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/bsll.s b/llvm/test/MC/LoongArch/lasx/bsll.s new file mode 100644 index 00000000000000..3eb829748528ea --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/bsll.s @@ -0,0 +1,8 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvbsll.v $xr14, $xr21, 20 +# CHECK-INST: xvbsll.v $xr14, $xr21, 20 +# CHECK-ENCODING: encoding: [0xae,0x52,0x8e,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/bsrl.s b/llvm/test/MC/LoongArch/lasx/bsrl.s new file mode 100644 index 00000000000000..5481ca24f12c5f --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/bsrl.s @@ -0,0 +1,8 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvbsrl.v $xr4, $xr5, 29 +# CHECK-INST: xvbsrl.v $xr4, $xr5, 29 +# CHECK-ENCODING: encoding: [0xa4,0xf4,0x8e,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/clo.s b/llvm/test/MC/LoongArch/lasx/clo.s new file mode 100644 index 00000000000000..5b2b093de3448b --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/clo.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvclo.b $xr9, $xr12 +# CHECK-INST: xvclo.b $xr9, $xr12 +# CHECK-ENCODING: encoding: [0x89,0x01,0x9c,0x76] + +xvclo.h $xr16, $xr14 +# CHECK-INST: xvclo.h $xr16, $xr14 +# CHECK-ENCODING: encoding: [0xd0,0x05,0x9c,0x76] + +xvclo.w $xr30, $xr18 +# CHECK-INST: xvclo.w $xr30, $xr18 +# CHECK-ENCODING: encoding: [0x5e,0x0a,0x9c,0x76] + +xvclo.d $xr31, $xr5 +# CHECK-INST: xvclo.d $xr31, $xr5 +# CHECK-ENCODING: encoding: [0xbf,0x0c,0x9c,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/clz.s b/llvm/test/MC/LoongArch/lasx/clz.s new file mode 100644 index 00000000000000..b61b9193a16ba2 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/clz.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvclz.b $xr5, $xr6 +# CHECK-INST: xvclz.b $xr5, $xr6 +# CHECK-ENCODING: encoding: [0xc5,0x10,0x9c,0x76] + +xvclz.h $xr4, $xr7 +# CHECK-INST: xvclz.h $xr4, $xr7 +# CHECK-ENCODING: encoding: [0xe4,0x14,0x9c,0x76] + +xvclz.w $xr12, $xr0 +# CHECK-INST: xvclz.w $xr12, $xr0 +# CHECK-ENCODING: encoding: [0x0c,0x18,0x9c,0x76] + +xvclz.d $xr1, $xr0 +# CHECK-INST: xvclz.d $xr1, $xr0 +# CHECK-ENCODING: encoding: [0x01,0x1c,0x9c,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/div.s b/llvm/test/MC/LoongArch/lasx/div.s new file mode 100644 index 00000000000000..c2d721d8159743 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/div.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvdiv.b $xr9, $xr25, $xr8 +# CHECK-INST: xvdiv.b $xr9, $xr25, $xr8 +# CHECK-ENCODING: encoding: [0x29,0x23,0xe0,0x74] + +xvdiv.h $xr18, $xr1, $xr27 +# CHECK-INST: xvdiv.h $xr18, $xr1, $xr27 +# CHECK-ENCODING: encoding: [0x32,0xec,0xe0,0x74] + +xvdiv.w $xr5, $xr26, $xr27 +# CHECK-INST: xvdiv.w $xr5, $xr26, $xr27 +# CHECK-ENCODING: encoding: [0x45,0x6f,0xe1,0x74] + +xvdiv.d $xr27, $xr26, $xr12 +# CHECK-INST: xvdiv.d $xr27, $xr26, $xr12 +# CHECK-ENCODING: encoding: [0x5b,0xb3,0xe1,0x74] + +xvdiv.bu $xr0, $xr22, $xr30 +# CHECK-INST: xvdiv.bu $xr0, $xr22, $xr30 +# CHECK-ENCODING: encoding: [0xc0,0x7a,0xe4,0x74] + +xvdiv.hu $xr31, $xr23, $xr25 +# CHECK-INST: xvdiv.hu $xr31, $xr23, $xr25 +# CHECK-ENCODING: encoding: [0xff,0xe6,0xe4,0x74] + +xvdiv.wu $xr1, $xr25, $xr7 +# CHECK-INST: xvdiv.wu $xr1, $xr25, $xr7 +# CHECK-ENCODING: encoding: [0x21,0x1f,0xe5,0x74] + +xvdiv.du $xr7, $xr25, $xr7 +# CHECK-INST: xvdiv.du $xr7, $xr25, $xr7 +# CHECK-ENCODING: encoding: [0x27,0x9f,0xe5,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/ext2xv.s b/llvm/test/MC/LoongArch/lasx/ext2xv.s new file mode 100644 index 00000000000000..98310657d6dda1 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/ext2xv.s @@ -0,0 +1,52 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +vext2xv.h.b $xr30, $xr19 +# CHECK-INST: vext2xv.h.b $xr30, $xr19 +# CHECK-ENCODING: encoding: [0x7e,0x12,0x9f,0x76] + +vext2xv.w.b $xr27, $xr5 +# CHECK-INST: vext2xv.w.b $xr27, $xr5 +# CHECK-ENCODING: encoding: [0xbb,0x14,0x9f,0x76] + +vext2xv.d.b $xr25, $xr25 +# CHECK-INST: vext2xv.d.b $xr25, $xr25 +# CHECK-ENCODING: encoding: [0x39,0x1b,0x9f,0x76] + +vext2xv.w.h $xr20, $xr20 +# CHECK-INST: vext2xv.w.h $xr20, $xr20 +# CHECK-ENCODING: encoding: [0x94,0x1e,0x9f,0x76] + +vext2xv.d.h $xr8, $xr19 +# CHECK-INST: vext2xv.d.h $xr8, $xr19 +# CHECK-ENCODING: encoding: [0x68,0x22,0x9f,0x76] + +vext2xv.d.w $xr4, $xr25 +# CHECK-INST: vext2xv.d.w $xr4, $xr25 +# CHECK-ENCODING: encoding: [0x24,0x27,0x9f,0x76] + +vext2xv.hu.bu $xr25, $xr12 +# CHECK-INST: vext2xv.hu.bu $xr25, $xr12 +# CHECK-ENCODING: encoding: [0x99,0x29,0x9f,0x76] + +vext2xv.wu.bu $xr31, $xr13 +# CHECK-INST: vext2xv.wu.bu $xr31, $xr13 +# CHECK-ENCODING: encoding: [0xbf,0x2d,0x9f,0x76] + +vext2xv.du.bu $xr12, $xr25 +# CHECK-INST: vext2xv.du.bu $xr12, $xr25 +# CHECK-ENCODING: encoding: [0x2c,0x33,0x9f,0x76] + +vext2xv.wu.hu $xr23, $xr12 +# CHECK-INST: vext2xv.wu.hu $xr23, $xr12 +# CHECK-ENCODING: encoding: [0x97,0x35,0x9f,0x76] + +vext2xv.du.hu $xr18, $xr6 +# CHECK-INST: vext2xv.du.hu $xr18, $xr6 +# CHECK-ENCODING: encoding: [0xd2,0x38,0x9f,0x76] + +vext2xv.du.wu $xr10, $xr21 +# CHECK-INST: vext2xv.du.wu $xr10, $xr21 +# CHECK-ENCODING: encoding: [0xaa,0x3e,0x9f,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/exth.s b/llvm/test/MC/LoongArch/lasx/exth.s new file mode 100644 index 00000000000000..1ce1e58e358a1f --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/exth.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvexth.h.b $xr15, $xr10 +# CHECK-INST: xvexth.h.b $xr15, $xr10 +# CHECK-ENCODING: encoding: [0x4f,0xe1,0x9e,0x76] + +xvexth.w.h $xr26, $xr11 +# CHECK-INST: xvexth.w.h $xr26, $xr11 +# CHECK-ENCODING: encoding: [0x7a,0xe5,0x9e,0x76] + +xvexth.d.w $xr2, $xr27 +# CHECK-INST: xvexth.d.w $xr2, $xr27 +# CHECK-ENCODING: encoding: [0x62,0xeb,0x9e,0x76] + +xvexth.q.d $xr22, $xr25 +# CHECK-INST: xvexth.q.d $xr22, $xr25 +# CHECK-ENCODING: encoding: [0x36,0xef,0x9e,0x76] + +xvexth.hu.bu $xr21, $xr30 +# CHECK-INST: xvexth.hu.bu $xr21, $xr30 +# CHECK-ENCODING: encoding: [0xd5,0xf3,0x9e,0x76] + +xvexth.wu.hu $xr28, $xr11 +# CHECK-INST: xvexth.wu.hu $xr28, $xr11 +# CHECK-ENCODING: encoding: [0x7c,0xf5,0x9e,0x76] + +xvexth.du.wu $xr27, $xr25 +# CHECK-INST: xvexth.du.wu $xr27, $xr25 +# CHECK-ENCODING: encoding: [0x3b,0xfb,0x9e,0x76] + +xvexth.qu.du $xr16, $xr28 +# CHECK-INST: xvexth.qu.du $xr16, $xr28 +# CHECK-ENCODING: encoding: [0x90,0xff,0x9e,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/extl.s b/llvm/test/MC/LoongArch/lasx/extl.s new file mode 100644 index 00000000000000..d6644e00c6d262 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/extl.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvextl.q.d $xr29, $xr12 +# CHECK-INST: xvextl.q.d $xr29, $xr12 +# CHECK-ENCODING: encoding: [0x9d,0x01,0x09,0x77] + +xvextl.qu.du $xr27, $xr20 +# CHECK-INST: xvextl.qu.du $xr27, $xr20 +# CHECK-ENCODING: encoding: [0x9b,0x02,0x0d,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/extrins.s b/llvm/test/MC/LoongArch/lasx/extrins.s new file mode 100644 index 00000000000000..855571049bd957 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/extrins.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvextrins.b $xr30, $xr23, 252 +# CHECK-INST: xvextrins.b $xr30, $xr23, 252 +# CHECK-ENCODING: encoding: [0xfe,0xf2,0x8f,0x77] + +xvextrins.h $xr0, $xr13, 200 +# CHECK-INST: xvextrins.h $xr0, $xr13, 200 +# CHECK-ENCODING: encoding: [0xa0,0x21,0x8b,0x77] + +xvextrins.w $xr14, $xr21, 152 +# CHECK-INST: xvextrins.w $xr14, $xr21, 152 +# CHECK-ENCODING: encoding: [0xae,0x62,0x86,0x77] + +xvextrins.d $xr31, $xr30, 135 +# CHECK-INST: xvextrins.d $xr31, $xr30, 135 +# CHECK-ENCODING: encoding: [0xdf,0x1f,0x82,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/fadd.s b/llvm/test/MC/LoongArch/lasx/fadd.s new file mode 100644 index 00000000000000..e56beb91fe1f09 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fadd.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfadd.s $xr6, $xr21, $xr15 +# CHECK-INST: xvfadd.s $xr6, $xr21, $xr15 +# CHECK-ENCODING: encoding: [0xa6,0xbe,0x30,0x75] + +xvfadd.d $xr27, $xr8, $xr1 +# CHECK-INST: xvfadd.d $xr27, $xr8, $xr1 +# CHECK-ENCODING: encoding: [0x1b,0x05,0x31,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/fclass.s b/llvm/test/MC/LoongArch/lasx/fclass.s new file mode 100644 index 00000000000000..424f77be6f9785 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fclass.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfclass.s $xr3, $xr7 +# CHECK-INST: xvfclass.s $xr3, $xr7 +# CHECK-ENCODING: encoding: [0xe3,0xd4,0x9c,0x76] + +xvfclass.d $xr22, $xr10 +# CHECK-INST: xvfclass.d $xr22, $xr10 +# CHECK-ENCODING: encoding: [0x56,0xd9,0x9c,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/fcmp.s b/llvm/test/MC/LoongArch/lasx/fcmp.s new file mode 100644 index 00000000000000..71759e7f3dcdcf --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fcmp.s @@ -0,0 +1,180 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfcmp.caf.s $xr1, $xr8, $xr31 +# CHECK-INST: xvfcmp.caf.s $xr1, $xr8, $xr31 +# CHECK-ENCODING: encoding: [0x01,0x7d,0x90,0x0c] + +xvfcmp.caf.d $xr19, $xr31, $xr20 +# CHECK-INST: xvfcmp.caf.d $xr19, $xr31, $xr20 +# CHECK-ENCODING: encoding: [0xf3,0x53,0xa0,0x0c] + +xvfcmp.cun.s $xr8, $xr9, $xr29 +# CHECK-INST: xvfcmp.cun.s $xr8, $xr9, $xr29 +# CHECK-ENCODING: encoding: [0x28,0x75,0x94,0x0c] + +xvfcmp.cun.d $xr19, $xr22, $xr28 +# CHECK-INST: xvfcmp.cun.d $xr19, $xr22, $xr28 +# CHECK-ENCODING: encoding: [0xd3,0x72,0xa4,0x0c] + +xvfcmp.ceq.s $xr0, $xr1, $xr0 +# CHECK-INST: xvfcmp.ceq.s $xr0, $xr1, $xr0 +# CHECK-ENCODING: encoding: [0x20,0x00,0x92,0x0c] + +xvfcmp.ceq.d $xr29, $xr23, $xr20 +# CHECK-INST: xvfcmp.ceq.d $xr29, $xr23, $xr20 +# CHECK-ENCODING: encoding: [0xfd,0x52,0xa2,0x0c] + +xvfcmp.cueq.s $xr5, $xr13, $xr31 +# CHECK-INST: xvfcmp.cueq.s $xr5, $xr13, $xr31 +# CHECK-ENCODING: encoding: [0xa5,0x7d,0x96,0x0c] + +xvfcmp.cueq.d $xr4, $xr22, $xr7 +# CHECK-INST: xvfcmp.cueq.d $xr4, $xr22, $xr7 +# CHECK-ENCODING: encoding: [0xc4,0x1e,0xa6,0x0c] + +xvfcmp.clt.s $xr4, $xr9, $xr1 +# CHECK-INST: xvfcmp.clt.s $xr4, $xr9, $xr1 +# CHECK-ENCODING: encoding: [0x24,0x05,0x91,0x0c] + +xvfcmp.clt.d $xr19, $xr4, $xr21 +# CHECK-INST: xvfcmp.clt.d $xr19, $xr4, $xr21 +# CHECK-ENCODING: encoding: [0x93,0x54,0xa1,0x0c] + +xvfcmp.cult.s $xr15, $xr17, $xr3 +# CHECK-INST: xvfcmp.cult.s $xr15, $xr17, $xr3 +# CHECK-ENCODING: encoding: [0x2f,0x0e,0x95,0x0c] + +xvfcmp.cult.d $xr20, $xr17, $xr6 +# CHECK-INST: xvfcmp.cult.d $xr20, $xr17, $xr6 +# CHECK-ENCODING: encoding: [0x34,0x1a,0xa5,0x0c] + +xvfcmp.cle.s $xr22, $xr22, $xr15 +# CHECK-INST: xvfcmp.cle.s $xr22, $xr22, $xr15 +# CHECK-ENCODING: encoding: [0xd6,0x3e,0x93,0x0c] + +xvfcmp.cle.d $xr21, $xr25, $xr12 +# CHECK-INST: xvfcmp.cle.d $xr21, $xr25, $xr12 +# CHECK-ENCODING: encoding: [0x35,0x33,0xa3,0x0c] + +xvfcmp.cule.s $xr1, $xr2, $xr29 +# CHECK-INST: xvfcmp.cule.s $xr1, $xr2, $xr29 +# CHECK-ENCODING: encoding: [0x41,0x74,0x97,0x0c] + +xvfcmp.cule.d $xr0, $xr5, $xr11 +# CHECK-INST: xvfcmp.cule.d $xr0, $xr5, $xr11 +# CHECK-ENCODING: encoding: [0xa0,0x2c,0xa7,0x0c] + +xvfcmp.cne.s $xr7, $xr17, $xr26 +# CHECK-INST: xvfcmp.cne.s $xr7, $xr17, $xr26 +# CHECK-ENCODING: encoding: [0x27,0x6a,0x98,0x0c] + +xvfcmp.cne.d $xr18, $xr25, $xr0 +# CHECK-INST: xvfcmp.cne.d $xr18, $xr25, $xr0 +# CHECK-ENCODING: encoding: [0x32,0x03,0xa8,0x0c] + +xvfcmp.cor.s $xr1, $xr2, $xr14 +# CHECK-INST: xvfcmp.cor.s $xr1, $xr2, $xr14 +# CHECK-ENCODING: encoding: [0x41,0x38,0x9a,0x0c] + +xvfcmp.cor.d $xr12, $xr19, $xr23 +# CHECK-INST: xvfcmp.cor.d $xr12, $xr19, $xr23 +# CHECK-ENCODING: encoding: [0x6c,0x5e,0xaa,0x0c] + +xvfcmp.cune.s $xr21, $xr17, $xr4 +# CHECK-INST: xvfcmp.cune.s $xr21, $xr17, $xr4 +# CHECK-ENCODING: encoding: [0x35,0x12,0x9c,0x0c] + +xvfcmp.cune.d $xr20, $xr30, $xr12 +# CHECK-INST: xvfcmp.cune.d $xr20, $xr30, $xr12 +# CHECK-ENCODING: encoding: [0xd4,0x33,0xac,0x0c] + +xvfcmp.saf.s $xr23, $xr11, $xr2 +# CHECK-INST: xvfcmp.saf.s $xr23, $xr11, $xr2 +# CHECK-ENCODING: encoding: [0x77,0x89,0x90,0x0c] + +xvfcmp.saf.d $xr7, $xr12, $xr7 +# CHECK-INST: xvfcmp.saf.d $xr7, $xr12, $xr7 +# CHECK-ENCODING: encoding: [0x87,0x9d,0xa0,0x0c] + +xvfcmp.sun.s $xr0, $xr7, $xr30 +# CHECK-INST: xvfcmp.sun.s $xr0, $xr7, $xr30 +# CHECK-ENCODING: encoding: [0xe0,0xf8,0x94,0x0c] + +xvfcmp.sun.d $xr4, $xr11, $xr30 +# CHECK-INST: xvfcmp.sun.d $xr4, $xr11, $xr30 +# CHECK-ENCODING: encoding: [0x64,0xf9,0xa4,0x0c] + +xvfcmp.seq.s $xr15, $xr23, $xr27 +# CHECK-INST: xvfcmp.seq.s $xr15, $xr23, $xr27 +# CHECK-ENCODING: encoding: [0xef,0xee,0x92,0x0c] + +xvfcmp.seq.d $xr15, $xr22, $xr3 +# CHECK-INST: xvfcmp.seq.d $xr15, $xr22, $xr3 +# CHECK-ENCODING: encoding: [0xcf,0x8e,0xa2,0x0c] + +xvfcmp.sueq.s $xr12, $xr26, $xr9 +# CHECK-INST: xvfcmp.sueq.s $xr12, $xr26, $xr9 +# CHECK-ENCODING: encoding: [0x4c,0xa7,0x96,0x0c] + +xvfcmp.sueq.d $xr5, $xr18, $xr17 +# CHECK-INST: xvfcmp.sueq.d $xr5, $xr18, $xr17 +# CHECK-ENCODING: encoding: [0x45,0xc6,0xa6,0x0c] + +xvfcmp.slt.s $xr25, $xr18, $xr31 +# CHECK-INST: xvfcmp.slt.s $xr25, $xr18, $xr31 +# CHECK-ENCODING: encoding: [0x59,0xfe,0x91,0x0c] + +xvfcmp.slt.d $xr17, $xr26, $xr24 +# CHECK-INST: xvfcmp.slt.d $xr17, $xr26, $xr24 +# CHECK-ENCODING: encoding: [0x51,0xe3,0xa1,0x0c] + +xvfcmp.sult.s $xr8, $xr15, $xr18 +# CHECK-INST: xvfcmp.sult.s $xr8, $xr15, $xr18 +# CHECK-ENCODING: encoding: [0xe8,0xc9,0x95,0x0c] + +xvfcmp.sult.d $xr4, $xr4, $xr5 +# CHECK-INST: xvfcmp.sult.d $xr4, $xr4, $xr5 +# CHECK-ENCODING: encoding: [0x84,0x94,0xa5,0x0c] + +xvfcmp.sle.s $xr1, $xr5, $xr16 +# CHECK-INST: xvfcmp.sle.s $xr1, $xr5, $xr16 +# CHECK-ENCODING: encoding: [0xa1,0xc0,0x93,0x0c] + +xvfcmp.sle.d $xr3, $xr1, $xr23 +# CHECK-INST: xvfcmp.sle.d $xr3, $xr1, $xr23 +# CHECK-ENCODING: encoding: [0x23,0xdc,0xa3,0x0c] + +xvfcmp.sule.s $xr23, $xr11, $xr1 +# CHECK-INST: xvfcmp.sule.s $xr23, $xr11, $xr1 +# CHECK-ENCODING: encoding: [0x77,0x85,0x97,0x0c] + +xvfcmp.sule.d $xr11, $xr10, $xr17 +# CHECK-INST: xvfcmp.sule.d $xr11, $xr10, $xr17 +# CHECK-ENCODING: encoding: [0x4b,0xc5,0xa7,0x0c] + +xvfcmp.sne.s $xr27, $xr12, $xr30 +# CHECK-INST: xvfcmp.sne.s $xr27, $xr12, $xr30 +# CHECK-ENCODING: encoding: [0x9b,0xf9,0x98,0x0c] + +xvfcmp.sne.d $xr20, $xr20, $xr17 +# CHECK-INST: xvfcmp.sne.d $xr20, $xr20, $xr17 +# CHECK-ENCODING: encoding: [0x94,0xc6,0xa8,0x0c] + +xvfcmp.sor.s $xr11, $xr13, $xr2 +# CHECK-INST: xvfcmp.sor.s $xr11, $xr13, $xr2 +# CHECK-ENCODING: encoding: [0xab,0x89,0x9a,0x0c] + +xvfcmp.sor.d $xr6, $xr28, $xr6 +# CHECK-INST: xvfcmp.sor.d $xr6, $xr28, $xr6 +# CHECK-ENCODING: encoding: [0x86,0x9b,0xaa,0x0c] + +xvfcmp.sune.s $xr11, $xr16, $xr8 +# CHECK-INST: xvfcmp.sune.s $xr11, $xr16, $xr8 +# CHECK-ENCODING: encoding: [0x0b,0xa2,0x9c,0x0c] + +xvfcmp.sune.d $xr30, $xr5, $xr27 +# CHECK-INST: xvfcmp.sune.d $xr30, $xr5, $xr27 +# CHECK-ENCODING: encoding: [0xbe,0xec,0xac,0x0c] diff --git a/llvm/test/MC/LoongArch/lasx/fcvt.s b/llvm/test/MC/LoongArch/lasx/fcvt.s new file mode 100644 index 00000000000000..da919bd3797a13 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fcvt.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfcvt.h.s $xr9, $xr17, $xr23 +# CHECK-INST: xvfcvt.h.s $xr9, $xr17, $xr23 +# CHECK-ENCODING: encoding: [0x29,0x5e,0x46,0x75] + +xvfcvt.s.d $xr27, $xr10, $xr29 +# CHECK-INST: xvfcvt.s.d $xr27, $xr10, $xr29 +# CHECK-ENCODING: encoding: [0x5b,0xf5,0x46,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/fcvth.s b/llvm/test/MC/LoongArch/lasx/fcvth.s new file mode 100644 index 00000000000000..099d5dd4604def --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fcvth.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfcvth.s.h $xr9, $xr25 +# CHECK-INST: xvfcvth.s.h $xr9, $xr25 +# CHECK-ENCODING: encoding: [0x29,0xef,0x9d,0x76] + +xvfcvth.d.s $xr29, $xr17 +# CHECK-INST: xvfcvth.d.s $xr29, $xr17 +# CHECK-ENCODING: encoding: [0x3d,0xf6,0x9d,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/fcvtl.s b/llvm/test/MC/LoongArch/lasx/fcvtl.s new file mode 100644 index 00000000000000..2c9941cc64cc9f --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fcvtl.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfcvtl.s.h $xr16, $xr14 +# CHECK-INST: xvfcvtl.s.h $xr16, $xr14 +# CHECK-ENCODING: encoding: [0xd0,0xe9,0x9d,0x76] + +xvfcvtl.d.s $xr24, $xr5 +# CHECK-INST: xvfcvtl.d.s $xr24, $xr5 +# CHECK-ENCODING: encoding: [0xb8,0xf0,0x9d,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/fdiv.s b/llvm/test/MC/LoongArch/lasx/fdiv.s new file mode 100644 index 00000000000000..133690f94231ad --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fdiv.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfdiv.s $xr29, $xr5, $xr12 +# CHECK-INST: xvfdiv.s $xr29, $xr5, $xr12 +# CHECK-ENCODING: encoding: [0xbd,0xb0,0x3a,0x75] + +xvfdiv.d $xr31, $xr10, $xr30 +# CHECK-INST: xvfdiv.d $xr31, $xr10, $xr30 +# CHECK-ENCODING: encoding: [0x5f,0x79,0x3b,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/ffint.s b/llvm/test/MC/LoongArch/lasx/ffint.s new file mode 100644 index 00000000000000..7cd663a4358f9c --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/ffint.s @@ -0,0 +1,32 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvffint.s.w $xr3, $xr5 +# CHECK-INST: xvffint.s.w $xr3, $xr5 +# CHECK-ENCODING: encoding: [0xa3,0x00,0x9e,0x76] + +xvffint.d.l $xr5, $xr19 +# CHECK-INST: xvffint.d.l $xr5, $xr19 +# CHECK-ENCODING: encoding: [0x65,0x0a,0x9e,0x76] + +xvffint.s.wu $xr3, $xr28 +# CHECK-INST: xvffint.s.wu $xr3, $xr28 +# CHECK-ENCODING: encoding: [0x83,0x07,0x9e,0x76] + +xvffint.d.lu $xr31, $xr29 +# CHECK-INST: xvffint.d.lu $xr31, $xr29 +# CHECK-ENCODING: encoding: [0xbf,0x0f,0x9e,0x76] + +xvffintl.d.w $xr2, $xr7 +# CHECK-INST: xvffintl.d.w $xr2, $xr7 +# CHECK-ENCODING: encoding: [0xe2,0x10,0x9e,0x76] + +xvffinth.d.w $xr7, $xr28 +# CHECK-INST: xvffinth.d.w $xr7, $xr28 +# CHECK-ENCODING: encoding: [0x87,0x17,0x9e,0x76] + +xvffint.s.l $xr10, $xr27, $xr3 +# CHECK-INST: xvffint.s.l $xr10, $xr27, $xr3 +# CHECK-ENCODING: encoding: [0x6a,0x0f,0x48,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/flogb.s b/llvm/test/MC/LoongArch/lasx/flogb.s new file mode 100644 index 00000000000000..cccf618566c3c1 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/flogb.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvflogb.s $xr17, $xr12 +# CHECK-INST: xvflogb.s $xr17, $xr12 +# CHECK-ENCODING: encoding: [0x91,0xc5,0x9c,0x76] + +xvflogb.d $xr26, $xr1 +# CHECK-INST: xvflogb.d $xr26, $xr1 +# CHECK-ENCODING: encoding: [0x3a,0xc8,0x9c,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/fmadd.s b/llvm/test/MC/LoongArch/lasx/fmadd.s new file mode 100644 index 00000000000000..c4c3305012809a --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fmadd.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfmadd.s $xr5, $xr31, $xr31, $xr27 +# CHECK-INST: xvfmadd.s $xr5, $xr31, $xr31, $xr27 +# CHECK-ENCODING: encoding: [0xe5,0xff,0x1d,0x0a] + +xvfmadd.d $xr9, $xr16, $xr31, $xr25 +# CHECK-INST: xvfmadd.d $xr9, $xr16, $xr31, $xr25 +# CHECK-ENCODING: encoding: [0x09,0xfe,0x2c,0x0a] diff --git a/llvm/test/MC/LoongArch/lasx/fmax.s b/llvm/test/MC/LoongArch/lasx/fmax.s new file mode 100644 index 00000000000000..a5f4f901808d1b --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fmax.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfmax.s $xr29, $xr24, $xr8 +# CHECK-INST: xvfmax.s $xr29, $xr24, $xr8 +# CHECK-ENCODING: encoding: [0x1d,0xa3,0x3c,0x75] + +xvfmax.d $xr31, $xr25, $xr23 +# CHECK-INST: xvfmax.d $xr31, $xr25, $xr23 +# CHECK-ENCODING: encoding: [0x3f,0x5f,0x3d,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/fmaxa.s b/llvm/test/MC/LoongArch/lasx/fmaxa.s new file mode 100644 index 00000000000000..1181264e418c7b --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fmaxa.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfmaxa.s $xr15, $xr18, $xr5 +# CHECK-INST: xvfmaxa.s $xr15, $xr18, $xr5 +# CHECK-ENCODING: encoding: [0x4f,0x96,0x40,0x75] + +xvfmaxa.d $xr2, $xr20, $xr29 +# CHECK-INST: xvfmaxa.d $xr2, $xr20, $xr29 +# CHECK-ENCODING: encoding: [0x82,0x76,0x41,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/fmin.s b/llvm/test/MC/LoongArch/lasx/fmin.s new file mode 100644 index 00000000000000..735cdd9ce82c4e --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fmin.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfmin.s $xr31, $xr5, $xr16 +# CHECK-INST: xvfmin.s $xr31, $xr5, $xr16 +# CHECK-ENCODING: encoding: [0xbf,0xc0,0x3e,0x75] + +xvfmin.d $xr13, $xr30, $xr25 +# CHECK-INST: xvfmin.d $xr13, $xr30, $xr25 +# CHECK-ENCODING: encoding: [0xcd,0x67,0x3f,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/fmina.s b/llvm/test/MC/LoongArch/lasx/fmina.s new file mode 100644 index 00000000000000..fbfe44c9452622 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fmina.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfmina.s $xr29, $xr27, $xr17 +# CHECK-INST: xvfmina.s $xr29, $xr27, $xr17 +# CHECK-ENCODING: encoding: [0x7d,0xc7,0x42,0x75] + +xvfmina.d $xr12, $xr20, $xr18 +# CHECK-INST: xvfmina.d $xr12, $xr20, $xr18 +# CHECK-ENCODING: encoding: [0x8c,0x4a,0x43,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/fmsub.s b/llvm/test/MC/LoongArch/lasx/fmsub.s new file mode 100644 index 00000000000000..8291d2b75bedf3 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fmsub.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfmsub.s $xr17, $xr3, $xr3, $xr23 +# CHECK-INST: xvfmsub.s $xr17, $xr3, $xr3, $xr23 +# CHECK-ENCODING: encoding: [0x71,0x8c,0x5b,0x0a] + +xvfmsub.d $xr30, $xr15, $xr16, $xr14 +# CHECK-INST: xvfmsub.d $xr30, $xr15, $xr16, $xr14 +# CHECK-ENCODING: encoding: [0xfe,0x41,0x67,0x0a] diff --git a/llvm/test/MC/LoongArch/lasx/fmul.s b/llvm/test/MC/LoongArch/lasx/fmul.s new file mode 100644 index 00000000000000..bff5770170ef55 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fmul.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfmul.s $xr9, $xr14, $xr30 +# CHECK-INST: xvfmul.s $xr9, $xr14, $xr30 +# CHECK-ENCODING: encoding: [0xc9,0xf9,0x38,0x75] + +xvfmul.d $xr28, $xr26, $xr19 +# CHECK-INST: xvfmul.d $xr28, $xr26, $xr19 +# CHECK-ENCODING: encoding: [0x5c,0x4f,0x39,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/fnmadd.s b/llvm/test/MC/LoongArch/lasx/fnmadd.s new file mode 100644 index 00000000000000..04830c97cf46ac --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fnmadd.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfnmadd.s $xr14, $xr22, $xr23, $xr24 +# CHECK-INST: xvfnmadd.s $xr14, $xr22, $xr23, $xr24 +# CHECK-ENCODING: encoding: [0xce,0x5e,0x9c,0x0a] + +xvfnmadd.d $xr1, $xr30, $xr23, $xr12 +# CHECK-INST: xvfnmadd.d $xr1, $xr30, $xr23, $xr12 +# CHECK-ENCODING: encoding: [0xc1,0x5f,0xa6,0x0a] diff --git a/llvm/test/MC/LoongArch/lasx/fnmsub.s b/llvm/test/MC/LoongArch/lasx/fnmsub.s new file mode 100644 index 00000000000000..6a749eb2248e2a --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fnmsub.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfnmsub.s $xr22, $xr5, $xr4, $xr11 +# CHECK-INST: xvfnmsub.s $xr22, $xr5, $xr4, $xr11 +# CHECK-ENCODING: encoding: [0xb6,0x90,0xd5,0x0a] + +xvfnmsub.d $xr8, $xr0, $xr29, $xr28 +# CHECK-INST: xvfnmsub.d $xr8, $xr0, $xr29, $xr28 +# CHECK-ENCODING: encoding: [0x08,0x74,0xee,0x0a] diff --git a/llvm/test/MC/LoongArch/lasx/frecip.s b/llvm/test/MC/LoongArch/lasx/frecip.s new file mode 100644 index 00000000000000..1bb3ce02fb9c05 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/frecip.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfrecip.s $xr3, $xr16 +# CHECK-INST: xvfrecip.s $xr3, $xr16 +# CHECK-ENCODING: encoding: [0x03,0xf6,0x9c,0x76] + +xvfrecip.d $xr17, $xr24 +# CHECK-INST: xvfrecip.d $xr17, $xr24 +# CHECK-ENCODING: encoding: [0x11,0xfb,0x9c,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/frint.s b/llvm/test/MC/LoongArch/lasx/frint.s new file mode 100644 index 00000000000000..03ab8684f3f716 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/frint.s @@ -0,0 +1,44 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfrintrne.s $xr19, $xr17 +# CHECK-INST: xvfrintrne.s $xr19, $xr17 +# CHECK-ENCODING: encoding: [0x33,0x76,0x9d,0x76] + +xvfrintrne.d $xr12, $xr29 +# CHECK-INST: xvfrintrne.d $xr12, $xr29 +# CHECK-ENCODING: encoding: [0xac,0x7b,0x9d,0x76] + +xvfrintrz.s $xr10, $xr9 +# CHECK-INST: xvfrintrz.s $xr10, $xr9 +# CHECK-ENCODING: encoding: [0x2a,0x65,0x9d,0x76] + +xvfrintrz.d $xr29, $xr5 +# CHECK-INST: xvfrintrz.d $xr29, $xr5 +# CHECK-ENCODING: encoding: [0xbd,0x68,0x9d,0x76] + +xvfrintrp.s $xr26, $xr16 +# CHECK-INST: xvfrintrp.s $xr26, $xr16 +# CHECK-ENCODING: encoding: [0x1a,0x56,0x9d,0x76] + +xvfrintrp.d $xr1, $xr28 +# CHECK-INST: xvfrintrp.d $xr1, $xr28 +# CHECK-ENCODING: encoding: [0x81,0x5b,0x9d,0x76] + +xvfrintrm.s $xr27, $xr13 +# CHECK-INST: xvfrintrm.s $xr27, $xr13 +# CHECK-ENCODING: encoding: [0xbb,0x45,0x9d,0x76] + +xvfrintrm.d $xr14, $xr27 +# CHECK-INST: xvfrintrm.d $xr14, $xr27 +# CHECK-ENCODING: encoding: [0x6e,0x4b,0x9d,0x76] + +xvfrint.s $xr21, $xr24 +# CHECK-INST: xvfrint.s $xr21, $xr24 +# CHECK-ENCODING: encoding: [0x15,0x37,0x9d,0x76] + +xvfrint.d $xr31, $xr18 +# CHECK-INST: xvfrint.d $xr31, $xr18 +# CHECK-ENCODING: encoding: [0x5f,0x3a,0x9d,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/frsqrt.s b/llvm/test/MC/LoongArch/lasx/frsqrt.s new file mode 100644 index 00000000000000..af96e10832dfb1 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/frsqrt.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfrsqrt.s $xr31, $xr25 +# CHECK-INST: xvfrsqrt.s $xr31, $xr25 +# CHECK-ENCODING: encoding: [0x3f,0x07,0x9d,0x76] + +xvfrsqrt.d $xr14, $xr22 +# CHECK-INST: xvfrsqrt.d $xr14, $xr22 +# CHECK-ENCODING: encoding: [0xce,0x0a,0x9d,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/frstp.s b/llvm/test/MC/LoongArch/lasx/frstp.s new file mode 100644 index 00000000000000..b76309f4b0f450 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/frstp.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfrstp.b $xr23, $xr18, $xr18 +# CHECK-INST: xvfrstp.b $xr23, $xr18, $xr18 +# CHECK-ENCODING: encoding: [0x57,0x4a,0x2b,0x75] + +xvfrstp.h $xr13, $xr30, $xr6 +# CHECK-INST: xvfrstp.h $xr13, $xr30, $xr6 +# CHECK-ENCODING: encoding: [0xcd,0x9b,0x2b,0x75] + +xvfrstpi.b $xr24, $xr28, 31 +# CHECK-INST: xvfrstpi.b $xr24, $xr28, 31 +# CHECK-ENCODING: encoding: [0x98,0x7f,0x9a,0x76] + +xvfrstpi.h $xr22, $xr24, 18 +# CHECK-INST: xvfrstpi.h $xr22, $xr24, 18 +# CHECK-ENCODING: encoding: [0x16,0xcb,0x9a,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/fsqrt.s b/llvm/test/MC/LoongArch/lasx/fsqrt.s new file mode 100644 index 00000000000000..6519ad298cb325 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fsqrt.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfsqrt.s $xr4, $xr27 +# CHECK-INST: xvfsqrt.s $xr4, $xr27 +# CHECK-ENCODING: encoding: [0x64,0xe7,0x9c,0x76] + +xvfsqrt.d $xr26, $xr2 +# CHECK-INST: xvfsqrt.d $xr26, $xr2 +# CHECK-ENCODING: encoding: [0x5a,0xe8,0x9c,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/fsub.s b/llvm/test/MC/LoongArch/lasx/fsub.s new file mode 100644 index 00000000000000..47330258e74eca --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/fsub.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvfsub.s $xr22, $xr0, $xr3 +# CHECK-INST: xvfsub.s $xr22, $xr0, $xr3 +# CHECK-ENCODING: encoding: [0x16,0x8c,0x32,0x75] + +xvfsub.d $xr4, $xr25, $xr15 +# CHECK-INST: xvfsub.d $xr4, $xr25, $xr15 +# CHECK-ENCODING: encoding: [0x24,0x3f,0x33,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/ftint.s b/llvm/test/MC/LoongArch/lasx/ftint.s new file mode 100644 index 00000000000000..0b263fe201e6f6 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/ftint.s @@ -0,0 +1,120 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvftintrne.w.s $xr20, $xr13 +# CHECK-INST: xvftintrne.w.s $xr20, $xr13 +# CHECK-ENCODING: encoding: [0xb4,0x51,0x9e,0x76] + +xvftintrne.l.d $xr30, $xr14 +# CHECK-INST: xvftintrne.l.d $xr30, $xr14 +# CHECK-ENCODING: encoding: [0xde,0x55,0x9e,0x76] + +xvftintrz.w.s $xr14, $xr5 +# CHECK-INST: xvftintrz.w.s $xr14, $xr5 +# CHECK-ENCODING: encoding: [0xae,0x48,0x9e,0x76] + +xvftintrz.l.d $xr1, $xr26 +# CHECK-INST: xvftintrz.l.d $xr1, $xr26 +# CHECK-ENCODING: encoding: [0x41,0x4f,0x9e,0x76] + +xvftintrp.w.s $xr18, $xr1 +# CHECK-INST: xvftintrp.w.s $xr18, $xr1 +# CHECK-ENCODING: encoding: [0x32,0x40,0x9e,0x76] + +xvftintrp.l.d $xr10, $xr24 +# CHECK-INST: xvftintrp.l.d $xr10, $xr24 +# CHECK-ENCODING: encoding: [0x0a,0x47,0x9e,0x76] + +xvftintrm.w.s $xr8, $xr23 +# CHECK-INST: xvftintrm.w.s $xr8, $xr23 +# CHECK-ENCODING: encoding: [0xe8,0x3a,0x9e,0x76] + +xvftintrm.l.d $xr12, $xr17 +# CHECK-INST: xvftintrm.l.d $xr12, $xr17 +# CHECK-ENCODING: encoding: [0x2c,0x3e,0x9e,0x76] + +xvftint.w.s $xr11, $xr25 +# CHECK-INST: xvftint.w.s $xr11, $xr25 +# CHECK-ENCODING: encoding: [0x2b,0x33,0x9e,0x76] + +xvftint.l.d $xr7, $xr22 +# CHECK-INST: xvftint.l.d $xr7, $xr22 +# CHECK-ENCODING: encoding: [0xc7,0x36,0x9e,0x76] + +xvftintrz.wu.s $xr13, $xr19 +# CHECK-INST: xvftintrz.wu.s $xr13, $xr19 +# CHECK-ENCODING: encoding: [0x6d,0x72,0x9e,0x76] + +xvftintrz.lu.d $xr24, $xr3 +# CHECK-INST: xvftintrz.lu.d $xr24, $xr3 +# CHECK-ENCODING: encoding: [0x78,0x74,0x9e,0x76] + +xvftint.wu.s $xr14, $xr6 +# CHECK-INST: xvftint.wu.s $xr14, $xr6 +# CHECK-ENCODING: encoding: [0xce,0x58,0x9e,0x76] + +xvftint.lu.d $xr2, $xr2 +# CHECK-INST: xvftint.lu.d $xr2, $xr2 +# CHECK-ENCODING: encoding: [0x42,0x5c,0x9e,0x76] + +xvftintrne.w.d $xr13, $xr20, $xr5 +# CHECK-INST: xvftintrne.w.d $xr13, $xr20, $xr5 +# CHECK-ENCODING: encoding: [0x8d,0x96,0x4b,0x75] + +xvftintrz.w.d $xr13, $xr8, $xr27 +# CHECK-INST: xvftintrz.w.d $xr13, $xr8, $xr27 +# CHECK-ENCODING: encoding: [0x0d,0x6d,0x4b,0x75] + +xvftintrp.w.d $xr14, $xr26, $xr31 +# CHECK-INST: xvftintrp.w.d $xr14, $xr26, $xr31 +# CHECK-ENCODING: encoding: [0x4e,0xff,0x4a,0x75] + +xvftintrm.w.d $xr29, $xr23, $xr7 +# CHECK-INST: xvftintrm.w.d $xr29, $xr23, $xr7 +# CHECK-ENCODING: encoding: [0xfd,0x1e,0x4a,0x75] + +xvftint.w.d $xr7, $xr22, $xr29 +# CHECK-INST: xvftint.w.d $xr7, $xr22, $xr29 +# CHECK-ENCODING: encoding: [0xc7,0xf6,0x49,0x75] + +xvftintrnel.l.s $xr31, $xr28 +# CHECK-INST: xvftintrnel.l.s $xr31, $xr28 +# CHECK-ENCODING: encoding: [0x9f,0xa3,0x9e,0x76] + +xvftintrneh.l.s $xr16, $xr29 +# CHECK-INST: xvftintrneh.l.s $xr16, $xr29 +# CHECK-ENCODING: encoding: [0xb0,0xa7,0x9e,0x76] + +xvftintrzl.l.s $xr27, $xr29 +# CHECK-INST: xvftintrzl.l.s $xr27, $xr29 +# CHECK-ENCODING: encoding: [0xbb,0x9b,0x9e,0x76] + +xvftintrzh.l.s $xr14, $xr10 +# CHECK-INST: xvftintrzh.l.s $xr14, $xr10 +# CHECK-ENCODING: encoding: [0x4e,0x9d,0x9e,0x76] + +xvftintrpl.l.s $xr14, $xr0 +# CHECK-INST: xvftintrpl.l.s $xr14, $xr0 +# CHECK-ENCODING: encoding: [0x0e,0x90,0x9e,0x76] + +xvftintrph.l.s $xr23, $xr0 +# CHECK-INST: xvftintrph.l.s $xr23, $xr0 +# CHECK-ENCODING: encoding: [0x17,0x94,0x9e,0x76] + +xvftintrml.l.s $xr22, $xr15 +# CHECK-INST: xvftintrml.l.s $xr22, $xr15 +# CHECK-ENCODING: encoding: [0xf6,0x89,0x9e,0x76] + +xvftintrmh.l.s $xr10, $xr19 +# CHECK-INST: xvftintrmh.l.s $xr10, $xr19 +# CHECK-ENCODING: encoding: [0x6a,0x8e,0x9e,0x76] + +xvftintl.l.s $xr31, $xr11 +# CHECK-INST: xvftintl.l.s $xr31, $xr11 +# CHECK-ENCODING: encoding: [0x7f,0x81,0x9e,0x76] + +xvftinth.l.s $xr15, $xr5 +# CHECK-INST: xvftinth.l.s $xr15, $xr5 +# CHECK-ENCODING: encoding: [0xaf,0x84,0x9e,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/haddw.s b/llvm/test/MC/LoongArch/lasx/haddw.s new file mode 100644 index 00000000000000..639669e510013d --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/haddw.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvhaddw.h.b $xr31, $xr19, $xr29 +# CHECK-INST: xvhaddw.h.b $xr31, $xr19, $xr29 +# CHECK-ENCODING: encoding: [0x7f,0x76,0x54,0x74] + +xvhaddw.w.h $xr31, $xr16, $xr23 +# CHECK-INST: xvhaddw.w.h $xr31, $xr16, $xr23 +# CHECK-ENCODING: encoding: [0x1f,0xde,0x54,0x74] + +xvhaddw.d.w $xr30, $xr1, $xr24 +# CHECK-INST: xvhaddw.d.w $xr30, $xr1, $xr24 +# CHECK-ENCODING: encoding: [0x3e,0x60,0x55,0x74] + +xvhaddw.q.d $xr16, $xr15, $xr17 +# CHECK-INST: xvhaddw.q.d $xr16, $xr15, $xr17 +# CHECK-ENCODING: encoding: [0xf0,0xc5,0x55,0x74] + +xvhaddw.hu.bu $xr14, $xr17, $xr2 +# CHECK-INST: xvhaddw.hu.bu $xr14, $xr17, $xr2 +# CHECK-ENCODING: encoding: [0x2e,0x0a,0x58,0x74] + +xvhaddw.wu.hu $xr21, $xr2, $xr8 +# CHECK-INST: xvhaddw.wu.hu $xr21, $xr2, $xr8 +# CHECK-ENCODING: encoding: [0x55,0xa0,0x58,0x74] + +xvhaddw.du.wu $xr6, $xr24, $xr19 +# CHECK-INST: xvhaddw.du.wu $xr6, $xr24, $xr19 +# CHECK-ENCODING: encoding: [0x06,0x4f,0x59,0x74] + +xvhaddw.qu.du $xr10, $xr12, $xr13 +# CHECK-INST: xvhaddw.qu.du $xr10, $xr12, $xr13 +# CHECK-ENCODING: encoding: [0x8a,0xb5,0x59,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/hsubw.s b/llvm/test/MC/LoongArch/lasx/hsubw.s new file mode 100644 index 00000000000000..078812f33e0d32 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/hsubw.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvhsubw.h.b $xr22, $xr7, $xr16 +# CHECK-INST: xvhsubw.h.b $xr22, $xr7, $xr16 +# CHECK-ENCODING: encoding: [0xf6,0x40,0x56,0x74] + +xvhsubw.w.h $xr19, $xr8, $xr15 +# CHECK-INST: xvhsubw.w.h $xr19, $xr8, $xr15 +# CHECK-ENCODING: encoding: [0x13,0xbd,0x56,0x74] + +xvhsubw.d.w $xr30, $xr23, $xr19 +# CHECK-INST: xvhsubw.d.w $xr30, $xr23, $xr19 +# CHECK-ENCODING: encoding: [0xfe,0x4e,0x57,0x74] + +xvhsubw.q.d $xr20, $xr13, $xr28 +# CHECK-INST: xvhsubw.q.d $xr20, $xr13, $xr28 +# CHECK-ENCODING: encoding: [0xb4,0xf1,0x57,0x74] + +xvhsubw.hu.bu $xr10, $xr2, $xr16 +# CHECK-INST: xvhsubw.hu.bu $xr10, $xr2, $xr16 +# CHECK-ENCODING: encoding: [0x4a,0x40,0x5a,0x74] + +xvhsubw.wu.hu $xr1, $xr26, $xr18 +# CHECK-INST: xvhsubw.wu.hu $xr1, $xr26, $xr18 +# CHECK-ENCODING: encoding: [0x41,0xcb,0x5a,0x74] + +xvhsubw.du.wu $xr5, $xr23, $xr20 +# CHECK-INST: xvhsubw.du.wu $xr5, $xr23, $xr20 +# CHECK-ENCODING: encoding: [0xe5,0x52,0x5b,0x74] + +xvhsubw.qu.du $xr31, $xr4, $xr8 +# CHECK-INST: xvhsubw.qu.du $xr31, $xr4, $xr8 +# CHECK-ENCODING: encoding: [0x9f,0xa0,0x5b,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/ilv.s b/llvm/test/MC/LoongArch/lasx/ilv.s new file mode 100644 index 00000000000000..ebdc8d8518555e --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/ilv.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvilvl.b $xr29, $xr14, $xr0 +# CHECK-INST: xvilvl.b $xr29, $xr14, $xr0 +# CHECK-ENCODING: encoding: [0xdd,0x01,0x1a,0x75] + +xvilvl.h $xr30, $xr9, $xr21 +# CHECK-INST: xvilvl.h $xr30, $xr9, $xr21 +# CHECK-ENCODING: encoding: [0x3e,0xd5,0x1a,0x75] + +xvilvl.w $xr24, $xr22, $xr9 +# CHECK-INST: xvilvl.w $xr24, $xr22, $xr9 +# CHECK-ENCODING: encoding: [0xd8,0x26,0x1b,0x75] + +xvilvl.d $xr25, $xr20, $xr10 +# CHECK-INST: xvilvl.d $xr25, $xr20, $xr10 +# CHECK-ENCODING: encoding: [0x99,0xaa,0x1b,0x75] + +xvilvh.b $xr19, $xr22, $xr26 +# CHECK-INST: xvilvh.b $xr19, $xr22, $xr26 +# CHECK-ENCODING: encoding: [0xd3,0x6a,0x1c,0x75] + +xvilvh.h $xr10, $xr23, $xr7 +# CHECK-INST: xvilvh.h $xr10, $xr23, $xr7 +# CHECK-ENCODING: encoding: [0xea,0x9e,0x1c,0x75] + +xvilvh.w $xr5, $xr0, $xr30 +# CHECK-INST: xvilvh.w $xr5, $xr0, $xr30 +# CHECK-ENCODING: encoding: [0x05,0x78,0x1d,0x75] + +xvilvh.d $xr24, $xr2, $xr2 +# CHECK-INST: xvilvh.d $xr24, $xr2, $xr2 +# CHECK-ENCODING: encoding: [0x58,0x88,0x1d,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/insgr2vr.s b/llvm/test/MC/LoongArch/lasx/insgr2vr.s new file mode 100644 index 00000000000000..8c23c1543778e8 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/insgr2vr.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvinsgr2vr.w $xr25, $r30, 7 +# CHECK-INST: xvinsgr2vr.w $xr25, $s7, 7 +# CHECK-ENCODING: encoding: [0xd9,0xdf,0xeb,0x76] + +xvinsgr2vr.d $xr27, $r21, 1 +# CHECK-INST: xvinsgr2vr.d $xr27, $r21, 1 +# CHECK-ENCODING: encoding: [0xbb,0xe6,0xeb,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/insve0.s b/llvm/test/MC/LoongArch/lasx/insve0.s new file mode 100644 index 00000000000000..5b77a23a21ff0f --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/insve0.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvinsve0.w $xr6, $xr1, 7 +# CHECK-INST: xvinsve0.w $xr6, $xr1, 7 +# CHECK-ENCODING: encoding: [0x26,0xdc,0xff,0x76] + +xvinsve0.d $xr28, $xr1, 0 +# CHECK-INST: xvinsve0.d $xr28, $xr1, 0 +# CHECK-ENCODING: encoding: [0x3c,0xe0,0xff,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/invalid-imm.s b/llvm/test/MC/LoongArch/lasx/invalid-imm.s new file mode 100644 index 00000000000000..5c61a7a4200913 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/invalid-imm.s @@ -0,0 +1,55 @@ +## Test out of range immediates which are used by lasx instructions. + +# RUN: not llvm-mc --triple=loongarch64 %s 2>&1 | FileCheck %s + +## uimm1 +xvrepl128vei.d $xr0, $xr1, 2 +# CHECK: :[[#@LINE-1]]:28: error: immediate must be an integer in the range [0, 1] + +## uimm4 +xvsat.h $xr0, $xr1, 16 +# CHECK: :[[#@LINE-1]]:21: error: immediate must be an integer in the range [0, 15] + +## simm5 +xvseqi.b $xr0, $xr1, 16 +# CHECK: :[[#@LINE-1]]:22: error: immediate must be an integer in the range [-16, 15] + +## uimm7 +xvsrlni.d.q $xr0, $xr1, 128 +# CHECK: :[[#@LINE-1]]:25: error: immediate must be an integer in the range [0, 127] + +## simm8 +xvpermi.w $xr0, $xr1, 256 +# CHECK: :[[#@LINE-1]]:23: error: immediate must be an integer in the range [0, 255] + +## simm8_lsl1 +xvstelm.h $xr0, $a0, 255, 1 +# CHECK: :[[#@LINE-1]]:22: error: immediate must be a multiple of 2 in the range [-256, 254] + +## simm8_lsl2 +xvstelm.w $xr0, $a0, 512, 1 +# CHECK: :[[#@LINE-1]]:22: error: immediate must be a multiple of 4 in the range [-512, 508] + +## simm10 +xvrepli.b $xr0, 512 +# CHECK: :[[#@LINE-1]]:17: error: immediate must be an integer in the range [-512, 511] + +## simm8_lsl3 +xvstelm.d $xr0, $a0, 1024, 1 +# CHECK: :[[#@LINE-1]]:22: error: immediate must be a multiple of 8 in the range [-1024, 1016] + +## simm9_lsl3 +xvldrepl.d $xr0, $a0, 2048 +# CHECK: :[[#@LINE-1]]:23: error: immediate must be a multiple of 8 in the range [-2048, 2040] + +## simm10_lsl2 +xvldrepl.w $xr0, $a0, 2048 +# CHECK: :[[#@LINE-1]]:23: error: immediate must be a multiple of 4 in the range [-2048, 2044] + +## simm11_lsl1 +xvldrepl.h $xr0, $a0, 2048 +# CHECK: :[[#@LINE-1]]:23: error: immediate must be a multiple of 2 in the range [-2048, 2046] + +## simm13 +xvldi $xr0, 4096 +# CHECK: :[[#@LINE-1]]:13: error: immediate must be an integer in the range [-4096, 4095] diff --git a/llvm/test/MC/LoongArch/lasx/ld.s b/llvm/test/MC/LoongArch/lasx/ld.s new file mode 100644 index 00000000000000..70db8d4f7f42f3 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/ld.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvld $xr3, $r3, -658 +# CHECK-INST: xvld $xr3, $sp, -658 +# CHECK-ENCODING: encoding: [0x63,0xb8,0xb5,0x2c] + +xvldx $xr23, $r9, $r14 +# CHECK-INST: xvldx $xr23, $a5, $t2 +# CHECK-ENCODING: encoding: [0x37,0x39,0x48,0x38] diff --git a/llvm/test/MC/LoongArch/lasx/ldi.s b/llvm/test/MC/LoongArch/lasx/ldi.s new file mode 100644 index 00000000000000..5b4bd2dcd2dcf8 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/ldi.s @@ -0,0 +1,29 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-OBJ + +xvldi $xr31, 3206 +# CHECK-INST: xvldi $xr31, 3206 +# CHECK-ENCODING: encoding: [0xdf,0x90,0xe1,0x77] +# CHECK-OBJ: vldi $xr31, 3206 + +xvrepli.b $xr26, -512 +# CHECK-INST: vrepli.b $xr26, -512 +# CHECK-ENCODING: encoding: [0x1a,0x40,0xe0,0x77] +# CHECK-OBJ: vldi $xr26, 512 + +xvrepli.h $xr26, -512 +# CHECK-INST: vrepli.h $xr26, -512 +# CHECK-ENCODING: encoding: [0x1a,0xc0,0xe0,0x77] +# CHECK-OBJ: vldi $xr26, 1536 + +xvrepli.w $xr26, -512 +# CHECK-INST: vrepli.w $xr26, -512 +# CHECK-ENCODING: encoding: [0x1a,0x40,0xe1,0x77] +# CHECK-OBJ: vldi $xr26, 2560 + +xvrepli.d $xr26, -512 +# CHECK-INST: vrepli.d $xr26, -512 +# CHECK-ENCODING: encoding: [0x1a,0xc0,0xe1,0x77] +# CHECK-OBJ: vldi $xr26, 3584 diff --git a/llvm/test/MC/LoongArch/lasx/ldrepl.s b/llvm/test/MC/LoongArch/lasx/ldrepl.s new file mode 100644 index 00000000000000..3fd8ec406dc440 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/ldrepl.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvldrepl.b $xr19, $r21, 1892 +# CHECK-INST: xvldrepl.b $xr19, $r21, 1892 +# CHECK-ENCODING: encoding: [0xb3,0x92,0x9d,0x32] + +xvldrepl.h $xr0, $r17, 1762 +# CHECK-INST: xvldrepl.h $xr0, $t5, 1762 +# CHECK-ENCODING: encoding: [0x20,0xc6,0x4d,0x32] + +xvldrepl.w $xr11, $r26, -1524 +# CHECK-INST: xvldrepl.w $xr11, $s3, -1524 +# CHECK-ENCODING: encoding: [0x4b,0x0f,0x2a,0x32] + +xvldrepl.d $xr28, $r12, 1976 +# CHECK-INST: xvldrepl.d $xr28, $t0, 1976 +# CHECK-ENCODING: encoding: [0x9c,0xdd,0x13,0x32] diff --git a/llvm/test/MC/LoongArch/lasx/madd.s b/llvm/test/MC/LoongArch/lasx/madd.s new file mode 100644 index 00000000000000..8f61793731fca7 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/madd.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvmadd.b $xr5, $xr31, $xr8 +# CHECK-INST: xvmadd.b $xr5, $xr31, $xr8 +# CHECK-ENCODING: encoding: [0xe5,0x23,0xa8,0x74] + +xvmadd.h $xr4, $xr0, $xr28 +# CHECK-INST: xvmadd.h $xr4, $xr0, $xr28 +# CHECK-ENCODING: encoding: [0x04,0xf0,0xa8,0x74] + +xvmadd.w $xr2, $xr13, $xr24 +# CHECK-INST: xvmadd.w $xr2, $xr13, $xr24 +# CHECK-ENCODING: encoding: [0xa2,0x61,0xa9,0x74] + +xvmadd.d $xr19, $xr8, $xr18 +# CHECK-INST: xvmadd.d $xr19, $xr8, $xr18 +# CHECK-ENCODING: encoding: [0x13,0xc9,0xa9,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/maddw.s b/llvm/test/MC/LoongArch/lasx/maddw.s new file mode 100644 index 00000000000000..af873fb1ac3493 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/maddw.s @@ -0,0 +1,100 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvmaddwev.h.b $xr25, $xr15, $xr9 +# CHECK-INST: xvmaddwev.h.b $xr25, $xr15, $xr9 +# CHECK-ENCODING: encoding: [0xf9,0x25,0xac,0x74] + +xvmaddwev.w.h $xr26, $xr1, $xr0 +# CHECK-INST: xvmaddwev.w.h $xr26, $xr1, $xr0 +# CHECK-ENCODING: encoding: [0x3a,0x80,0xac,0x74] + +xvmaddwev.d.w $xr23, $xr24, $xr24 +# CHECK-INST: xvmaddwev.d.w $xr23, $xr24, $xr24 +# CHECK-ENCODING: encoding: [0x17,0x63,0xad,0x74] + +xvmaddwev.q.d $xr7, $xr9, $xr22 +# CHECK-INST: xvmaddwev.q.d $xr7, $xr9, $xr22 +# CHECK-ENCODING: encoding: [0x27,0xd9,0xad,0x74] + +xvmaddwev.h.bu $xr23, $xr13, $xr26 +# CHECK-INST: xvmaddwev.h.bu $xr23, $xr13, $xr26 +# CHECK-ENCODING: encoding: [0xb7,0x69,0xb4,0x74] + +xvmaddwev.w.hu $xr13, $xr3, $xr3 +# CHECK-INST: xvmaddwev.w.hu $xr13, $xr3, $xr3 +# CHECK-ENCODING: encoding: [0x6d,0x8c,0xb4,0x74] + +xvmaddwev.d.wu $xr29, $xr27, $xr28 +# CHECK-INST: xvmaddwev.d.wu $xr29, $xr27, $xr28 +# CHECK-ENCODING: encoding: [0x7d,0x73,0xb5,0x74] + +xvmaddwev.q.du $xr29, $xr10, $xr10 +# CHECK-INST: xvmaddwev.q.du $xr29, $xr10, $xr10 +# CHECK-ENCODING: encoding: [0x5d,0xa9,0xb5,0x74] + +xvmaddwev.h.bu.b $xr30, $xr26, $xr31 +# CHECK-INST: xvmaddwev.h.bu.b $xr30, $xr26, $xr31 +# CHECK-ENCODING: encoding: [0x5e,0x7f,0xbc,0x74] + +xvmaddwev.w.hu.h $xr6, $xr17, $xr31 +# CHECK-INST: xvmaddwev.w.hu.h $xr6, $xr17, $xr31 +# CHECK-ENCODING: encoding: [0x26,0xfe,0xbc,0x74] + +xvmaddwev.d.wu.w $xr10, $xr28, $xr2 +# CHECK-INST: xvmaddwev.d.wu.w $xr10, $xr28, $xr2 +# CHECK-ENCODING: encoding: [0x8a,0x0b,0xbd,0x74] + +xvmaddwev.q.du.d $xr16, $xr20, $xr24 +# CHECK-INST: xvmaddwev.q.du.d $xr16, $xr20, $xr24 +# CHECK-ENCODING: encoding: [0x90,0xe2,0xbd,0x74] + +xvmaddwod.h.b $xr16, $xr8, $xr18 +# CHECK-INST: xvmaddwod.h.b $xr16, $xr8, $xr18 +# CHECK-ENCODING: encoding: [0x10,0x49,0xae,0x74] + +xvmaddwod.w.h $xr11, $xr24, $xr14 +# CHECK-INST: xvmaddwod.w.h $xr11, $xr24, $xr14 +# CHECK-ENCODING: encoding: [0x0b,0xbb,0xae,0x74] + +xvmaddwod.d.w $xr0, $xr20, $xr13 +# CHECK-INST: xvmaddwod.d.w $xr0, $xr20, $xr13 +# CHECK-ENCODING: encoding: [0x80,0x36,0xaf,0x74] + +xvmaddwod.q.d $xr15, $xr23, $xr18 +# CHECK-INST: xvmaddwod.q.d $xr15, $xr23, $xr18 +# CHECK-ENCODING: encoding: [0xef,0xca,0xaf,0x74] + +xvmaddwod.h.bu $xr31, $xr23, $xr7 +# CHECK-INST: xvmaddwod.h.bu $xr31, $xr23, $xr7 +# CHECK-ENCODING: encoding: [0xff,0x1e,0xb6,0x74] + +xvmaddwod.w.hu $xr29, $xr16, $xr8 +# CHECK-INST: xvmaddwod.w.hu $xr29, $xr16, $xr8 +# CHECK-ENCODING: encoding: [0x1d,0xa2,0xb6,0x74] + +xvmaddwod.d.wu $xr23, $xr16, $xr11 +# CHECK-INST: xvmaddwod.d.wu $xr23, $xr16, $xr11 +# CHECK-ENCODING: encoding: [0x17,0x2e,0xb7,0x74] + +xvmaddwod.q.du $xr9, $xr10, $xr19 +# CHECK-INST: xvmaddwod.q.du $xr9, $xr10, $xr19 +# CHECK-ENCODING: encoding: [0x49,0xcd,0xb7,0x74] + +xvmaddwod.h.bu.b $xr27, $xr2, $xr11 +# CHECK-INST: xvmaddwod.h.bu.b $xr27, $xr2, $xr11 +# CHECK-ENCODING: encoding: [0x5b,0x2c,0xbe,0x74] + +xvmaddwod.w.hu.h $xr12, $xr24, $xr19 +# CHECK-INST: xvmaddwod.w.hu.h $xr12, $xr24, $xr19 +# CHECK-ENCODING: encoding: [0x0c,0xcf,0xbe,0x74] + +xvmaddwod.d.wu.w $xr11, $xr0, $xr14 +# CHECK-INST: xvmaddwod.d.wu.w $xr11, $xr0, $xr14 +# CHECK-ENCODING: encoding: [0x0b,0x38,0xbf,0x74] + +xvmaddwod.q.du.d $xr29, $xr19, $xr31 +# CHECK-INST: xvmaddwod.q.du.d $xr29, $xr19, $xr31 +# CHECK-ENCODING: encoding: [0x7d,0xfe,0xbf,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/max.s b/llvm/test/MC/LoongArch/lasx/max.s new file mode 100644 index 00000000000000..1ae100309c5cf7 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/max.s @@ -0,0 +1,68 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvmax.b $xr23, $xr8, $xr13 +# CHECK-INST: xvmax.b $xr23, $xr8, $xr13 +# CHECK-ENCODING: encoding: [0x17,0x35,0x70,0x74] + +xvmax.h $xr13, $xr18, $xr28 +# CHECK-INST: xvmax.h $xr13, $xr18, $xr28 +# CHECK-ENCODING: encoding: [0x4d,0xf2,0x70,0x74] + +xvmax.w $xr26, $xr1, $xr2 +# CHECK-INST: xvmax.w $xr26, $xr1, $xr2 +# CHECK-ENCODING: encoding: [0x3a,0x08,0x71,0x74] + +xvmax.d $xr2, $xr17, $xr13 +# CHECK-INST: xvmax.d $xr2, $xr17, $xr13 +# CHECK-ENCODING: encoding: [0x22,0xb6,0x71,0x74] + +xvmaxi.b $xr6, $xr7, 1 +# CHECK-INST: xvmaxi.b $xr6, $xr7, 1 +# CHECK-ENCODING: encoding: [0xe6,0x04,0x90,0x76] + +xvmaxi.h $xr24, $xr10, -7 +# CHECK-INST: xvmaxi.h $xr24, $xr10, -7 +# CHECK-ENCODING: encoding: [0x58,0xe5,0x90,0x76] + +xvmaxi.w $xr24, $xr18, -8 +# CHECK-INST: xvmaxi.w $xr24, $xr18, -8 +# CHECK-ENCODING: encoding: [0x58,0x62,0x91,0x76] + +xvmaxi.d $xr21, $xr5, -11 +# CHECK-INST: xvmaxi.d $xr21, $xr5, -11 +# CHECK-ENCODING: encoding: [0xb5,0xd4,0x91,0x76] + +xvmax.bu $xr29, $xr30, $xr11 +# CHECK-INST: xvmax.bu $xr29, $xr30, $xr11 +# CHECK-ENCODING: encoding: [0xdd,0x2f,0x74,0x74] + +xvmax.hu $xr4, $xr23, $xr27 +# CHECK-INST: xvmax.hu $xr4, $xr23, $xr27 +# CHECK-ENCODING: encoding: [0xe4,0xee,0x74,0x74] + +xvmax.wu $xr31, $xr0, $xr0 +# CHECK-INST: xvmax.wu $xr31, $xr0, $xr0 +# CHECK-ENCODING: encoding: [0x1f,0x00,0x75,0x74] + +xvmax.du $xr5, $xr22, $xr9 +# CHECK-INST: xvmax.du $xr5, $xr22, $xr9 +# CHECK-ENCODING: encoding: [0xc5,0xa6,0x75,0x74] + +xvmaxi.bu $xr12, $xr27, 28 +# CHECK-INST: xvmaxi.bu $xr12, $xr27, 28 +# CHECK-ENCODING: encoding: [0x6c,0x73,0x94,0x76] + +xvmaxi.hu $xr25, $xr4, 16 +# CHECK-INST: xvmaxi.hu $xr25, $xr4, 16 +# CHECK-ENCODING: encoding: [0x99,0xc0,0x94,0x76] + +xvmaxi.wu $xr27, $xr7, 21 +# CHECK-INST: xvmaxi.wu $xr27, $xr7, 21 +# CHECK-ENCODING: encoding: [0xfb,0x54,0x95,0x76] + +xvmaxi.du $xr31, $xr13, 9 +# CHECK-INST: xvmaxi.du $xr31, $xr13, 9 +# CHECK-ENCODING: encoding: [0xbf,0xa5,0x95,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/min.s b/llvm/test/MC/LoongArch/lasx/min.s new file mode 100644 index 00000000000000..170c111242267f --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/min.s @@ -0,0 +1,68 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvmin.b $xr21, $xr26, $xr7 +# CHECK-INST: xvmin.b $xr21, $xr26, $xr7 +# CHECK-ENCODING: encoding: [0x55,0x1f,0x72,0x74] + +xvmin.h $xr29, $xr5, $xr9 +# CHECK-INST: xvmin.h $xr29, $xr5, $xr9 +# CHECK-ENCODING: encoding: [0xbd,0xa4,0x72,0x74] + +xvmin.w $xr31, $xr24, $xr20 +# CHECK-INST: xvmin.w $xr31, $xr24, $xr20 +# CHECK-ENCODING: encoding: [0x1f,0x53,0x73,0x74] + +xvmin.d $xr27, $xr27, $xr2 +# CHECK-INST: xvmin.d $xr27, $xr27, $xr2 +# CHECK-ENCODING: encoding: [0x7b,0x8b,0x73,0x74] + +xvmini.b $xr22, $xr17, 9 +# CHECK-INST: xvmini.b $xr22, $xr17, 9 +# CHECK-ENCODING: encoding: [0x36,0x26,0x92,0x76] + +xvmini.h $xr12, $xr23, -15 +# CHECK-INST: xvmini.h $xr12, $xr23, -15 +# CHECK-ENCODING: encoding: [0xec,0xc6,0x92,0x76] + +xvmini.w $xr1, $xr17, -13 +# CHECK-INST: xvmini.w $xr1, $xr17, -13 +# CHECK-ENCODING: encoding: [0x21,0x4e,0x93,0x76] + +xvmini.d $xr10, $xr31, 11 +# CHECK-INST: xvmini.d $xr10, $xr31, 11 +# CHECK-ENCODING: encoding: [0xea,0xaf,0x93,0x76] + +xvmin.bu $xr15, $xr16, $xr3 +# CHECK-INST: xvmin.bu $xr15, $xr16, $xr3 +# CHECK-ENCODING: encoding: [0x0f,0x0e,0x76,0x74] + +xvmin.hu $xr4, $xr31, $xr27 +# CHECK-INST: xvmin.hu $xr4, $xr31, $xr27 +# CHECK-ENCODING: encoding: [0xe4,0xef,0x76,0x74] + +xvmin.wu $xr15, $xr13, $xr28 +# CHECK-INST: xvmin.wu $xr15, $xr13, $xr28 +# CHECK-ENCODING: encoding: [0xaf,0x71,0x77,0x74] + +xvmin.du $xr27, $xr3, $xr5 +# CHECK-INST: xvmin.du $xr27, $xr3, $xr5 +# CHECK-ENCODING: encoding: [0x7b,0x94,0x77,0x74] + +xvmini.bu $xr6, $xr24, 7 +# CHECK-INST: xvmini.bu $xr6, $xr24, 7 +# CHECK-ENCODING: encoding: [0x06,0x1f,0x96,0x76] + +xvmini.hu $xr8, $xr5, 29 +# CHECK-INST: xvmini.hu $xr8, $xr5, 29 +# CHECK-ENCODING: encoding: [0xa8,0xf4,0x96,0x76] + +xvmini.wu $xr17, $xr13, 19 +# CHECK-INST: xvmini.wu $xr17, $xr13, 19 +# CHECK-ENCODING: encoding: [0xb1,0x4d,0x97,0x76] + +xvmini.du $xr16, $xr23, 30 +# CHECK-INST: xvmini.du $xr16, $xr23, 30 +# CHECK-ENCODING: encoding: [0xf0,0xfa,0x97,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/mod.s b/llvm/test/MC/LoongArch/lasx/mod.s new file mode 100644 index 00000000000000..bdb458a8d572e8 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/mod.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvmod.b $xr8, $xr3, $xr0 +# CHECK-INST: xvmod.b $xr8, $xr3, $xr0 +# CHECK-ENCODING: encoding: [0x68,0x00,0xe2,0x74] + +xvmod.h $xr2, $xr17, $xr28 +# CHECK-INST: xvmod.h $xr2, $xr17, $xr28 +# CHECK-ENCODING: encoding: [0x22,0xf2,0xe2,0x74] + +xvmod.w $xr14, $xr8, $xr13 +# CHECK-INST: xvmod.w $xr14, $xr8, $xr13 +# CHECK-ENCODING: encoding: [0x0e,0x35,0xe3,0x74] + +xvmod.d $xr11, $xr10, $xr18 +# CHECK-INST: xvmod.d $xr11, $xr10, $xr18 +# CHECK-ENCODING: encoding: [0x4b,0xc9,0xe3,0x74] + +xvmod.bu $xr16, $xr1, $xr26 +# CHECK-INST: xvmod.bu $xr16, $xr1, $xr26 +# CHECK-ENCODING: encoding: [0x30,0x68,0xe6,0x74] + +xvmod.hu $xr15, $xr13, $xr0 +# CHECK-INST: xvmod.hu $xr15, $xr13, $xr0 +# CHECK-ENCODING: encoding: [0xaf,0x81,0xe6,0x74] + +xvmod.wu $xr11, $xr19, $xr20 +# CHECK-INST: xvmod.wu $xr11, $xr19, $xr20 +# CHECK-ENCODING: encoding: [0x6b,0x52,0xe7,0x74] + +xvmod.du $xr14, $xr3, $xr6 +# CHECK-INST: xvmod.du $xr14, $xr3, $xr6 +# CHECK-ENCODING: encoding: [0x6e,0x98,0xe7,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/mskgez.s b/llvm/test/MC/LoongArch/lasx/mskgez.s new file mode 100644 index 00000000000000..347b2fed570fa5 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/mskgez.s @@ -0,0 +1,8 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvmskgez.b $xr30, $xr5 +# CHECK-INST: xvmskgez.b $xr30, $xr5 +# CHECK-ENCODING: encoding: [0xbe,0x50,0x9c,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/mskltz.s b/llvm/test/MC/LoongArch/lasx/mskltz.s new file mode 100644 index 00000000000000..52dd411d0c6014 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/mskltz.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvmskltz.b $xr14, $xr5 +# CHECK-INST: xvmskltz.b $xr14, $xr5 +# CHECK-ENCODING: encoding: [0xae,0x40,0x9c,0x76] + +xvmskltz.h $xr11, $xr25 +# CHECK-INST: xvmskltz.h $xr11, $xr25 +# CHECK-ENCODING: encoding: [0x2b,0x47,0x9c,0x76] + +xvmskltz.w $xr14, $xr27 +# CHECK-INST: xvmskltz.w $xr14, $xr27 +# CHECK-ENCODING: encoding: [0x6e,0x4b,0x9c,0x76] + +xvmskltz.d $xr7, $xr23 +# CHECK-INST: xvmskltz.d $xr7, $xr23 +# CHECK-ENCODING: encoding: [0xe7,0x4e,0x9c,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/msknz.s b/llvm/test/MC/LoongArch/lasx/msknz.s new file mode 100644 index 00000000000000..288c7e616526c1 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/msknz.s @@ -0,0 +1,8 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvmsknz.b $xr22, $xr22 +# CHECK-INST: xvmsknz.b $xr22, $xr22 +# CHECK-ENCODING: encoding: [0xd6,0x62,0x9c,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/msub.s b/llvm/test/MC/LoongArch/lasx/msub.s new file mode 100644 index 00000000000000..72da08a745db88 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/msub.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvmsub.b $xr22, $xr20, $xr7 +# CHECK-INST: xvmsub.b $xr22, $xr20, $xr7 +# CHECK-ENCODING: encoding: [0x96,0x1e,0xaa,0x74] + +xvmsub.h $xr0, $xr18, $xr12 +# CHECK-INST: xvmsub.h $xr0, $xr18, $xr12 +# CHECK-ENCODING: encoding: [0x40,0xb2,0xaa,0x74] + +xvmsub.w $xr3, $xr22, $xr29 +# CHECK-INST: xvmsub.w $xr3, $xr22, $xr29 +# CHECK-ENCODING: encoding: [0xc3,0x76,0xab,0x74] + +xvmsub.d $xr11, $xr26, $xr2 +# CHECK-INST: xvmsub.d $xr11, $xr26, $xr2 +# CHECK-ENCODING: encoding: [0x4b,0x8b,0xab,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/muh.s b/llvm/test/MC/LoongArch/lasx/muh.s new file mode 100644 index 00000000000000..226a97a05f2b6d --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/muh.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvmuh.b $xr4, $xr8, $xr4 +# CHECK-INST: xvmuh.b $xr4, $xr8, $xr4 +# CHECK-ENCODING: encoding: [0x04,0x11,0x86,0x74] + +xvmuh.h $xr5, $xr23, $xr26 +# CHECK-INST: xvmuh.h $xr5, $xr23, $xr26 +# CHECK-ENCODING: encoding: [0xe5,0xea,0x86,0x74] + +xvmuh.w $xr28, $xr3, $xr25 +# CHECK-INST: xvmuh.w $xr28, $xr3, $xr25 +# CHECK-ENCODING: encoding: [0x7c,0x64,0x87,0x74] + +xvmuh.d $xr6, $xr0, $xr9 +# CHECK-INST: xvmuh.d $xr6, $xr0, $xr9 +# CHECK-ENCODING: encoding: [0x06,0xa4,0x87,0x74] + +xvmuh.bu $xr15, $xr20, $xr24 +# CHECK-INST: xvmuh.bu $xr15, $xr20, $xr24 +# CHECK-ENCODING: encoding: [0x8f,0x62,0x88,0x74] + +xvmuh.hu $xr28, $xr12, $xr27 +# CHECK-INST: xvmuh.hu $xr28, $xr12, $xr27 +# CHECK-ENCODING: encoding: [0x9c,0xed,0x88,0x74] + +xvmuh.wu $xr25, $xr6, $xr10 +# CHECK-INST: xvmuh.wu $xr25, $xr6, $xr10 +# CHECK-ENCODING: encoding: [0xd9,0x28,0x89,0x74] + +xvmuh.du $xr19, $xr8, $xr31 +# CHECK-INST: xvmuh.du $xr19, $xr8, $xr31 +# CHECK-ENCODING: encoding: [0x13,0xfd,0x89,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/mul.s b/llvm/test/MC/LoongArch/lasx/mul.s new file mode 100644 index 00000000000000..8d24b6549b4516 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/mul.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvmul.b $xr18, $xr7, $xr27 +# CHECK-INST: xvmul.b $xr18, $xr7, $xr27 +# CHECK-ENCODING: encoding: [0xf2,0x6c,0x84,0x74] + +xvmul.h $xr9, $xr23, $xr18 +# CHECK-INST: xvmul.h $xr9, $xr23, $xr18 +# CHECK-ENCODING: encoding: [0xe9,0xca,0x84,0x74] + +xvmul.w $xr21, $xr8, $xr27 +# CHECK-INST: xvmul.w $xr21, $xr8, $xr27 +# CHECK-ENCODING: encoding: [0x15,0x6d,0x85,0x74] + +xvmul.d $xr0, $xr15, $xr8 +# CHECK-INST: xvmul.d $xr0, $xr15, $xr8 +# CHECK-ENCODING: encoding: [0xe0,0xa1,0x85,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/mulw.s b/llvm/test/MC/LoongArch/lasx/mulw.s new file mode 100644 index 00000000000000..42aa23ba91d8f6 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/mulw.s @@ -0,0 +1,100 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvmulwev.h.b $xr2, $xr7, $xr16 +# CHECK-INST: xvmulwev.h.b $xr2, $xr7, $xr16 +# CHECK-ENCODING: encoding: [0xe2,0x40,0x90,0x74] + +xvmulwev.w.h $xr12, $xr11, $xr6 +# CHECK-INST: xvmulwev.w.h $xr12, $xr11, $xr6 +# CHECK-ENCODING: encoding: [0x6c,0x99,0x90,0x74] + +xvmulwev.d.w $xr16, $xr24, $xr15 +# CHECK-INST: xvmulwev.d.w $xr16, $xr24, $xr15 +# CHECK-ENCODING: encoding: [0x10,0x3f,0x91,0x74] + +xvmulwev.q.d $xr17, $xr16, $xr4 +# CHECK-INST: xvmulwev.q.d $xr17, $xr16, $xr4 +# CHECK-ENCODING: encoding: [0x11,0x92,0x91,0x74] + +xvmulwev.h.bu $xr20, $xr7, $xr29 +# CHECK-INST: xvmulwev.h.bu $xr20, $xr7, $xr29 +# CHECK-ENCODING: encoding: [0xf4,0x74,0x98,0x74] + +xvmulwev.w.hu $xr13, $xr24, $xr17 +# CHECK-INST: xvmulwev.w.hu $xr13, $xr24, $xr17 +# CHECK-ENCODING: encoding: [0x0d,0xc7,0x98,0x74] + +xvmulwev.d.wu $xr1, $xr24, $xr30 +# CHECK-INST: xvmulwev.d.wu $xr1, $xr24, $xr30 +# CHECK-ENCODING: encoding: [0x01,0x7b,0x99,0x74] + +xvmulwev.q.du $xr1, $xr22, $xr27 +# CHECK-INST: xvmulwev.q.du $xr1, $xr22, $xr27 +# CHECK-ENCODING: encoding: [0xc1,0xee,0x99,0x74] + +xvmulwev.h.bu.b $xr13, $xr28, $xr12 +# CHECK-INST: xvmulwev.h.bu.b $xr13, $xr28, $xr12 +# CHECK-ENCODING: encoding: [0x8d,0x33,0xa0,0x74] + +xvmulwev.w.hu.h $xr27, $xr16, $xr7 +# CHECK-INST: xvmulwev.w.hu.h $xr27, $xr16, $xr7 +# CHECK-ENCODING: encoding: [0x1b,0x9e,0xa0,0x74] + +xvmulwev.d.wu.w $xr13, $xr7, $xr17 +# CHECK-INST: xvmulwev.d.wu.w $xr13, $xr7, $xr17 +# CHECK-ENCODING: encoding: [0xed,0x44,0xa1,0x74] + +xvmulwev.q.du.d $xr9, $xr20, $xr15 +# CHECK-INST: xvmulwev.q.du.d $xr9, $xr20, $xr15 +# CHECK-ENCODING: encoding: [0x89,0xbe,0xa1,0x74] + +xvmulwod.h.b $xr16, $xr18, $xr2 +# CHECK-INST: xvmulwod.h.b $xr16, $xr18, $xr2 +# CHECK-ENCODING: encoding: [0x50,0x0a,0x92,0x74] + +xvmulwod.w.h $xr30, $xr2, $xr23 +# CHECK-INST: xvmulwod.w.h $xr30, $xr2, $xr23 +# CHECK-ENCODING: encoding: [0x5e,0xdc,0x92,0x74] + +xvmulwod.d.w $xr30, $xr27, $xr8 +# CHECK-INST: xvmulwod.d.w $xr30, $xr27, $xr8 +# CHECK-ENCODING: encoding: [0x7e,0x23,0x93,0x74] + +xvmulwod.q.d $xr20, $xr21, $xr15 +# CHECK-INST: xvmulwod.q.d $xr20, $xr21, $xr15 +# CHECK-ENCODING: encoding: [0xb4,0xbe,0x93,0x74] + +xvmulwod.h.bu $xr19, $xr26, $xr7 +# CHECK-INST: xvmulwod.h.bu $xr19, $xr26, $xr7 +# CHECK-ENCODING: encoding: [0x53,0x1f,0x9a,0x74] + +xvmulwod.w.hu $xr14, $xr17, $xr6 +# CHECK-INST: xvmulwod.w.hu $xr14, $xr17, $xr6 +# CHECK-ENCODING: encoding: [0x2e,0x9a,0x9a,0x74] + +xvmulwod.d.wu $xr24, $xr22, $xr20 +# CHECK-INST: xvmulwod.d.wu $xr24, $xr22, $xr20 +# CHECK-ENCODING: encoding: [0xd8,0x52,0x9b,0x74] + +xvmulwod.q.du $xr28, $xr31, $xr7 +# CHECK-INST: xvmulwod.q.du $xr28, $xr31, $xr7 +# CHECK-ENCODING: encoding: [0xfc,0x9f,0x9b,0x74] + +xvmulwod.h.bu.b $xr24, $xr15, $xr28 +# CHECK-INST: xvmulwod.h.bu.b $xr24, $xr15, $xr28 +# CHECK-ENCODING: encoding: [0xf8,0x71,0xa2,0x74] + +xvmulwod.w.hu.h $xr24, $xr8, $xr1 +# CHECK-INST: xvmulwod.w.hu.h $xr24, $xr8, $xr1 +# CHECK-ENCODING: encoding: [0x18,0x85,0xa2,0x74] + +xvmulwod.d.wu.w $xr10, $xr3, $xr1 +# CHECK-INST: xvmulwod.d.wu.w $xr10, $xr3, $xr1 +# CHECK-ENCODING: encoding: [0x6a,0x04,0xa3,0x74] + +xvmulwod.q.du.d $xr15, $xr15, $xr2 +# CHECK-INST: xvmulwod.q.du.d $xr15, $xr15, $xr2 +# CHECK-ENCODING: encoding: [0xef,0x89,0xa3,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/neg.s b/llvm/test/MC/LoongArch/lasx/neg.s new file mode 100644 index 00000000000000..7db7de62e0ebdc --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/neg.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvneg.b $xr23, $xr4 +# CHECK-INST: xvneg.b $xr23, $xr4 +# CHECK-ENCODING: encoding: [0x97,0x30,0x9c,0x76] + +xvneg.h $xr8, $xr14 +# CHECK-INST: xvneg.h $xr8, $xr14 +# CHECK-ENCODING: encoding: [0xc8,0x35,0x9c,0x76] + +xvneg.w $xr23, $xr14 +# CHECK-INST: xvneg.w $xr23, $xr14 +# CHECK-ENCODING: encoding: [0xd7,0x39,0x9c,0x76] + +xvneg.d $xr20, $xr17 +# CHECK-INST: xvneg.d $xr20, $xr17 +# CHECK-ENCODING: encoding: [0x34,0x3e,0x9c,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/nor.s b/llvm/test/MC/LoongArch/lasx/nor.s new file mode 100644 index 00000000000000..95ef446bf4f06d --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/nor.s @@ -0,0 +1,8 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvnor.v $xr4, $xr23, $xr3 +# CHECK-INST: xvnor.v $xr4, $xr23, $xr3 +# CHECK-ENCODING: encoding: [0xe4,0x8e,0x27,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/nori.s b/llvm/test/MC/LoongArch/lasx/nori.s new file mode 100644 index 00000000000000..42ea27d4379b2a --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/nori.s @@ -0,0 +1,8 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvnori.b $xr7, $xr1, 209 +# CHECK-INST: xvnori.b $xr7, $xr1, 209 +# CHECK-ENCODING: encoding: [0x27,0x44,0xdf,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/or.s b/llvm/test/MC/LoongArch/lasx/or.s new file mode 100644 index 00000000000000..dd4c17600cb0e4 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/or.s @@ -0,0 +1,8 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvor.v $xr6, $xr29, $xr21 +# CHECK-INST: xvor.v $xr6, $xr29, $xr21 +# CHECK-ENCODING: encoding: [0xa6,0xd7,0x26,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/ori.s b/llvm/test/MC/LoongArch/lasx/ori.s new file mode 100644 index 00000000000000..2b1e56a5c3ac7c --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/ori.s @@ -0,0 +1,8 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvori.b $xr6, $xr2, 239 +# CHECK-INST: xvori.b $xr6, $xr2, 239 +# CHECK-ENCODING: encoding: [0x46,0xbc,0xd7,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/orn.s b/llvm/test/MC/LoongArch/lasx/orn.s new file mode 100644 index 00000000000000..a318de2574b894 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/orn.s @@ -0,0 +1,8 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvorn.v $xr17, $xr29, $xr5 +# CHECK-INST: xvorn.v $xr17, $xr29, $xr5 +# CHECK-ENCODING: encoding: [0xb1,0x97,0x28,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/pack.s b/llvm/test/MC/LoongArch/lasx/pack.s new file mode 100644 index 00000000000000..bb71be4b0fcac5 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/pack.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvpackev.b $xr21, $xr2, $xr8 +# CHECK-INST: xvpackev.b $xr21, $xr2, $xr8 +# CHECK-ENCODING: encoding: [0x55,0x20,0x16,0x75] + +xvpackev.h $xr8, $xr18, $xr6 +# CHECK-INST: xvpackev.h $xr8, $xr18, $xr6 +# CHECK-ENCODING: encoding: [0x48,0x9a,0x16,0x75] + +xvpackev.w $xr0, $xr6, $xr30 +# CHECK-INST: xvpackev.w $xr0, $xr6, $xr30 +# CHECK-ENCODING: encoding: [0xc0,0x78,0x17,0x75] + +xvpackev.d $xr0, $xr9, $xr4 +# CHECK-INST: xvpackev.d $xr0, $xr9, $xr4 +# CHECK-ENCODING: encoding: [0x20,0x91,0x17,0x75] + +xvpackod.b $xr28, $xr29, $xr31 +# CHECK-INST: xvpackod.b $xr28, $xr29, $xr31 +# CHECK-ENCODING: encoding: [0xbc,0x7f,0x18,0x75] + +xvpackod.h $xr14, $xr10, $xr6 +# CHECK-INST: xvpackod.h $xr14, $xr10, $xr6 +# CHECK-ENCODING: encoding: [0x4e,0x99,0x18,0x75] + +xvpackod.w $xr22, $xr21, $xr2 +# CHECK-INST: xvpackod.w $xr22, $xr21, $xr2 +# CHECK-ENCODING: encoding: [0xb6,0x0a,0x19,0x75] + +xvpackod.d $xr18, $xr9, $xr2 +# CHECK-INST: xvpackod.d $xr18, $xr9, $xr2 +# CHECK-ENCODING: encoding: [0x32,0x89,0x19,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/pcnt.s b/llvm/test/MC/LoongArch/lasx/pcnt.s new file mode 100644 index 00000000000000..9f1786bec0eee1 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/pcnt.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvpcnt.b $xr8, $xr27 +# CHECK-INST: xvpcnt.b $xr8, $xr27 +# CHECK-ENCODING: encoding: [0x68,0x23,0x9c,0x76] + +xvpcnt.h $xr12, $xr4 +# CHECK-INST: xvpcnt.h $xr12, $xr4 +# CHECK-ENCODING: encoding: [0x8c,0x24,0x9c,0x76] + +xvpcnt.w $xr31, $xr23 +# CHECK-INST: xvpcnt.w $xr31, $xr23 +# CHECK-ENCODING: encoding: [0xff,0x2a,0x9c,0x76] + +xvpcnt.d $xr26, $xr12 +# CHECK-INST: xvpcnt.d $xr26, $xr12 +# CHECK-ENCODING: encoding: [0x9a,0x2d,0x9c,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/perm.s b/llvm/test/MC/LoongArch/lasx/perm.s new file mode 100644 index 00000000000000..85bef644c7ae79 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/perm.s @@ -0,0 +1,8 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvperm.w $xr24, $xr23, $xr16 +# CHECK-INST: xvperm.w $xr24, $xr23, $xr16 +# CHECK-ENCODING: encoding: [0xf8,0x42,0x7d,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/permi.s b/llvm/test/MC/LoongArch/lasx/permi.s new file mode 100644 index 00000000000000..4d925a86b20655 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/permi.s @@ -0,0 +1,16 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvpermi.w $xr7, $xr12, 101 +# CHECK-INST: xvpermi.w $xr7, $xr12, 101 +# CHECK-ENCODING: encoding: [0x87,0x95,0xe5,0x77] + +xvpermi.d $xr17, $xr6, 131 +# CHECK-INST: xvpermi.d $xr17, $xr6, 131 +# CHECK-ENCODING: encoding: [0xd1,0x0c,0xea,0x77] + +xvpermi.q $xr10, $xr15, 184 +# CHECK-INST: xvpermi.q $xr10, $xr15, 184 +# CHECK-ENCODING: encoding: [0xea,0xe1,0xee,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/pick.s b/llvm/test/MC/LoongArch/lasx/pick.s new file mode 100644 index 00000000000000..7510d2088ebe60 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/pick.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvpickev.b $xr22, $xr27, $xr6 +# CHECK-INST: xvpickev.b $xr22, $xr27, $xr6 +# CHECK-ENCODING: encoding: [0x76,0x1b,0x1e,0x75] + +xvpickev.h $xr14, $xr11, $xr3 +# CHECK-INST: xvpickev.h $xr14, $xr11, $xr3 +# CHECK-ENCODING: encoding: [0x6e,0x8d,0x1e,0x75] + +xvpickev.w $xr30, $xr28, $xr13 +# CHECK-INST: xvpickev.w $xr30, $xr28, $xr13 +# CHECK-ENCODING: encoding: [0x9e,0x37,0x1f,0x75] + +xvpickev.d $xr1, $xr24, $xr9 +# CHECK-INST: xvpickev.d $xr1, $xr24, $xr9 +# CHECK-ENCODING: encoding: [0x01,0xa7,0x1f,0x75] + +xvpickod.b $xr14, $xr22, $xr15 +# CHECK-INST: xvpickod.b $xr14, $xr22, $xr15 +# CHECK-ENCODING: encoding: [0xce,0x3e,0x20,0x75] + +xvpickod.h $xr31, $xr21, $xr12 +# CHECK-INST: xvpickod.h $xr31, $xr21, $xr12 +# CHECK-ENCODING: encoding: [0xbf,0xb2,0x20,0x75] + +xvpickod.w $xr31, $xr0, $xr30 +# CHECK-INST: xvpickod.w $xr31, $xr0, $xr30 +# CHECK-ENCODING: encoding: [0x1f,0x78,0x21,0x75] + +xvpickod.d $xr10, $xr5, $xr16 +# CHECK-INST: xvpickod.d $xr10, $xr5, $xr16 +# CHECK-ENCODING: encoding: [0xaa,0xc0,0x21,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/pickve.s b/llvm/test/MC/LoongArch/lasx/pickve.s new file mode 100644 index 00000000000000..6f8c40bfa69945 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/pickve.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvpickve.w $xr25, $xr28, 1 +# CHECK-INST: xvpickve.w $xr25, $xr28, 1 +# CHECK-ENCODING: encoding: [0x99,0xc7,0x03,0x77] + +xvpickve.d $xr13, $xr1, 0 +# CHECK-INST: xvpickve.d $xr13, $xr1, 0 +# CHECK-ENCODING: encoding: [0x2d,0xe0,0x03,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/pickve2gr.s b/llvm/test/MC/LoongArch/lasx/pickve2gr.s new file mode 100644 index 00000000000000..d378d4ff6a1ef9 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/pickve2gr.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvpickve2gr.w $r14, $xr11, 6 +# CHECK-INST: xvpickve2gr.w $t2, $xr11, 6 +# CHECK-ENCODING: encoding: [0x6e,0xd9,0xef,0x76] + +xvpickve2gr.d $r8, $xr6, 0 +# CHECK-INST: xvpickve2gr.d $a4, $xr6, 0 +# CHECK-ENCODING: encoding: [0xc8,0xe0,0xef,0x76] + +xvpickve2gr.wu $r12, $xr1, 4 +# CHECK-INST: xvpickve2gr.wu $t0, $xr1, 4 +# CHECK-ENCODING: encoding: [0x2c,0xd0,0xf3,0x76] + +xvpickve2gr.du $r10, $xr8, 0 +# CHECK-INST: xvpickve2gr.du $a6, $xr8, 0 +# CHECK-ENCODING: encoding: [0x0a,0xe1,0xf3,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/repl128vei.s b/llvm/test/MC/LoongArch/lasx/repl128vei.s new file mode 100644 index 00000000000000..44f9b959654634 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/repl128vei.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvrepl128vei.b $xr10, $xr19, 2 +# CHECK-INST: xvrepl128vei.b $xr10, $xr19, 2 +# CHECK-ENCODING: encoding: [0x6a,0x8a,0xf7,0x76] + +xvrepl128vei.h $xr6, $xr19, 2 +# CHECK-INST: xvrepl128vei.h $xr6, $xr19, 2 +# CHECK-ENCODING: encoding: [0x66,0xca,0xf7,0x76] + +xvrepl128vei.w $xr11, $xr13, 1 +# CHECK-INST: xvrepl128vei.w $xr11, $xr13, 1 +# CHECK-ENCODING: encoding: [0xab,0xe5,0xf7,0x76] + +xvrepl128vei.d $xr31, $xr23, 0 +# CHECK-INST: xvrepl128vei.d $xr31, $xr23, 0 +# CHECK-ENCODING: encoding: [0xff,0xf2,0xf7,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/replgr2vr.s b/llvm/test/MC/LoongArch/lasx/replgr2vr.s new file mode 100644 index 00000000000000..d1584c3c017f0d --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/replgr2vr.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvreplgr2vr.b $xr16, $r16 +# CHECK-INST: xvreplgr2vr.b $xr16, $t4 +# CHECK-ENCODING: encoding: [0x10,0x02,0x9f,0x76] + +xvreplgr2vr.h $xr7, $r22 +# CHECK-INST: xvreplgr2vr.h $xr7, $fp +# CHECK-ENCODING: encoding: [0xc7,0x06,0x9f,0x76] + +xvreplgr2vr.w $xr4, $r15 +# CHECK-INST: xvreplgr2vr.w $xr4, $t3 +# CHECK-ENCODING: encoding: [0xe4,0x09,0x9f,0x76] + +xvreplgr2vr.d $xr16, $r24 +# CHECK-INST: xvreplgr2vr.d $xr16, $s1 +# CHECK-ENCODING: encoding: [0x10,0x0f,0x9f,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/replve.s b/llvm/test/MC/LoongArch/lasx/replve.s new file mode 100644 index 00000000000000..c0319a426b5b5f --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/replve.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvreplve.b $xr20, $xr16, $r11 +# CHECK-INST: xvreplve.b $xr20, $xr16, $a7 +# CHECK-ENCODING: encoding: [0x14,0x2e,0x22,0x75] + +xvreplve.h $xr0, $xr21, $r24 +# CHECK-INST: xvreplve.h $xr0, $xr21, $s1 +# CHECK-ENCODING: encoding: [0xa0,0xe2,0x22,0x75] + +xvreplve.w $xr20, $xr18, $r18 +# CHECK-INST: xvreplve.w $xr20, $xr18, $t6 +# CHECK-ENCODING: encoding: [0x54,0x4a,0x23,0x75] + +xvreplve.d $xr4, $xr3, $r23 +# CHECK-INST: xvreplve.d $xr4, $xr3, $s0 +# CHECK-ENCODING: encoding: [0x64,0xdc,0x23,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/replve0.s b/llvm/test/MC/LoongArch/lasx/replve0.s new file mode 100644 index 00000000000000..f3289a5c464ff5 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/replve0.s @@ -0,0 +1,24 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvreplve0.b $xr11, $xr20 +# CHECK-INST: xvreplve0.b $xr11, $xr20 +# CHECK-ENCODING: encoding: [0x8b,0x02,0x07,0x77] + +xvreplve0.h $xr13, $xr26 +# CHECK-INST: xvreplve0.h $xr13, $xr26 +# CHECK-ENCODING: encoding: [0x4d,0x83,0x07,0x77] + +xvreplve0.w $xr8, $xr12 +# CHECK-INST: xvreplve0.w $xr8, $xr12 +# CHECK-ENCODING: encoding: [0x88,0xc1,0x07,0x77] + +xvreplve0.d $xr20, $xr4 +# CHECK-INST: xvreplve0.d $xr20, $xr4 +# CHECK-ENCODING: encoding: [0x94,0xe0,0x07,0x77] + +xvreplve0.q $xr17, $xr20 +# CHECK-INST: xvreplve0.q $xr17, $xr20 +# CHECK-ENCODING: encoding: [0x91,0xf2,0x07,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/rotr.s b/llvm/test/MC/LoongArch/lasx/rotr.s new file mode 100644 index 00000000000000..c6dec2da73e665 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/rotr.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvrotr.b $xr0, $xr6, $xr30 +# CHECK-INST: xvrotr.b $xr0, $xr6, $xr30 +# CHECK-ENCODING: encoding: [0xc0,0x78,0xee,0x74] + +xvrotr.h $xr19, $xr17, $xr10 +# CHECK-INST: xvrotr.h $xr19, $xr17, $xr10 +# CHECK-ENCODING: encoding: [0x33,0xaa,0xee,0x74] + +xvrotr.w $xr18, $xr2, $xr7 +# CHECK-INST: xvrotr.w $xr18, $xr2, $xr7 +# CHECK-ENCODING: encoding: [0x52,0x1c,0xef,0x74] + +xvrotr.d $xr11, $xr23, $xr11 +# CHECK-INST: xvrotr.d $xr11, $xr23, $xr11 +# CHECK-ENCODING: encoding: [0xeb,0xae,0xef,0x74] + +xvrotri.b $xr1, $xr5, 3 +# CHECK-INST: xvrotri.b $xr1, $xr5, 3 +# CHECK-ENCODING: encoding: [0xa1,0x2c,0xa0,0x76] + +xvrotri.h $xr1, $xr17, 3 +# CHECK-INST: xvrotri.h $xr1, $xr17, 3 +# CHECK-ENCODING: encoding: [0x21,0x4e,0xa0,0x76] + +xvrotri.w $xr25, $xr23, 19 +# CHECK-INST: xvrotri.w $xr25, $xr23, 19 +# CHECK-ENCODING: encoding: [0xf9,0xce,0xa0,0x76] + +xvrotri.d $xr7, $xr24, 37 +# CHECK-INST: xvrotri.d $xr7, $xr24, 37 +# CHECK-ENCODING: encoding: [0x07,0x97,0xa1,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/sadd.s b/llvm/test/MC/LoongArch/lasx/sadd.s new file mode 100644 index 00000000000000..abc84aaf8db75e --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/sadd.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsadd.b $xr27, $xr30, $xr22 +# CHECK-INST: xvsadd.b $xr27, $xr30, $xr22 +# CHECK-ENCODING: encoding: [0xdb,0x5b,0x46,0x74] + +xvsadd.h $xr29, $xr0, $xr1 +# CHECK-INST: xvsadd.h $xr29, $xr0, $xr1 +# CHECK-ENCODING: encoding: [0x1d,0x84,0x46,0x74] + +xvsadd.w $xr22, $xr28, $xr31 +# CHECK-INST: xvsadd.w $xr22, $xr28, $xr31 +# CHECK-ENCODING: encoding: [0x96,0x7f,0x47,0x74] + +xvsadd.d $xr5, $xr18, $xr26 +# CHECK-INST: xvsadd.d $xr5, $xr18, $xr26 +# CHECK-ENCODING: encoding: [0x45,0xea,0x47,0x74] + +xvsadd.bu $xr29, $xr20, $xr28 +# CHECK-INST: xvsadd.bu $xr29, $xr20, $xr28 +# CHECK-ENCODING: encoding: [0x9d,0x72,0x4a,0x74] + +xvsadd.hu $xr7, $xr16, $xr6 +# CHECK-INST: xvsadd.hu $xr7, $xr16, $xr6 +# CHECK-ENCODING: encoding: [0x07,0x9a,0x4a,0x74] + +xvsadd.wu $xr2, $xr10, $xr15 +# CHECK-INST: xvsadd.wu $xr2, $xr10, $xr15 +# CHECK-ENCODING: encoding: [0x42,0x3d,0x4b,0x74] + +xvsadd.du $xr18, $xr24, $xr14 +# CHECK-INST: xvsadd.du $xr18, $xr24, $xr14 +# CHECK-ENCODING: encoding: [0x12,0xbb,0x4b,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/sat.s b/llvm/test/MC/LoongArch/lasx/sat.s new file mode 100644 index 00000000000000..19b51ad1cbd37e --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/sat.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsat.b $xr22, $xr7, 2 +# CHECK-INST: xvsat.b $xr22, $xr7, 2 +# CHECK-ENCODING: encoding: [0xf6,0x28,0x24,0x77] + +xvsat.h $xr3, $xr0, 5 +# CHECK-INST: xvsat.h $xr3, $xr0, 5 +# CHECK-ENCODING: encoding: [0x03,0x54,0x24,0x77] + +xvsat.w $xr9, $xr16, 0 +# CHECK-INST: xvsat.w $xr9, $xr16, 0 +# CHECK-ENCODING: encoding: [0x09,0x82,0x24,0x77] + +xvsat.d $xr3, $xr8, 1 +# CHECK-INST: xvsat.d $xr3, $xr8, 1 +# CHECK-ENCODING: encoding: [0x03,0x05,0x25,0x77] + +xvsat.bu $xr6, $xr6, 4 +# CHECK-INST: xvsat.bu $xr6, $xr6, 4 +# CHECK-ENCODING: encoding: [0xc6,0x30,0x28,0x77] + +xvsat.hu $xr12, $xr25, 12 +# CHECK-INST: xvsat.hu $xr12, $xr25, 12 +# CHECK-ENCODING: encoding: [0x2c,0x73,0x28,0x77] + +xvsat.wu $xr20, $xr1, 3 +# CHECK-INST: xvsat.wu $xr20, $xr1, 3 +# CHECK-ENCODING: encoding: [0x34,0x8c,0x28,0x77] + +xvsat.du $xr5, $xr20, 7 +# CHECK-INST: xvsat.du $xr5, $xr20, 7 +# CHECK-ENCODING: encoding: [0x85,0x1e,0x29,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/seq.s b/llvm/test/MC/LoongArch/lasx/seq.s new file mode 100644 index 00000000000000..ca18422067d5b0 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/seq.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvseq.b $xr3, $xr4, $xr19 +# CHECK-INST: xvseq.b $xr3, $xr4, $xr19 +# CHECK-ENCODING: encoding: [0x83,0x4c,0x00,0x74] + +xvseq.h $xr0, $xr21, $xr5 +# CHECK-INST: xvseq.h $xr0, $xr21, $xr5 +# CHECK-ENCODING: encoding: [0xa0,0x96,0x00,0x74] + +xvseq.w $xr6, $xr16, $xr19 +# CHECK-INST: xvseq.w $xr6, $xr16, $xr19 +# CHECK-ENCODING: encoding: [0x06,0x4e,0x01,0x74] + +xvseq.d $xr8, $xr13, $xr13 +# CHECK-INST: xvseq.d $xr8, $xr13, $xr13 +# CHECK-ENCODING: encoding: [0xa8,0xb5,0x01,0x74] + +xvseqi.b $xr12, $xr25, 0 +# CHECK-INST: xvseqi.b $xr12, $xr25, 0 +# CHECK-ENCODING: encoding: [0x2c,0x03,0x80,0x76] + +xvseqi.h $xr9, $xr4, 10 +# CHECK-INST: xvseqi.h $xr9, $xr4, 10 +# CHECK-ENCODING: encoding: [0x89,0xa8,0x80,0x76] + +xvseqi.w $xr25, $xr4, -12 +# CHECK-INST: xvseqi.w $xr25, $xr4, -12 +# CHECK-ENCODING: encoding: [0x99,0x50,0x81,0x76] + +xvseqi.d $xr11, $xr7, 7 +# CHECK-INST: xvseqi.d $xr11, $xr7, 7 +# CHECK-ENCODING: encoding: [0xeb,0x9c,0x81,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/set.s b/llvm/test/MC/LoongArch/lasx/set.s new file mode 100644 index 00000000000000..ad49e4d91bc7dd --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/set.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvseteqz.v $fcc7, $xr1 +# CHECK-INST: xvseteqz.v $fcc7, $xr1 +# CHECK-ENCODING: encoding: [0x27,0x98,0x9c,0x76] + +xvsetnez.v $fcc7, $xr13 +# CHECK-INST: xvsetnez.v $fcc7, $xr13 +# CHECK-ENCODING: encoding: [0xa7,0x9d,0x9c,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/setallnez.s b/llvm/test/MC/LoongArch/lasx/setallnez.s new file mode 100644 index 00000000000000..d58bad5f49e83e --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/setallnez.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsetallnez.b $fcc5, $xr29 +# CHECK-INST: xvsetallnez.b $fcc5, $xr29 +# CHECK-ENCODING: encoding: [0xa5,0xb3,0x9c,0x76] + +xvsetallnez.h $fcc5, $xr4 +# CHECK-INST: xvsetallnez.h $fcc5, $xr4 +# CHECK-ENCODING: encoding: [0x85,0xb4,0x9c,0x76] + +xvsetallnez.w $fcc4, $xr5 +# CHECK-INST: xvsetallnez.w $fcc4, $xr5 +# CHECK-ENCODING: encoding: [0xa4,0xb8,0x9c,0x76] + +xvsetallnez.d $fcc7, $xr20 +# CHECK-INST: xvsetallnez.d $fcc7, $xr20 +# CHECK-ENCODING: encoding: [0x87,0xbe,0x9c,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/setanyeqz.s b/llvm/test/MC/LoongArch/lasx/setanyeqz.s new file mode 100644 index 00000000000000..d879dd0f24b9f9 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/setanyeqz.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsetanyeqz.b $fcc5, $xr8 +# CHECK-INST: xvsetanyeqz.b $fcc5, $xr8 +# CHECK-ENCODING: encoding: [0x05,0xa1,0x9c,0x76] + +xvsetanyeqz.h $fcc5, $xr20 +# CHECK-INST: xvsetanyeqz.h $fcc5, $xr20 +# CHECK-ENCODING: encoding: [0x85,0xa6,0x9c,0x76] + +xvsetanyeqz.w $fcc7, $xr6 +# CHECK-INST: xvsetanyeqz.w $fcc7, $xr6 +# CHECK-ENCODING: encoding: [0xc7,0xa8,0x9c,0x76] + +xvsetanyeqz.d $fcc6, $xr17 +# CHECK-INST: xvsetanyeqz.d $fcc6, $xr17 +# CHECK-ENCODING: encoding: [0x26,0xae,0x9c,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/shuf.s b/llvm/test/MC/LoongArch/lasx/shuf.s new file mode 100644 index 00000000000000..d08039d5429cbc --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/shuf.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvshuf.b $xr20, $xr6, $xr11, $xr15 +# CHECK-INST: xvshuf.b $xr20, $xr6, $xr11, $xr15 +# CHECK-ENCODING: encoding: [0xd4,0xac,0x67,0x0d] + +xvshuf.h $xr29, $xr24, $xr1 +# CHECK-INST: xvshuf.h $xr29, $xr24, $xr1 +# CHECK-ENCODING: encoding: [0x1d,0x87,0x7a,0x75] + +xvshuf.w $xr15, $xr24, $xr29 +# CHECK-INST: xvshuf.w $xr15, $xr24, $xr29 +# CHECK-ENCODING: encoding: [0x0f,0x77,0x7b,0x75] + +xvshuf.d $xr27, $xr18, $xr15 +# CHECK-INST: xvshuf.d $xr27, $xr18, $xr15 +# CHECK-ENCODING: encoding: [0x5b,0xbe,0x7b,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/shuf4i.s b/llvm/test/MC/LoongArch/lasx/shuf4i.s new file mode 100644 index 00000000000000..73610e529aad44 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/shuf4i.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvshuf4i.b $xr21, $xr28, 168 +# CHECK-INST: xvshuf4i.b $xr21, $xr28, 168 +# CHECK-ENCODING: encoding: [0x95,0xa3,0x92,0x77] + +xvshuf4i.h $xr18, $xr3, 22 +# CHECK-INST: xvshuf4i.h $xr18, $xr3, 22 +# CHECK-ENCODING: encoding: [0x72,0x58,0x94,0x77] + +xvshuf4i.w $xr0, $xr25, 82 +# CHECK-INST: xvshuf4i.w $xr0, $xr25, 82 +# CHECK-ENCODING: encoding: [0x20,0x4b,0x99,0x77] + +xvshuf4i.d $xr24, $xr4, 99 +# CHECK-INST: xvshuf4i.d $xr24, $xr4, 99 +# CHECK-ENCODING: encoding: [0x98,0x8c,0x9d,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/signcov.s b/llvm/test/MC/LoongArch/lasx/signcov.s new file mode 100644 index 00000000000000..9656f7d781c864 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/signcov.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsigncov.b $xr1, $xr24, $xr13 +# CHECK-INST: xvsigncov.b $xr1, $xr24, $xr13 +# CHECK-ENCODING: encoding: [0x01,0x37,0x2e,0x75] + +xvsigncov.h $xr8, $xr23, $xr14 +# CHECK-INST: xvsigncov.h $xr8, $xr23, $xr14 +# CHECK-ENCODING: encoding: [0xe8,0xba,0x2e,0x75] + +xvsigncov.w $xr3, $xr25, $xr10 +# CHECK-INST: xvsigncov.w $xr3, $xr25, $xr10 +# CHECK-ENCODING: encoding: [0x23,0x2b,0x2f,0x75] + +xvsigncov.d $xr26, $xr17, $xr31 +# CHECK-INST: xvsigncov.d $xr26, $xr17, $xr31 +# CHECK-ENCODING: encoding: [0x3a,0xfe,0x2f,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/sle.s b/llvm/test/MC/LoongArch/lasx/sle.s new file mode 100644 index 00000000000000..062eca5d1ec890 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/sle.s @@ -0,0 +1,68 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsle.b $xr24, $xr30, $xr29 +# CHECK-INST: xvsle.b $xr24, $xr30, $xr29 +# CHECK-ENCODING: encoding: [0xd8,0x77,0x02,0x74] + +xvsle.h $xr23, $xr13, $xr20 +# CHECK-INST: xvsle.h $xr23, $xr13, $xr20 +# CHECK-ENCODING: encoding: [0xb7,0xd1,0x02,0x74] + +xvsle.w $xr10, $xr31, $xr24 +# CHECK-INST: xvsle.w $xr10, $xr31, $xr24 +# CHECK-ENCODING: encoding: [0xea,0x63,0x03,0x74] + +xvsle.d $xr13, $xr26, $xr8 +# CHECK-INST: xvsle.d $xr13, $xr26, $xr8 +# CHECK-ENCODING: encoding: [0x4d,0xa3,0x03,0x74] + +xvslei.b $xr14, $xr11, -10 +# CHECK-INST: xvslei.b $xr14, $xr11, -10 +# CHECK-ENCODING: encoding: [0x6e,0x59,0x82,0x76] + +xvslei.h $xr2, $xr22, 15 +# CHECK-INST: xvslei.h $xr2, $xr22, 15 +# CHECK-ENCODING: encoding: [0xc2,0xbe,0x82,0x76] + +xvslei.w $xr3, $xr14, 12 +# CHECK-INST: xvslei.w $xr3, $xr14, 12 +# CHECK-ENCODING: encoding: [0xc3,0x31,0x83,0x76] + +xvslei.d $xr19, $xr30, 10 +# CHECK-INST: xvslei.d $xr19, $xr30, 10 +# CHECK-ENCODING: encoding: [0xd3,0xab,0x83,0x76] + +xvsle.bu $xr9, $xr27, $xr2 +# CHECK-INST: xvsle.bu $xr9, $xr27, $xr2 +# CHECK-ENCODING: encoding: [0x69,0x0b,0x04,0x74] + +xvsle.hu $xr29, $xr25, $xr22 +# CHECK-INST: xvsle.hu $xr29, $xr25, $xr22 +# CHECK-ENCODING: encoding: [0x3d,0xdb,0x04,0x74] + +xvsle.wu $xr16, $xr25, $xr14 +# CHECK-INST: xvsle.wu $xr16, $xr25, $xr14 +# CHECK-ENCODING: encoding: [0x30,0x3b,0x05,0x74] + +xvsle.du $xr5, $xr6, $xr18 +# CHECK-INST: xvsle.du $xr5, $xr6, $xr18 +# CHECK-ENCODING: encoding: [0xc5,0xc8,0x05,0x74] + +xvslei.bu $xr17, $xr26, 10 +# CHECK-INST: xvslei.bu $xr17, $xr26, 10 +# CHECK-ENCODING: encoding: [0x51,0x2b,0x84,0x76] + +xvslei.hu $xr20, $xr11, 18 +# CHECK-INST: xvslei.hu $xr20, $xr11, 18 +# CHECK-ENCODING: encoding: [0x74,0xc9,0x84,0x76] + +xvslei.wu $xr1, $xr29, 10 +# CHECK-INST: xvslei.wu $xr1, $xr29, 10 +# CHECK-ENCODING: encoding: [0xa1,0x2b,0x85,0x76] + +xvslei.du $xr25, $xr31, 24 +# CHECK-INST: xvslei.du $xr25, $xr31, 24 +# CHECK-ENCODING: encoding: [0xf9,0xe3,0x85,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/sll.s b/llvm/test/MC/LoongArch/lasx/sll.s new file mode 100644 index 00000000000000..ef9d3e5c47e385 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/sll.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsll.b $xr8, $xr29, $xr9 +# CHECK-INST: xvsll.b $xr8, $xr29, $xr9 +# CHECK-ENCODING: encoding: [0xa8,0x27,0xe8,0x74] + +xvsll.h $xr21, $xr28, $xr29 +# CHECK-INST: xvsll.h $xr21, $xr28, $xr29 +# CHECK-ENCODING: encoding: [0x95,0xf7,0xe8,0x74] + +xvsll.w $xr17, $xr30, $xr10 +# CHECK-INST: xvsll.w $xr17, $xr30, $xr10 +# CHECK-ENCODING: encoding: [0xd1,0x2b,0xe9,0x74] + +xvsll.d $xr19, $xr6, $xr26 +# CHECK-INST: xvsll.d $xr19, $xr6, $xr26 +# CHECK-ENCODING: encoding: [0xd3,0xe8,0xe9,0x74] + +xvslli.b $xr25, $xr26, 1 +# CHECK-INST: xvslli.b $xr25, $xr26, 1 +# CHECK-ENCODING: encoding: [0x59,0x27,0x2c,0x77] + +xvslli.h $xr17, $xr28, 14 +# CHECK-INST: xvslli.h $xr17, $xr28, 14 +# CHECK-ENCODING: encoding: [0x91,0x7b,0x2c,0x77] + +xvslli.w $xr26, $xr31, 29 +# CHECK-INST: xvslli.w $xr26, $xr31, 29 +# CHECK-ENCODING: encoding: [0xfa,0xf7,0x2c,0x77] + +xvslli.d $xr10, $xr28, 46 +# CHECK-INST: xvslli.d $xr10, $xr28, 46 +# CHECK-ENCODING: encoding: [0x8a,0xbb,0x2d,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/sllwil.s b/llvm/test/MC/LoongArch/lasx/sllwil.s new file mode 100644 index 00000000000000..0e89ccf02b510c --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/sllwil.s @@ -0,0 +1,28 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsllwil.h.b $xr13, $xr21, 6 +# CHECK-INST: xvsllwil.h.b $xr13, $xr21, 6 +# CHECK-ENCODING: encoding: [0xad,0x3a,0x08,0x77] + +xvsllwil.w.h $xr20, $xr29, 0 +# CHECK-INST: xvsllwil.w.h $xr20, $xr29, 0 +# CHECK-ENCODING: encoding: [0xb4,0x43,0x08,0x77] + +xvsllwil.d.w $xr3, $xr20, 24 +# CHECK-INST: xvsllwil.d.w $xr3, $xr20, 24 +# CHECK-ENCODING: encoding: [0x83,0xe2,0x08,0x77] + +xvsllwil.hu.bu $xr15, $xr15, 6 +# CHECK-INST: xvsllwil.hu.bu $xr15, $xr15, 6 +# CHECK-ENCODING: encoding: [0xef,0x39,0x0c,0x77] + +xvsllwil.wu.hu $xr22, $xr29, 0 +# CHECK-INST: xvsllwil.wu.hu $xr22, $xr29, 0 +# CHECK-ENCODING: encoding: [0xb6,0x43,0x0c,0x77] + +xvsllwil.du.wu $xr3, $xr5, 31 +# CHECK-INST: xvsllwil.du.wu $xr3, $xr5, 31 +# CHECK-ENCODING: encoding: [0xa3,0xfc,0x0c,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/slt.s b/llvm/test/MC/LoongArch/lasx/slt.s new file mode 100644 index 00000000000000..40308a59fc57ea --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/slt.s @@ -0,0 +1,68 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvslt.b $xr30, $xr31, $xr13 +# CHECK-INST: xvslt.b $xr30, $xr31, $xr13 +# CHECK-ENCODING: encoding: [0xfe,0x37,0x06,0x74] + +xvslt.h $xr19, $xr23, $xr0 +# CHECK-INST: xvslt.h $xr19, $xr23, $xr0 +# CHECK-ENCODING: encoding: [0xf3,0x82,0x06,0x74] + +xvslt.w $xr23, $xr26, $xr3 +# CHECK-INST: xvslt.w $xr23, $xr26, $xr3 +# CHECK-ENCODING: encoding: [0x57,0x0f,0x07,0x74] + +xvslt.d $xr3, $xr10, $xr31 +# CHECK-INST: xvslt.d $xr3, $xr10, $xr31 +# CHECK-ENCODING: encoding: [0x43,0xfd,0x07,0x74] + +xvslti.b $xr31, $xr27, 6 +# CHECK-INST: xvslti.b $xr31, $xr27, 6 +# CHECK-ENCODING: encoding: [0x7f,0x1b,0x86,0x76] + +xvslti.h $xr5, $xr19, 6 +# CHECK-INST: xvslti.h $xr5, $xr19, 6 +# CHECK-ENCODING: encoding: [0x65,0x9a,0x86,0x76] + +xvslti.w $xr20, $xr8, 11 +# CHECK-INST: xvslti.w $xr20, $xr8, 11 +# CHECK-ENCODING: encoding: [0x14,0x2d,0x87,0x76] + +xvslti.d $xr13, $xr18, 2 +# CHECK-INST: xvslti.d $xr13, $xr18, 2 +# CHECK-ENCODING: encoding: [0x4d,0x8a,0x87,0x76] + +xvslt.bu $xr20, $xr13, $xr29 +# CHECK-INST: xvslt.bu $xr20, $xr13, $xr29 +# CHECK-ENCODING: encoding: [0xb4,0x75,0x08,0x74] + +xvslt.hu $xr12, $xr29, $xr26 +# CHECK-INST: xvslt.hu $xr12, $xr29, $xr26 +# CHECK-ENCODING: encoding: [0xac,0xeb,0x08,0x74] + +xvslt.wu $xr26, $xr25, $xr31 +# CHECK-INST: xvslt.wu $xr26, $xr25, $xr31 +# CHECK-ENCODING: encoding: [0x3a,0x7f,0x09,0x74] + +xvslt.du $xr30, $xr20, $xr3 +# CHECK-INST: xvslt.du $xr30, $xr20, $xr3 +# CHECK-ENCODING: encoding: [0x9e,0x8e,0x09,0x74] + +xvslti.bu $xr1, $xr4, 2 +# CHECK-INST: xvslti.bu $xr1, $xr4, 2 +# CHECK-ENCODING: encoding: [0x81,0x08,0x88,0x76] + +xvslti.hu $xr0, $xr5, 20 +# CHECK-INST: xvslti.hu $xr0, $xr5, 20 +# CHECK-ENCODING: encoding: [0xa0,0xd0,0x88,0x76] + +xvslti.wu $xr0, $xr25, 24 +# CHECK-INST: xvslti.wu $xr0, $xr25, 24 +# CHECK-ENCODING: encoding: [0x20,0x63,0x89,0x76] + +xvslti.du $xr10, $xr5, 29 +# CHECK-INST: xvslti.du $xr10, $xr5, 29 +# CHECK-ENCODING: encoding: [0xaa,0xf4,0x89,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/sra.s b/llvm/test/MC/LoongArch/lasx/sra.s new file mode 100644 index 00000000000000..f9bc842f1e1513 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/sra.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsra.b $xr11, $xr2, $xr0 +# CHECK-INST: xvsra.b $xr11, $xr2, $xr0 +# CHECK-ENCODING: encoding: [0x4b,0x00,0xec,0x74] + +xvsra.h $xr17, $xr27, $xr6 +# CHECK-INST: xvsra.h $xr17, $xr27, $xr6 +# CHECK-ENCODING: encoding: [0x71,0x9b,0xec,0x74] + +xvsra.w $xr13, $xr12, $xr12 +# CHECK-INST: xvsra.w $xr13, $xr12, $xr12 +# CHECK-ENCODING: encoding: [0x8d,0x31,0xed,0x74] + +xvsra.d $xr6, $xr15, $xr1 +# CHECK-INST: xvsra.d $xr6, $xr15, $xr1 +# CHECK-ENCODING: encoding: [0xe6,0x85,0xed,0x74] + +xvsrai.b $xr16, $xr2, 3 +# CHECK-INST: xvsrai.b $xr16, $xr2, 3 +# CHECK-ENCODING: encoding: [0x50,0x2c,0x34,0x77] + +xvsrai.h $xr14, $xr3, 12 +# CHECK-INST: xvsrai.h $xr14, $xr3, 12 +# CHECK-ENCODING: encoding: [0x6e,0x70,0x34,0x77] + +xvsrai.w $xr17, $xr18, 21 +# CHECK-INST: xvsrai.w $xr17, $xr18, 21 +# CHECK-ENCODING: encoding: [0x51,0xd6,0x34,0x77] + +xvsrai.d $xr10, $xr20, 4 +# CHECK-INST: xvsrai.d $xr10, $xr20, 4 +# CHECK-ENCODING: encoding: [0x8a,0x12,0x35,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/sran.s b/llvm/test/MC/LoongArch/lasx/sran.s new file mode 100644 index 00000000000000..3e0613c124e8cd --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/sran.s @@ -0,0 +1,16 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsran.b.h $xr30, $xr13, $xr3 +# CHECK-INST: xvsran.b.h $xr30, $xr13, $xr3 +# CHECK-ENCODING: encoding: [0xbe,0x8d,0xf6,0x74] + +xvsran.h.w $xr18, $xr26, $xr4 +# CHECK-INST: xvsran.h.w $xr18, $xr26, $xr4 +# CHECK-ENCODING: encoding: [0x52,0x13,0xf7,0x74] + +xvsran.w.d $xr27, $xr19, $xr21 +# CHECK-INST: xvsran.w.d $xr27, $xr19, $xr21 +# CHECK-ENCODING: encoding: [0x7b,0xd6,0xf7,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/srani.s b/llvm/test/MC/LoongArch/lasx/srani.s new file mode 100644 index 00000000000000..e8d9713671cda2 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/srani.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsrani.b.h $xr14, $xr23, 15 +# CHECK-INST: xvsrani.b.h $xr14, $xr23, 15 +# CHECK-ENCODING: encoding: [0xee,0x7e,0x58,0x77] + +xvsrani.h.w $xr2, $xr8, 5 +# CHECK-INST: xvsrani.h.w $xr2, $xr8, 5 +# CHECK-ENCODING: encoding: [0x02,0x95,0x58,0x77] + +xvsrani.w.d $xr5, $xr11, 14 +# CHECK-INST: xvsrani.w.d $xr5, $xr11, 14 +# CHECK-ENCODING: encoding: [0x65,0x39,0x59,0x77] + +xvsrani.d.q $xr17, $xr7, 113 +# CHECK-INST: xvsrani.d.q $xr17, $xr7, 113 +# CHECK-ENCODING: encoding: [0xf1,0xc4,0x5b,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/srar.s b/llvm/test/MC/LoongArch/lasx/srar.s new file mode 100644 index 00000000000000..c247c78ecb8cd0 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/srar.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsrar.b $xr9, $xr18, $xr11 +# CHECK-INST: xvsrar.b $xr9, $xr18, $xr11 +# CHECK-ENCODING: encoding: [0x49,0x2e,0xf2,0x74] + +xvsrar.h $xr15, $xr26, $xr1 +# CHECK-INST: xvsrar.h $xr15, $xr26, $xr1 +# CHECK-ENCODING: encoding: [0x4f,0x87,0xf2,0x74] + +xvsrar.w $xr17, $xr19, $xr14 +# CHECK-INST: xvsrar.w $xr17, $xr19, $xr14 +# CHECK-ENCODING: encoding: [0x71,0x3a,0xf3,0x74] + +xvsrar.d $xr19, $xr15, $xr6 +# CHECK-INST: xvsrar.d $xr19, $xr15, $xr6 +# CHECK-ENCODING: encoding: [0xf3,0x99,0xf3,0x74] + +xvsrari.b $xr10, $xr28, 3 +# CHECK-INST: xvsrari.b $xr10, $xr28, 3 +# CHECK-ENCODING: encoding: [0x8a,0x2f,0xa8,0x76] + +xvsrari.h $xr28, $xr1, 14 +# CHECK-INST: xvsrari.h $xr28, $xr1, 14 +# CHECK-ENCODING: encoding: [0x3c,0x78,0xa8,0x76] + +xvsrari.w $xr13, $xr7, 12 +# CHECK-INST: xvsrari.w $xr13, $xr7, 12 +# CHECK-ENCODING: encoding: [0xed,0xb0,0xa8,0x76] + +xvsrari.d $xr29, $xr9, 8 +# CHECK-INST: xvsrari.d $xr29, $xr9, 8 +# CHECK-ENCODING: encoding: [0x3d,0x21,0xa9,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/srarn.s b/llvm/test/MC/LoongArch/lasx/srarn.s new file mode 100644 index 00000000000000..e963f2e589fa1b --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/srarn.s @@ -0,0 +1,16 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsrarn.b.h $xr18, $xr20, $xr15 +# CHECK-INST: xvsrarn.b.h $xr18, $xr20, $xr15 +# CHECK-ENCODING: encoding: [0x92,0xbe,0xfa,0x74] + +xvsrarn.h.w $xr12, $xr1, $xr4 +# CHECK-INST: xvsrarn.h.w $xr12, $xr1, $xr4 +# CHECK-ENCODING: encoding: [0x2c,0x10,0xfb,0x74] + +xvsrarn.w.d $xr9, $xr18, $xr26 +# CHECK-INST: xvsrarn.w.d $xr9, $xr18, $xr26 +# CHECK-ENCODING: encoding: [0x49,0xea,0xfb,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/srarni.s b/llvm/test/MC/LoongArch/lasx/srarni.s new file mode 100644 index 00000000000000..eda38ef997e1db --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/srarni.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsrarni.b.h $xr21, $xr31, 15 +# CHECK-INST: xvsrarni.b.h $xr21, $xr31, 15 +# CHECK-ENCODING: encoding: [0xf5,0x7f,0x5c,0x77] + +xvsrarni.h.w $xr4, $xr22, 25 +# CHECK-INST: xvsrarni.h.w $xr4, $xr22, 25 +# CHECK-ENCODING: encoding: [0xc4,0xe6,0x5c,0x77] + +xvsrarni.w.d $xr24, $xr8, 41 +# CHECK-INST: xvsrarni.w.d $xr24, $xr8, 41 +# CHECK-ENCODING: encoding: [0x18,0xa5,0x5d,0x77] + +xvsrarni.d.q $xr7, $xr5, 7 +# CHECK-INST: xvsrarni.d.q $xr7, $xr5, 7 +# CHECK-ENCODING: encoding: [0xa7,0x1c,0x5e,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/srl.s b/llvm/test/MC/LoongArch/lasx/srl.s new file mode 100644 index 00000000000000..0d0607d0f3d2cd --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/srl.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsrl.b $xr20, $xr24, $xr29 +# CHECK-INST: xvsrl.b $xr20, $xr24, $xr29 +# CHECK-ENCODING: encoding: [0x14,0x77,0xea,0x74] + +xvsrl.h $xr11, $xr17, $xr31 +# CHECK-INST: xvsrl.h $xr11, $xr17, $xr31 +# CHECK-ENCODING: encoding: [0x2b,0xfe,0xea,0x74] + +xvsrl.w $xr2, $xr10, $xr8 +# CHECK-INST: xvsrl.w $xr2, $xr10, $xr8 +# CHECK-ENCODING: encoding: [0x42,0x21,0xeb,0x74] + +xvsrl.d $xr13, $xr30, $xr26 +# CHECK-INST: xvsrl.d $xr13, $xr30, $xr26 +# CHECK-ENCODING: encoding: [0xcd,0xeb,0xeb,0x74] + +xvsrli.b $xr29, $xr4, 3 +# CHECK-INST: xvsrli.b $xr29, $xr4, 3 +# CHECK-ENCODING: encoding: [0x9d,0x2c,0x30,0x77] + +xvsrli.h $xr28, $xr14, 12 +# CHECK-INST: xvsrli.h $xr28, $xr14, 12 +# CHECK-ENCODING: encoding: [0xdc,0x71,0x30,0x77] + +xvsrli.w $xr12, $xr18, 7 +# CHECK-INST: xvsrli.w $xr12, $xr18, 7 +# CHECK-ENCODING: encoding: [0x4c,0x9e,0x30,0x77] + +xvsrli.d $xr0, $xr4, 46 +# CHECK-INST: xvsrli.d $xr0, $xr4, 46 +# CHECK-ENCODING: encoding: [0x80,0xb8,0x31,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/srln.s b/llvm/test/MC/LoongArch/lasx/srln.s new file mode 100644 index 00000000000000..af624991936241 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/srln.s @@ -0,0 +1,16 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsrln.b.h $xr7, $xr13, $xr5 +# CHECK-INST: xvsrln.b.h $xr7, $xr13, $xr5 +# CHECK-ENCODING: encoding: [0xa7,0x95,0xf4,0x74] + +xvsrln.h.w $xr6, $xr18, $xr5 +# CHECK-INST: xvsrln.h.w $xr6, $xr18, $xr5 +# CHECK-ENCODING: encoding: [0x46,0x16,0xf5,0x74] + +xvsrln.w.d $xr12, $xr12, $xr28 +# CHECK-INST: xvsrln.w.d $xr12, $xr12, $xr28 +# CHECK-ENCODING: encoding: [0x8c,0xf1,0xf5,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/srlni.s b/llvm/test/MC/LoongArch/lasx/srlni.s new file mode 100644 index 00000000000000..917c9a752c1fbe --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/srlni.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsrlni.b.h $xr5, $xr8, 2 +# CHECK-INST: xvsrlni.b.h $xr5, $xr8, 2 +# CHECK-ENCODING: encoding: [0x05,0x49,0x40,0x77] + +xvsrlni.h.w $xr7, $xr4, 20 +# CHECK-INST: xvsrlni.h.w $xr7, $xr4, 20 +# CHECK-ENCODING: encoding: [0x87,0xd0,0x40,0x77] + +xvsrlni.w.d $xr30, $xr15, 17 +# CHECK-INST: xvsrlni.w.d $xr30, $xr15, 17 +# CHECK-ENCODING: encoding: [0xfe,0x45,0x41,0x77] + +xvsrlni.d.q $xr15, $xr28, 95 +# CHECK-INST: xvsrlni.d.q $xr15, $xr28, 95 +# CHECK-ENCODING: encoding: [0x8f,0x7f,0x43,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/srlr.s b/llvm/test/MC/LoongArch/lasx/srlr.s new file mode 100644 index 00000000000000..d87cc2291fb4d3 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/srlr.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsrlr.b $xr18, $xr11, $xr5 +# CHECK-INST: xvsrlr.b $xr18, $xr11, $xr5 +# CHECK-ENCODING: encoding: [0x72,0x15,0xf0,0x74] + +xvsrlr.h $xr31, $xr5, $xr21 +# CHECK-INST: xvsrlr.h $xr31, $xr5, $xr21 +# CHECK-ENCODING: encoding: [0xbf,0xd4,0xf0,0x74] + +xvsrlr.w $xr7, $xr5, $xr1 +# CHECK-INST: xvsrlr.w $xr7, $xr5, $xr1 +# CHECK-ENCODING: encoding: [0xa7,0x04,0xf1,0x74] + +xvsrlr.d $xr4, $xr27, $xr7 +# CHECK-INST: xvsrlr.d $xr4, $xr27, $xr7 +# CHECK-ENCODING: encoding: [0x64,0x9f,0xf1,0x74] + +xvsrlri.b $xr29, $xr30, 4 +# CHECK-INST: xvsrlri.b $xr29, $xr30, 4 +# CHECK-ENCODING: encoding: [0xdd,0x33,0xa4,0x76] + +xvsrlri.h $xr16, $xr6, 14 +# CHECK-INST: xvsrlri.h $xr16, $xr6, 14 +# CHECK-ENCODING: encoding: [0xd0,0x78,0xa4,0x76] + +xvsrlri.w $xr24, $xr10, 28 +# CHECK-INST: xvsrlri.w $xr24, $xr10, 28 +# CHECK-ENCODING: encoding: [0x58,0xf1,0xa4,0x76] + +xvsrlri.d $xr20, $xr20, 52 +# CHECK-INST: xvsrlri.d $xr20, $xr20, 52 +# CHECK-ENCODING: encoding: [0x94,0xd2,0xa5,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/srlrn.s b/llvm/test/MC/LoongArch/lasx/srlrn.s new file mode 100644 index 00000000000000..3a70d97bfc1182 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/srlrn.s @@ -0,0 +1,16 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsrlrn.b.h $xr4, $xr25, $xr26 +# CHECK-INST: xvsrlrn.b.h $xr4, $xr25, $xr26 +# CHECK-ENCODING: encoding: [0x24,0xeb,0xf8,0x74] + +xvsrlrn.h.w $xr17, $xr5, $xr1 +# CHECK-INST: xvsrlrn.h.w $xr17, $xr5, $xr1 +# CHECK-ENCODING: encoding: [0xb1,0x04,0xf9,0x74] + +xvsrlrn.w.d $xr29, $xr1, $xr17 +# CHECK-INST: xvsrlrn.w.d $xr29, $xr1, $xr17 +# CHECK-ENCODING: encoding: [0x3d,0xc4,0xf9,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/srlrni.s b/llvm/test/MC/LoongArch/lasx/srlrni.s new file mode 100644 index 00000000000000..ccee17fb71b1ed --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/srlrni.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsrlrni.b.h $xr10, $xr17, 12 +# CHECK-INST: xvsrlrni.b.h $xr10, $xr17, 12 +# CHECK-ENCODING: encoding: [0x2a,0x72,0x44,0x77] + +xvsrlrni.h.w $xr22, $xr23, 13 +# CHECK-INST: xvsrlrni.h.w $xr22, $xr23, 13 +# CHECK-ENCODING: encoding: [0xf6,0xb6,0x44,0x77] + +xvsrlrni.w.d $xr18, $xr22, 58 +# CHECK-INST: xvsrlrni.w.d $xr18, $xr22, 58 +# CHECK-ENCODING: encoding: [0xd2,0xea,0x45,0x77] + +xvsrlrni.d.q $xr25, $xr8, 42 +# CHECK-INST: xvsrlrni.d.q $xr25, $xr8, 42 +# CHECK-ENCODING: encoding: [0x19,0xa9,0x46,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/ssran.s b/llvm/test/MC/LoongArch/lasx/ssran.s new file mode 100644 index 00000000000000..fe6333e520d542 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/ssran.s @@ -0,0 +1,28 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvssran.b.h $xr17, $xr4, $xr1 +# CHECK-INST: xvssran.b.h $xr17, $xr4, $xr1 +# CHECK-ENCODING: encoding: [0x91,0x84,0xfe,0x74] + +xvssran.h.w $xr28, $xr28, $xr13 +# CHECK-INST: xvssran.h.w $xr28, $xr28, $xr13 +# CHECK-ENCODING: encoding: [0x9c,0x37,0xff,0x74] + +xvssran.w.d $xr21, $xr1, $xr31 +# CHECK-INST: xvssran.w.d $xr21, $xr1, $xr31 +# CHECK-ENCODING: encoding: [0x35,0xfc,0xff,0x74] + +xvssran.bu.h $xr3, $xr12, $xr24 +# CHECK-INST: xvssran.bu.h $xr3, $xr12, $xr24 +# CHECK-ENCODING: encoding: [0x83,0xe1,0x06,0x75] + +xvssran.hu.w $xr25, $xr24, $xr1 +# CHECK-INST: xvssran.hu.w $xr25, $xr24, $xr1 +# CHECK-ENCODING: encoding: [0x19,0x07,0x07,0x75] + +xvssran.wu.d $xr30, $xr14, $xr10 +# CHECK-INST: xvssran.wu.d $xr30, $xr14, $xr10 +# CHECK-ENCODING: encoding: [0xde,0xa9,0x07,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/ssrani.s b/llvm/test/MC/LoongArch/lasx/ssrani.s new file mode 100644 index 00000000000000..0074b3141558d2 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/ssrani.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvssrani.b.h $xr26, $xr22, 14 +# CHECK-INST: xvssrani.b.h $xr26, $xr22, 14 +# CHECK-ENCODING: encoding: [0xda,0x7a,0x60,0x77] + +xvssrani.h.w $xr19, $xr14, 26 +# CHECK-INST: xvssrani.h.w $xr19, $xr14, 26 +# CHECK-ENCODING: encoding: [0xd3,0xe9,0x60,0x77] + +xvssrani.w.d $xr1, $xr27, 27 +# CHECK-INST: xvssrani.w.d $xr1, $xr27, 27 +# CHECK-ENCODING: encoding: [0x61,0x6f,0x61,0x77] + +xvssrani.d.q $xr9, $xr10, 59 +# CHECK-INST: xvssrani.d.q $xr9, $xr10, 59 +# CHECK-ENCODING: encoding: [0x49,0xed,0x62,0x77] + +xvssrani.bu.h $xr6, $xr3, 10 +# CHECK-INST: xvssrani.bu.h $xr6, $xr3, 10 +# CHECK-ENCODING: encoding: [0x66,0x68,0x64,0x77] + +xvssrani.hu.w $xr20, $xr9, 6 +# CHECK-INST: xvssrani.hu.w $xr20, $xr9, 6 +# CHECK-ENCODING: encoding: [0x34,0x99,0x64,0x77] + +xvssrani.wu.d $xr24, $xr11, 8 +# CHECK-INST: xvssrani.wu.d $xr24, $xr11, 8 +# CHECK-ENCODING: encoding: [0x78,0x21,0x65,0x77] + +xvssrani.du.q $xr16, $xr2, 15 +# CHECK-INST: xvssrani.du.q $xr16, $xr2, 15 +# CHECK-ENCODING: encoding: [0x50,0x3c,0x66,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/ssrarn.s b/llvm/test/MC/LoongArch/lasx/ssrarn.s new file mode 100644 index 00000000000000..6024c67647b64c --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/ssrarn.s @@ -0,0 +1,28 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvssrarn.b.h $xr7, $xr13, $xr0 +# CHECK-INST: xvssrarn.b.h $xr7, $xr13, $xr0 +# CHECK-ENCODING: encoding: [0xa7,0x81,0x02,0x75] + +xvssrarn.h.w $xr22, $xr2, $xr14 +# CHECK-INST: xvssrarn.h.w $xr22, $xr2, $xr14 +# CHECK-ENCODING: encoding: [0x56,0x38,0x03,0x75] + +xvssrarn.w.d $xr13, $xr7, $xr16 +# CHECK-INST: xvssrarn.w.d $xr13, $xr7, $xr16 +# CHECK-ENCODING: encoding: [0xed,0xc0,0x03,0x75] + +xvssrarn.bu.h $xr4, $xr12, $xr2 +# CHECK-INST: xvssrarn.bu.h $xr4, $xr12, $xr2 +# CHECK-ENCODING: encoding: [0x84,0x89,0x0a,0x75] + +xvssrarn.hu.w $xr15, $xr24, $xr3 +# CHECK-INST: xvssrarn.hu.w $xr15, $xr24, $xr3 +# CHECK-ENCODING: encoding: [0x0f,0x0f,0x0b,0x75] + +xvssrarn.wu.d $xr30, $xr9, $xr8 +# CHECK-INST: xvssrarn.wu.d $xr30, $xr9, $xr8 +# CHECK-ENCODING: encoding: [0x3e,0xa1,0x0b,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/ssrarni.s b/llvm/test/MC/LoongArch/lasx/ssrarni.s new file mode 100644 index 00000000000000..ee6cf98067d3c7 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/ssrarni.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvssrarni.b.h $xr0, $xr4, 13 +# CHECK-INST: xvssrarni.b.h $xr0, $xr4, 13 +# CHECK-ENCODING: encoding: [0x80,0x74,0x68,0x77] + +xvssrarni.h.w $xr8, $xr0, 9 +# CHECK-INST: xvssrarni.h.w $xr8, $xr0, 9 +# CHECK-ENCODING: encoding: [0x08,0xa4,0x68,0x77] + +xvssrarni.w.d $xr5, $xr5, 42 +# CHECK-INST: xvssrarni.w.d $xr5, $xr5, 42 +# CHECK-ENCODING: encoding: [0xa5,0xa8,0x69,0x77] + +xvssrarni.d.q $xr8, $xr31, 83 +# CHECK-INST: xvssrarni.d.q $xr8, $xr31, 83 +# CHECK-ENCODING: encoding: [0xe8,0x4f,0x6b,0x77] + +xvssrarni.bu.h $xr21, $xr19, 0 +# CHECK-INST: xvssrarni.bu.h $xr21, $xr19, 0 +# CHECK-ENCODING: encoding: [0x75,0x42,0x6c,0x77] + +xvssrarni.hu.w $xr22, $xr13, 1 +# CHECK-INST: xvssrarni.hu.w $xr22, $xr13, 1 +# CHECK-ENCODING: encoding: [0xb6,0x85,0x6c,0x77] + +xvssrarni.wu.d $xr21, $xr5, 26 +# CHECK-INST: xvssrarni.wu.d $xr21, $xr5, 26 +# CHECK-ENCODING: encoding: [0xb5,0x68,0x6d,0x77] + +xvssrarni.du.q $xr15, $xr14, 94 +# CHECK-INST: xvssrarni.du.q $xr15, $xr14, 94 +# CHECK-ENCODING: encoding: [0xcf,0x79,0x6f,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/ssrln.s b/llvm/test/MC/LoongArch/lasx/ssrln.s new file mode 100644 index 00000000000000..7df61781907129 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/ssrln.s @@ -0,0 +1,28 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvssrln.b.h $xr24, $xr4, $xr4 +# CHECK-INST: xvssrln.b.h $xr24, $xr4, $xr4 +# CHECK-ENCODING: encoding: [0x98,0x90,0xfc,0x74] + +xvssrln.h.w $xr5, $xr15, $xr0 +# CHECK-INST: xvssrln.h.w $xr5, $xr15, $xr0 +# CHECK-ENCODING: encoding: [0xe5,0x01,0xfd,0x74] + +xvssrln.w.d $xr0, $xr25, $xr30 +# CHECK-INST: xvssrln.w.d $xr0, $xr25, $xr30 +# CHECK-ENCODING: encoding: [0x20,0xfb,0xfd,0x74] + +xvssrln.bu.h $xr26, $xr9, $xr26 +# CHECK-INST: xvssrln.bu.h $xr26, $xr9, $xr26 +# CHECK-ENCODING: encoding: [0x3a,0xe9,0x04,0x75] + +xvssrln.hu.w $xr7, $xr20, $xr1 +# CHECK-INST: xvssrln.hu.w $xr7, $xr20, $xr1 +# CHECK-ENCODING: encoding: [0x87,0x06,0x05,0x75] + +xvssrln.wu.d $xr15, $xr13, $xr20 +# CHECK-INST: xvssrln.wu.d $xr15, $xr13, $xr20 +# CHECK-ENCODING: encoding: [0xaf,0xd1,0x05,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/ssrlni.s b/llvm/test/MC/LoongArch/lasx/ssrlni.s new file mode 100644 index 00000000000000..b8c6ca1710e1c0 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/ssrlni.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvssrlni.b.h $xr19, $xr18, 9 +# CHECK-INST: xvssrlni.b.h $xr19, $xr18, 9 +# CHECK-ENCODING: encoding: [0x53,0x66,0x48,0x77] + +xvssrlni.h.w $xr29, $xr29, 3 +# CHECK-INST: xvssrlni.h.w $xr29, $xr29, 3 +# CHECK-ENCODING: encoding: [0xbd,0x8f,0x48,0x77] + +xvssrlni.w.d $xr9, $xr15, 43 +# CHECK-INST: xvssrlni.w.d $xr9, $xr15, 43 +# CHECK-ENCODING: encoding: [0xe9,0xad,0x49,0x77] + +xvssrlni.d.q $xr8, $xr11, 121 +# CHECK-INST: xvssrlni.d.q $xr8, $xr11, 121 +# CHECK-ENCODING: encoding: [0x68,0xe5,0x4b,0x77] + +xvssrlni.bu.h $xr25, $xr10, 5 +# CHECK-INST: xvssrlni.bu.h $xr25, $xr10, 5 +# CHECK-ENCODING: encoding: [0x59,0x55,0x4c,0x77] + +xvssrlni.hu.w $xr9, $xr18, 26 +# CHECK-INST: xvssrlni.hu.w $xr9, $xr18, 26 +# CHECK-ENCODING: encoding: [0x49,0xea,0x4c,0x77] + +xvssrlni.wu.d $xr20, $xr22, 13 +# CHECK-INST: xvssrlni.wu.d $xr20, $xr22, 13 +# CHECK-ENCODING: encoding: [0xd4,0x36,0x4d,0x77] + +xvssrlni.du.q $xr8, $xr4, 43 +# CHECK-INST: xvssrlni.du.q $xr8, $xr4, 43 +# CHECK-ENCODING: encoding: [0x88,0xac,0x4e,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/ssrlrn.s b/llvm/test/MC/LoongArch/lasx/ssrlrn.s new file mode 100644 index 00000000000000..410a28deb5cf0d --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/ssrlrn.s @@ -0,0 +1,28 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvssrlrn.b.h $xr8, $xr20, $xr18 +# CHECK-INST: xvssrlrn.b.h $xr8, $xr20, $xr18 +# CHECK-ENCODING: encoding: [0x88,0xca,0x00,0x75] + +xvssrlrn.h.w $xr2, $xr13, $xr19 +# CHECK-INST: xvssrlrn.h.w $xr2, $xr13, $xr19 +# CHECK-ENCODING: encoding: [0xa2,0x4d,0x01,0x75] + +xvssrlrn.w.d $xr24, $xr7, $xr5 +# CHECK-INST: xvssrlrn.w.d $xr24, $xr7, $xr5 +# CHECK-ENCODING: encoding: [0xf8,0x94,0x01,0x75] + +xvssrlrn.bu.h $xr15, $xr23, $xr18 +# CHECK-INST: xvssrlrn.bu.h $xr15, $xr23, $xr18 +# CHECK-ENCODING: encoding: [0xef,0xca,0x08,0x75] + +xvssrlrn.hu.w $xr22, $xr14, $xr16 +# CHECK-INST: xvssrlrn.hu.w $xr22, $xr14, $xr16 +# CHECK-ENCODING: encoding: [0xd6,0x41,0x09,0x75] + +xvssrlrn.wu.d $xr20, $xr28, $xr5 +# CHECK-INST: xvssrlrn.wu.d $xr20, $xr28, $xr5 +# CHECK-ENCODING: encoding: [0x94,0x97,0x09,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/ssrlrni.s b/llvm/test/MC/LoongArch/lasx/ssrlrni.s new file mode 100644 index 00000000000000..c19626e5471690 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/ssrlrni.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvssrlrni.b.h $xr26, $xr26, 8 +# CHECK-INST: xvssrlrni.b.h $xr26, $xr26, 8 +# CHECK-ENCODING: encoding: [0x5a,0x63,0x50,0x77] + +xvssrlrni.h.w $xr6, $xr0, 19 +# CHECK-INST: xvssrlrni.h.w $xr6, $xr0, 19 +# CHECK-ENCODING: encoding: [0x06,0xcc,0x50,0x77] + +xvssrlrni.w.d $xr28, $xr15, 55 +# CHECK-INST: xvssrlrni.w.d $xr28, $xr15, 55 +# CHECK-ENCODING: encoding: [0xfc,0xdd,0x51,0x77] + +xvssrlrni.d.q $xr8, $xr16, 64 +# CHECK-INST: xvssrlrni.d.q $xr8, $xr16, 64 +# CHECK-ENCODING: encoding: [0x08,0x02,0x53,0x77] + +xvssrlrni.bu.h $xr23, $xr28, 3 +# CHECK-INST: xvssrlrni.bu.h $xr23, $xr28, 3 +# CHECK-ENCODING: encoding: [0x97,0x4f,0x54,0x77] + +xvssrlrni.hu.w $xr25, $xr10, 18 +# CHECK-INST: xvssrlrni.hu.w $xr25, $xr10, 18 +# CHECK-ENCODING: encoding: [0x59,0xc9,0x54,0x77] + +xvssrlrni.wu.d $xr16, $xr28, 15 +# CHECK-INST: xvssrlrni.wu.d $xr16, $xr28, 15 +# CHECK-ENCODING: encoding: [0x90,0x3f,0x55,0x77] + +xvssrlrni.du.q $xr18, $xr9, 44 +# CHECK-INST: xvssrlrni.du.q $xr18, $xr9, 44 +# CHECK-ENCODING: encoding: [0x32,0xb1,0x56,0x77] diff --git a/llvm/test/MC/LoongArch/lasx/ssub.s b/llvm/test/MC/LoongArch/lasx/ssub.s new file mode 100644 index 00000000000000..e5be5652bcc98e --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/ssub.s @@ -0,0 +1,36 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvssub.b $xr14, $xr19, $xr24 +# CHECK-INST: xvssub.b $xr14, $xr19, $xr24 +# CHECK-ENCODING: encoding: [0x6e,0x62,0x48,0x74] + +xvssub.h $xr13, $xr8, $xr19 +# CHECK-INST: xvssub.h $xr13, $xr8, $xr19 +# CHECK-ENCODING: encoding: [0x0d,0xcd,0x48,0x74] + +xvssub.w $xr28, $xr27, $xr28 +# CHECK-INST: xvssub.w $xr28, $xr27, $xr28 +# CHECK-ENCODING: encoding: [0x7c,0x73,0x49,0x74] + +xvssub.d $xr28, $xr16, $xr2 +# CHECK-INST: xvssub.d $xr28, $xr16, $xr2 +# CHECK-ENCODING: encoding: [0x1c,0x8a,0x49,0x74] + +xvssub.bu $xr11, $xr13, $xr17 +# CHECK-INST: xvssub.bu $xr11, $xr13, $xr17 +# CHECK-ENCODING: encoding: [0xab,0x45,0x4c,0x74] + +xvssub.hu $xr16, $xr10, $xr28 +# CHECK-INST: xvssub.hu $xr16, $xr10, $xr28 +# CHECK-ENCODING: encoding: [0x50,0xf1,0x4c,0x74] + +xvssub.wu $xr21, $xr0, $xr13 +# CHECK-INST: xvssub.wu $xr21, $xr0, $xr13 +# CHECK-ENCODING: encoding: [0x15,0x34,0x4d,0x74] + +xvssub.du $xr18, $xr26, $xr27 +# CHECK-INST: xvssub.du $xr18, $xr26, $xr27 +# CHECK-ENCODING: encoding: [0x52,0xef,0x4d,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/st.s b/llvm/test/MC/LoongArch/lasx/st.s new file mode 100644 index 00000000000000..d1437e3ec42f54 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/st.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvst $xr14, $r12, 943 +# CHECK-INST: xvst $xr14, $t0, 943 +# CHECK-ENCODING: encoding: [0x8e,0xbd,0xce,0x2c] + +xvstx $xr7, $r9, $r21 +# CHECK-INST: xvstx $xr7, $a5, $r21 +# CHECK-ENCODING: encoding: [0x27,0x55,0x4c,0x38] diff --git a/llvm/test/MC/LoongArch/lasx/stelm.s b/llvm/test/MC/LoongArch/lasx/stelm.s new file mode 100644 index 00000000000000..e19030a0047610 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/stelm.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvstelm.b $xr20, $r2, -105, 10 +# CHECK-INST: xvstelm.b $xr20, $tp, -105, 10 +# CHECK-ENCODING: encoding: [0x54,0x5c,0xaa,0x33] + +xvstelm.h $xr8, $r1, 160, 4 +# CHECK-INST: xvstelm.h $xr8, $ra, 160, 4 +# CHECK-ENCODING: encoding: [0x28,0x40,0x51,0x33] + +xvstelm.w $xr19, $r18, 412, 0 +# CHECK-INST: xvstelm.w $xr19, $t6, 412, 0 +# CHECK-ENCODING: encoding: [0x53,0x9e,0x21,0x33] + +xvstelm.d $xr22, $r30, 960, 3 +# CHECK-INST: xvstelm.d $xr22, $s7, 960, 3 +# CHECK-ENCODING: encoding: [0xd6,0xe3,0x1d,0x33] diff --git a/llvm/test/MC/LoongArch/lasx/sub.s b/llvm/test/MC/LoongArch/lasx/sub.s new file mode 100644 index 00000000000000..e100730d14bb67 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/sub.s @@ -0,0 +1,24 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsub.b $xr11, $xr28, $xr16 +# CHECK-INST: xvsub.b $xr11, $xr28, $xr16 +# CHECK-ENCODING: encoding: [0x8b,0x43,0x0c,0x74] + +xvsub.h $xr11, $xr3, $xr24 +# CHECK-INST: xvsub.h $xr11, $xr3, $xr24 +# CHECK-ENCODING: encoding: [0x6b,0xe0,0x0c,0x74] + +xvsub.w $xr14, $xr23, $xr6 +# CHECK-INST: xvsub.w $xr14, $xr23, $xr6 +# CHECK-ENCODING: encoding: [0xee,0x1a,0x0d,0x74] + +xvsub.d $xr5, $xr13, $xr7 +# CHECK-INST: xvsub.d $xr5, $xr13, $xr7 +# CHECK-ENCODING: encoding: [0xa5,0x9d,0x0d,0x74] + +xvsub.q $xr13, $xr26, $xr31 +# CHECK-INST: xvsub.q $xr13, $xr26, $xr31 +# CHECK-ENCODING: encoding: [0x4d,0xff,0x2d,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/subi.s b/llvm/test/MC/LoongArch/lasx/subi.s new file mode 100644 index 00000000000000..921fcf992595da --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/subi.s @@ -0,0 +1,20 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsubi.bu $xr18, $xr27, 1 +# CHECK-INST: xvsubi.bu $xr18, $xr27, 1 +# CHECK-ENCODING: encoding: [0x72,0x07,0x8c,0x76] + +xvsubi.hu $xr6, $xr23, 19 +# CHECK-INST: xvsubi.hu $xr6, $xr23, 19 +# CHECK-ENCODING: encoding: [0xe6,0xce,0x8c,0x76] + +xvsubi.wu $xr13, $xr3, 5 +# CHECK-INST: xvsubi.wu $xr13, $xr3, 5 +# CHECK-ENCODING: encoding: [0x6d,0x14,0x8d,0x76] + +xvsubi.du $xr26, $xr28, 14 +# CHECK-INST: xvsubi.du $xr26, $xr28, 14 +# CHECK-ENCODING: encoding: [0x9a,0xbb,0x8d,0x76] diff --git a/llvm/test/MC/LoongArch/lasx/subw.s b/llvm/test/MC/LoongArch/lasx/subw.s new file mode 100644 index 00000000000000..666edfdae3b25c --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/subw.s @@ -0,0 +1,68 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvsubwev.h.b $xr29, $xr1, $xr28 +# CHECK-INST: xvsubwev.h.b $xr29, $xr1, $xr28 +# CHECK-ENCODING: encoding: [0x3d,0x70,0x20,0x74] + +xvsubwev.w.h $xr24, $xr20, $xr31 +# CHECK-INST: xvsubwev.w.h $xr24, $xr20, $xr31 +# CHECK-ENCODING: encoding: [0x98,0xfe,0x20,0x74] + +xvsubwev.d.w $xr6, $xr4, $xr11 +# CHECK-INST: xvsubwev.d.w $xr6, $xr4, $xr11 +# CHECK-ENCODING: encoding: [0x86,0x2c,0x21,0x74] + +xvsubwev.q.d $xr27, $xr31, $xr13 +# CHECK-INST: xvsubwev.q.d $xr27, $xr31, $xr13 +# CHECK-ENCODING: encoding: [0xfb,0xb7,0x21,0x74] + +xvsubwev.h.bu $xr1, $xr20, $xr2 +# CHECK-INST: xvsubwev.h.bu $xr1, $xr20, $xr2 +# CHECK-ENCODING: encoding: [0x81,0x0a,0x30,0x74] + +xvsubwev.w.hu $xr19, $xr6, $xr12 +# CHECK-INST: xvsubwev.w.hu $xr19, $xr6, $xr12 +# CHECK-ENCODING: encoding: [0xd3,0xb0,0x30,0x74] + +xvsubwev.d.wu $xr31, $xr1, $xr23 +# CHECK-INST: xvsubwev.d.wu $xr31, $xr1, $xr23 +# CHECK-ENCODING: encoding: [0x3f,0x5c,0x31,0x74] + +xvsubwev.q.du $xr31, $xr28, $xr17 +# CHECK-INST: xvsubwev.q.du $xr31, $xr28, $xr17 +# CHECK-ENCODING: encoding: [0x9f,0xc7,0x31,0x74] + +xvsubwod.h.b $xr3, $xr9, $xr17 +# CHECK-INST: xvsubwod.h.b $xr3, $xr9, $xr17 +# CHECK-ENCODING: encoding: [0x23,0x45,0x24,0x74] + +xvsubwod.w.h $xr14, $xr5, $xr21 +# CHECK-INST: xvsubwod.w.h $xr14, $xr5, $xr21 +# CHECK-ENCODING: encoding: [0xae,0xd4,0x24,0x74] + +xvsubwod.d.w $xr8, $xr14, $xr3 +# CHECK-INST: xvsubwod.d.w $xr8, $xr14, $xr3 +# CHECK-ENCODING: encoding: [0xc8,0x0d,0x25,0x74] + +xvsubwod.q.d $xr24, $xr15, $xr18 +# CHECK-INST: xvsubwod.q.d $xr24, $xr15, $xr18 +# CHECK-ENCODING: encoding: [0xf8,0xc9,0x25,0x74] + +xvsubwod.h.bu $xr27, $xr2, $xr1 +# CHECK-INST: xvsubwod.h.bu $xr27, $xr2, $xr1 +# CHECK-ENCODING: encoding: [0x5b,0x04,0x34,0x74] + +xvsubwod.w.hu $xr19, $xr7, $xr22 +# CHECK-INST: xvsubwod.w.hu $xr19, $xr7, $xr22 +# CHECK-ENCODING: encoding: [0xf3,0xd8,0x34,0x74] + +xvsubwod.d.wu $xr1, $xr24, $xr26 +# CHECK-INST: xvsubwod.d.wu $xr1, $xr24, $xr26 +# CHECK-ENCODING: encoding: [0x01,0x6b,0x35,0x74] + +xvsubwod.q.du $xr29, $xr26, $xr7 +# CHECK-INST: xvsubwod.q.du $xr29, $xr26, $xr7 +# CHECK-ENCODING: encoding: [0x5d,0x9f,0x35,0x74] diff --git a/llvm/test/MC/LoongArch/lasx/xor.s b/llvm/test/MC/LoongArch/lasx/xor.s new file mode 100644 index 00000000000000..511ad49b12d5b3 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/xor.s @@ -0,0 +1,8 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvxor.v $xr14, $xr26, $xr10 +# CHECK-INST: xvxor.v $xr14, $xr26, $xr10 +# CHECK-ENCODING: encoding: [0x4e,0x2b,0x27,0x75] diff --git a/llvm/test/MC/LoongArch/lasx/xori.s b/llvm/test/MC/LoongArch/lasx/xori.s new file mode 100644 index 00000000000000..e11dc0c81ccd19 --- /dev/null +++ b/llvm/test/MC/LoongArch/lasx/xori.s @@ -0,0 +1,8 @@ +# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \ +# RUN: FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \ +# RUN: llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST + +xvxori.b $xr26, $xr8, 149 +# CHECK-INST: xvxori.b $xr26, $xr8, 149 +# CHECK-ENCODING: encoding: [0x1a,0x55,0xda,0x77]