[llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.td X86TargetMachine.cpp
Evan Cheng
evan.cheng at apple.com
Thu Jan 19 17:13:42 PST 2006
Changes in directory llvm/lib/Target/X86:
X86InstrInfo.td updated: 1.214 -> 1.215
X86TargetMachine.cpp updated: 1.94 -> 1.95
---
Log message:
A few more SH{L|R}D peepholes.
---
Diffs of the changes: (+17 -1)
X86InstrInfo.td | 16 ++++++++++++++++
X86TargetMachine.cpp | 2 +-
2 files changed, 17 insertions(+), 1 deletion(-)
Index: llvm/lib/Target/X86/X86InstrInfo.td
diff -u llvm/lib/Target/X86/X86InstrInfo.td:1.214 llvm/lib/Target/X86/X86InstrInfo.td:1.215
--- llvm/lib/Target/X86/X86InstrInfo.td:1.214 Thu Jan 19 17:26:24 2006
+++ llvm/lib/Target/X86/X86InstrInfo.td Thu Jan 19 19:13:30 2006
@@ -3073,17 +3073,33 @@
(shl R32:$src2, (sub 32, CL:$amt))),
(SHRD32rrCL R32:$src1, R32:$src2)>;
+def : Pat<(store (or (srl (loadi32 addr:$dst), CL:$amt),
+ (shl R32:$src2, (sub 32, CL:$amt))), addr:$dst),
+ (SHRD32mrCL addr:$dst, R32:$src2)>;
+
// (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)>;
+def : Pat<(store (or (shl (loadi32 addr:$dst), CL:$amt),
+ (srl R32:$src2, (sub 32, CL:$amt))), addr:$dst),
+ (SHLD32mrCL addr:$dst, 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)>;
+def : Pat<(store (or (srl (loadi16 addr:$dst), CL:$amt),
+ (shl R16:$src2, (sub 16, CL:$amt))), addr:$dst),
+ (SHRD16mrCL addr:$dst, 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)>;
+
+def : Pat<(store (or (shl (loadi16 addr:$dst), CL:$amt),
+ (srl R16:$src2, (sub 16, CL:$amt))), addr:$dst),
+ (SHLD16mrCL addr:$dst, R16:$src2)>;
Index: llvm/lib/Target/X86/X86TargetMachine.cpp
diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.94 llvm/lib/Target/X86/X86TargetMachine.cpp:1.95
--- llvm/lib/Target/X86/X86TargetMachine.cpp:1.94 Thu Jan 19 17:27:08 2006
+++ llvm/lib/Target/X86/X86TargetMachine.cpp Thu Jan 19 19:13:30 2006
@@ -48,7 +48,7 @@
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!
More information about the llvm-commits
mailing list