[llvm-commits] CVS: llvm/lib/Target/X86/X86InstrSSE.td
Evan Cheng
evan.cheng at apple.com
Thu Jun 29 11:05:08 PDT 2006
Changes in directory llvm/lib/Target/X86:
X86InstrSSE.td updated: 1.127 -> 1.128
---
Log message:
Should just use xorps to clear XMM registers for all data types. pxor is also one byte longer.
---
Diffs of the changes: (+10 -14)
X86InstrSSE.td | 24 ++++++++++--------------
1 files changed, 10 insertions(+), 14 deletions(-)
Index: llvm/lib/Target/X86/X86InstrSSE.td
diff -u llvm/lib/Target/X86/X86InstrSSE.td:1.127 llvm/lib/Target/X86/X86InstrSSE.td:1.128
--- llvm/lib/Target/X86/X86InstrSSE.td:1.127 Wed Jun 28 19:34:23 2006
+++ llvm/lib/Target/X86/X86InstrSSE.td Thu Jun 29 13:04:54 2006
@@ -2109,15 +2109,9 @@
// Alias instructions that map zero vector to pxor / xorp* for sse.
// FIXME: remove when we can teach regalloc that xor reg, reg is ok.
-def V_SET0_PI : PDI<0xEF, MRMInitReg, (ops VR128:$dst),
- "pxor $dst, $dst",
- [(set VR128:$dst, (v2i64 immAllZerosV))]>;
-def V_SET0_PS : PSI<0x57, MRMInitReg, (ops VR128:$dst),
- "xorps $dst, $dst",
- [(set VR128:$dst, (v4f32 immAllZerosV))]>;
-def V_SET0_PD : PDI<0x57, MRMInitReg, (ops VR128:$dst),
- "xorps $dst, $dst",
- [(set VR128:$dst, (v2f64 immAllZerosV))]>;
+def V_SET0 : PSI<0x57, MRMInitReg, (ops VR128:$dst),
+ "xorps $dst, $dst",
+ [(set VR128:$dst, (v4f32 immAllZerosV))]>;
def V_SETALLONES : PDI<0x76, MRMInitReg, (ops VR128:$dst),
"pcmpeqd $dst, $dst",
@@ -2265,9 +2259,11 @@
def : Pat<(v2i64 (undef)), (IMPLICIT_DEF_VR128)>, Requires<[HasSSE2]>;
// 128-bit vector all zero's.
-def : Pat<(v16i8 immAllZerosV), (V_SET0_PI)>, Requires<[HasSSE2]>;
-def : Pat<(v8i16 immAllZerosV), (V_SET0_PI)>, Requires<[HasSSE2]>;
-def : Pat<(v4i32 immAllZerosV), (V_SET0_PI)>, Requires<[HasSSE2]>;
+def : Pat<(v16i8 immAllZerosV), (V_SET0)>, Requires<[HasSSE2]>;
+def : Pat<(v8i16 immAllZerosV), (V_SET0)>, Requires<[HasSSE2]>;
+def : Pat<(v4i32 immAllZerosV), (V_SET0)>, Requires<[HasSSE2]>;
+def : Pat<(v2i64 immAllZerosV), (V_SET0)>, Requires<[HasSSE2]>;
+def : Pat<(v2f64 immAllZerosV), (V_SET0)>, Requires<[HasSSE2]>;
// 128-bit vector all one's.
def : Pat<(v16i8 immAllOnesV), (V_SETALLONES)>, Requires<[HasSSE2]>;
@@ -2365,10 +2361,10 @@
// Zeroing a VR128 then do a MOVS{S|D} to the lower bits.
def : Pat<(v2f64 (vector_shuffle immAllZerosV,
(v2f64 (scalar_to_vector FR64:$src)), MOVL_shuffle_mask)),
- (MOVLSD2PDrr (V_SET0_PD), FR64:$src)>, Requires<[HasSSE2]>;
+ (MOVLSD2PDrr (V_SET0), FR64:$src)>, Requires<[HasSSE2]>;
def : Pat<(v4f32 (vector_shuffle immAllZerosV,
(v4f32 (scalar_to_vector FR32:$src)), MOVL_shuffle_mask)),
- (MOVLSS2PSrr (V_SET0_PS), FR32:$src)>, Requires<[HasSSE2]>;
+ (MOVLSS2PSrr (V_SET0), FR32:$src)>, Requires<[HasSSE2]>;
}
// Splat v2f64 / v2i64
More information about the llvm-commits
mailing list