diff options
author | David Greene <greened@obbligato.org> | 2011-10-19 13:04:50 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2011-10-19 13:04:50 +0000 |
commit | 3ce88b92ba80048e91dfef86dfaa6198d4e75c1c (patch) | |
tree | 574ae03d698c6c130cd3e9b312e6c049b05c5261 /test/TableGen | |
parent | d3d1cad535d1c88e13e8e082c136260ee624967f (diff) | |
download | external_llvm-3ce88b92ba80048e91dfef86dfaa6198d4e75c1c.zip external_llvm-3ce88b92ba80048e91dfef86dfaa6198d4e75c1c.tar.gz external_llvm-3ce88b92ba80048e91dfef86dfaa6198d4e75c1c.tar.bz2 |
Add Paste Test
This tests TableGen's paste functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142526 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/TableGen')
-rw-r--r-- | test/TableGen/Paste.td | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/TableGen/Paste.td b/test/TableGen/Paste.td new file mode 100644 index 0000000..33d61cc --- /dev/null +++ b/test/TableGen/Paste.td @@ -0,0 +1,35 @@ +// RUN: llvm-tblgen %s | FileCheck %s + +class Instr<int i> { + int index = i; +} + +multiclass Test { + def Vx#NAME#PS : Instr<0>; + def Vx#NAME#PD : Instr<1>; + def Vy#NAME#PS : Instr<2>; + def Vy#NAME#PD : Instr<3>; +} + +defm ADD : Test; +defm SUB : Test; + +// CHECK: VxADDPD +// CHECK: index = 1; +// CHECK: VxADDPS +// CHECK: index = 0; + +// CHECK: VxSUBPD +// CHECK: index = 1; +// CHECK: VxSUBPS +// CHECK: index = 0; + +// CHECK: VyADDPD +// CHECK: index = 3; +// CHECK: VyADDPS +// CHECK: index = 2; + +// CHECK: VySUBPD +// CHECK: index = 3; +// CHECK: VySUBPS +// CHECK: index = 2; |