[llvm] ccb6191 - [VE] Add missing regression test

Kazushi Marukawa via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 04:40:39 PDT 2020


Author: Kazushi (Jam) Marukawa
Date: 2020-10-27T20:40:30+09:00
New Revision: ccb6191f048927e55bac82b92eeba8ff0f9f8fe5

URL: https://github.com/llvm/llvm-project/commit/ccb6191f048927e55bac82b92eeba8ff0f9f8fe5
DIFF: https://github.com/llvm/llvm-project/commit/ccb6191f048927e55bac82b92eeba8ff0f9f8fe5.diff

LOG: [VE] Add missing regression test

In the previous "Add vector shift instructions", I forgot to add
regression tests for VSRL and VSRD instructions.  This patch is
adding them.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D90167

Added: 
    llvm/test/MC/VE/VSRD.s
    llvm/test/MC/VE/VSRL.s

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/MC/VE/VSRD.s b/llvm/test/MC/VE/VSRD.s
new file mode 100644
index 000000000000..a6cc42529526
--- /dev/null
+++ b/llvm/test/MC/VE/VSRD.s
@@ -0,0 +1,28 @@
+# RUN: llvm-mc -triple=ve --show-encoding < %s \
+# RUN:     | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+# RUN: llvm-mc -triple=ve -filetype=obj < %s | llvm-objdump -d - \
+# RUN:     | FileCheck %s --check-prefixes=CHECK-INST
+
+# CHECK-INST: vsrd %v11, (%v22, %v23), %s20
+# CHECK-ENCODING: encoding: [0x00,0x17,0x16,0x0b,0x00,0x94,0x00,0xf4]
+vsrd %v11, (%v22, %v23), %s20
+
+# CHECK-INST: vsrd %vix, (%vix, %vix), %s23
+# CHECK-ENCODING: encoding: [0x00,0xff,0xff,0xff,0x00,0x97,0x00,0xf4]
+vsrd %vix, (%vix, %vix), %s23
+
+# CHECK-INST: vsrd %vix, (%v22, %v30), 22
+# CHECK-ENCODING: encoding: [0x00,0x1e,0x16,0xff,0x00,0x16,0x00,0xf4]
+vsrd %vix, (%v22, %v30), 22
+
+# CHECK-INST: vsrd %v11, (%v22, %vix), 127, %vm11
+# CHECK-ENCODING: encoding: [0x00,0xff,0x16,0x0b,0x00,0x7f,0x0b,0xf4]
+vsrd %v11, (%v22, %vix), 127, %vm11
+
+# CHECK-INST: vsrd %v11, (%vix, %v22), 21, %vm11
+# CHECK-ENCODING: encoding: [0x00,0x16,0xff,0x0b,0x00,0x15,0x0b,0xf4]
+vsrd %v11, (%vix, %v22), 21, %vm11
+
+# CHECK-INST: vsrd %v12, (%v20, %v22), 2, %vm12
+# CHECK-ENCODING: encoding: [0x00,0x16,0x14,0x0c,0x00,0x02,0x0c,0xf4]
+vsrd %v12, (%v20, %v22), 2, %vm12

diff  --git a/llvm/test/MC/VE/VSRL.s b/llvm/test/MC/VE/VSRL.s
new file mode 100644
index 000000000000..f8e5b5ac9b18
--- /dev/null
+++ b/llvm/test/MC/VE/VSRL.s
@@ -0,0 +1,28 @@
+# RUN: llvm-mc -triple=ve --show-encoding < %s \
+# RUN:     | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+# RUN: llvm-mc -triple=ve -filetype=obj < %s | llvm-objdump -d - \
+# RUN:     | FileCheck %s --check-prefixes=CHECK-INST
+
+# CHECK-INST: vsrl %v11, %v22, %s20
+# CHECK-ENCODING: encoding: [0x00,0x16,0x00,0x0b,0x00,0x94,0x20,0xf5]
+vsrl %v11, %v22, %s20
+
+# CHECK-INST: vsrl %vix, %vix, %vix
+# CHECK-ENCODING: encoding: [0x00,0xff,0xff,0xff,0x00,0x00,0x00,0xf5]
+vsrl %vix, %vix, %vix
+
+# CHECK-INST: pvsrl.lo %vix, %v22, 22
+# CHECK-ENCODING: encoding: [0x00,0x16,0x00,0xff,0x00,0x16,0x60,0xf5]
+pvsrl.lo %vix, %v22, 22
+
+# CHECK-INST: pvsrl.lo %v11, %v22, 127, %vm11
+# CHECK-ENCODING: encoding: [0x00,0x16,0x00,0x0b,0x00,0x7f,0x6b,0xf5]
+pvsrl.lo %v11, %v22, 127, %vm11
+
+# CHECK-INST: pvsrl.up %v11, %vix, %v22, %vm11
+# CHECK-ENCODING: encoding: [0x00,0xff,0x16,0x0b,0x00,0x00,0x8b,0xf5]
+pvsrl.up %v11, %vix, %v22, %vm11
+
+# CHECK-INST: pvsrl %v12, %v20, %v22, %vm12
+# CHECK-ENCODING: encoding: [0x00,0x14,0x16,0x0c,0x00,0x00,0xcc,0xf5]
+pvsrl %v12, %v20, %v22, %vm12


        


More information about the llvm-commits mailing list