Added i16 SH{L|R}D patterns.
authorEvan Cheng <evan.cheng@apple.com>
Thu, 19 Jan 2006 23:26:24 +0000 (23:26 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 19 Jan 2006 23:26:24 +0000 (23:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25468 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrInfo.td
lib/Target/X86/X86TargetMachine.cpp

index ba159007f03b153c67bf432f17fa2cab4c31c300..92b0c964557cc473435886cb8e62d6dfe83d0b2e 100644 (file)
@@ -3068,12 +3068,22 @@ def : Pat<(shl R8 :$src1, (i8 1)), (ADD8rr  R8 :$src1, R8 :$src1)>;
 def : Pat<(shl R16:$src1, (i8 1)), (ADD16rr R16:$src1, R16:$src1)>;
 def : Pat<(shl R32:$src1, (i8 1)), (ADD32rr R32:$src1, R32:$src1)>;
 
-// (or (x >> c) | (y << (32 - c))) ==> (shrd x, y, c)
+// (or (x >> c) | (y << (32 - c))) ==> (shrd32 x, y, c)
 def : Pat<(or (srl R32:$src1, CL:$amt),
               (shl R32:$src2, (sub 32, CL:$amt))),
           (SHRD32rrCL R32:$src1, R32:$src2)>;
 
-// (or (x << c) | (y >> (32 - c))) ==> (shld x, y, c)
+// (or (x << c) | (y >> (32 - c))) ==> (shld32 x, y, c)
 def : Pat<(or (shl R32:$src1, CL:$amt),
               (srl R32:$src2, (sub 32, CL:$amt))),
           (SHLD32rrCL R32:$src1, R32:$src2)>;
+
+// (or (x >> c) | (y << (16 - c))) ==> (shrd16 x, y, c)
+def : Pat<(or (srl R16:$src1, CL:$amt),
+              (shl R16:$src2, (sub 16, CL:$amt))),
+          (SHRD16rrCL R16:$src1, R16:$src2)>;
+
+// (or (x << c) | (y >> (16 - c))) ==> (shld16 x, y, c)
+def : Pat<(or (shl R16:$src1, CL:$amt),
+              (srl R16:$src2, (sub 16, CL:$amt))),
+          (SHLD16rrCL R16:$src1, R16:$src2)>;
index 4af0b06c0066898a88fe258a34bafd8281635c6b..a484b9dac937c45bf25a09ba8ed791578918ee0a 100644 (file)
@@ -48,7 +48,7 @@ namespace {
   cl::opt<bool, true> EnableX86DAGDAG("enable-x86-dag-isel", cl::Hidden,
                       cl::desc("Enable DAG-to-DAG isel for X86"),
                       cl::location(X86DAGIsel),
-                      cl::init(false));
+                      cl::init(true));
   
   // FIXME: This should eventually be handled with target triples and
   // subtarget support!