[llvm-commits] [llvm] r141314 - /llvm/trunk/test/TableGen/MultiPat.td

David Greene greened at obbligato.org
Thu Oct 6 14:20:44 PDT 2011


Author: greened
Date: Thu Oct  6 16:20:44 2011
New Revision: 141314

URL: http://llvm.org/viewvc/llvm-project?rev=141314&view=rev
Log:
Make Test More Thorough

Check that all ADD patters are processed.

Add a SUB test.

Modified:
    llvm/trunk/test/TableGen/MultiPat.td

Modified: llvm/trunk/test/TableGen/MultiPat.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/MultiPat.td?rev=141314&r1=141313&r2=141314&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/MultiPat.td (original)
+++ llvm/trunk/test/TableGen/MultiPat.td Thu Oct  6 16:20:44 2011
@@ -83,9 +83,12 @@
 // 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 @@
 
 // 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))]





More information about the llvm-commits mailing list