summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2011-10-06 21:20:44 +0000
committerDavid Greene <greened@obbligato.org>2011-10-06 21:20:44 +0000
commit74842740c0da91bc32fcd6af75223f38e5403f36 (patch)
tree817c90862dc72861669916f0fb5746b2f6b8f0c2
parent78f290c7394be8ea49290caa668ea63990d8cfbf (diff)
downloadbcm5719-llvm-74842740c0da91bc32fcd6af75223f38e5403f36.tar.gz
bcm5719-llvm-74842740c0da91bc32fcd6af75223f38e5403f36.zip
Make Test More Thorough
Check that all ADD patters are processed. Add a SUB test. llvm-svn: 141314
-rw-r--r--llvm/test/TableGen/MultiPat.td12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/TableGen/MultiPat.td b/llvm/test/TableGen/MultiPat.td
index 648855b4d3c..91767dcbd61 100644
--- a/llvm/test/TableGen/MultiPat.td
+++ b/llvm/test/TableGen/MultiPat.td
@@ -83,9 +83,12 @@ def Decls : decls;
// Define intrinsics
def int_x86_sse2_add_ps : Intrinsic<"addps">;
def int_x86_sse2_add_pd : Intrinsic<"addpd">;
+def int_x86_sse2_sub_ps : Intrinsic<"subps">;
+def int_x86_sse2_sub_pd : Intrinsic<"subpd">;
def INTRINSIC : Intrinsic<"Dummy">;
def bitconvert;
def add;
+def sub;
class MakePatImpl<list<dag> patterns> : Pat<patterns[0], patterns[1]>;
class MakePat<list<dag> patterns,
@@ -126,3 +129,12 @@ defm ADD : arith<0x58, "add", "int_x86_sse2_addSUFFIX",
// CHECK: [(set VR128:$dst, (int_x86_sse2_add_pd VR128:$src1, VR128:$src2))]
// CHECK: [(set VR128:$dst, (int_x86_sse2_add_ps VR128:$src1, VR128:$src2))]
+// CHECK: (set VR128:$dst, (add (int_x86_sse2_add_ps VR128:$src1, VR128:$src2)))
+// CHECK: (set VR128:$dst, (add (int_x86_sse2_add_pd VR128:$src1, VR128:$src2)))
+
+defm SUB : arith<0x59, "sub", "int_x86_sse2_subSUFFIX",
+ // rr Patterns
+ [[(set REGCLASS:$dst, (INTRINSIC REGCLASS:$src1, REGCLASS:$src2))]]>;
+
+// CHECK: [(set VR128:$dst, (int_x86_sse2_sub_pd VR128:$src1, VR128:$src2))]
+// CHECK: [(set VR128:$dst, (int_x86_sse2_sub_ps VR128:$src1, VR128:$src2))]
OpenPOWER on IntegriCloud