[llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.cpp X86InstrSSE.td
Evan Cheng
evan.cheng at apple.com
Tue Jul 25 13:25:54 PDT 2006
Changes in directory llvm/lib/Target/X86:
X86InstrInfo.cpp updated: 1.57 -> 1.58
X86InstrSSE.td updated: 1.129 -> 1.130
---
Log message:
Can't commute shufps. The high / low parts elements come from different vectors.
---
Diffs of the changes: (+1 -20)
X86InstrInfo.cpp | 18 ------------------
X86InstrSSE.td | 3 +--
2 files changed, 1 insertion(+), 20 deletions(-)
Index: llvm/lib/Target/X86/X86InstrInfo.cpp
diff -u llvm/lib/Target/X86/X86InstrInfo.cpp:1.57 llvm/lib/Target/X86/X86InstrInfo.cpp:1.58
--- llvm/lib/Target/X86/X86InstrInfo.cpp:1.57 Tue May 30 18:34:30 2006
+++ llvm/lib/Target/X86/X86InstrInfo.cpp Tue Jul 25 15:25:40 2006
@@ -207,24 +207,6 @@
///
MachineInstr *X86InstrInfo::commuteInstruction(MachineInstr *MI) const {
switch (MI->getOpcode()) {
- case X86::SHUFPSrri: { // A = SHUFPSrri B,C, M -> A = SHUFPSrri C,B, rotl(M,4)
- unsigned A = MI->getOperand(0).getReg();
- unsigned B = MI->getOperand(1).getReg();
- unsigned C = MI->getOperand(2).getReg();
- unsigned M = MI->getOperand(3).getImmedValue();
- if (B == C) return 0;
- return BuildMI(X86::SHUFPSrri, 3, A).addReg(C).addReg(B).
- addImm(((M & 0xF) << 4) | ((M & 0xF0) >> 4));
- }
- case X86::SHUFPDrri: { // A = SHUFPDrri B,C, M -> A = SHUFPDrri C,B, rotl(M,1)
- unsigned A = MI->getOperand(0).getReg();
- unsigned B = MI->getOperand(1).getReg();
- unsigned C = MI->getOperand(2).getReg();
- unsigned M = MI->getOperand(3).getImmedValue();
- if (B == C) return 0;
- return BuildMI(X86::SHUFPDrri, 3, A).addReg(C).addReg(B).
- addImm(((M & 0x1) << 1) | ((M & 0x2) >> 1));
- }
case X86::SHRD16rri8: // A = SHRD16rri8 B, C, I -> A = SHLD16rri8 C, B, (16-I)
case X86::SHLD16rri8: // A = SHLD16rri8 B, C, I -> A = SHRD16rri8 C, B, (16-I)
case X86::SHRD32rri8: // A = SHRD32rri8 B, C, I -> A = SHLD32rri8 C, B, (32-I)
Index: llvm/lib/Target/X86/X86InstrSSE.td
diff -u llvm/lib/Target/X86/X86InstrSSE.td:1.129 llvm/lib/Target/X86/X86InstrSSE.td:1.130
--- llvm/lib/Target/X86/X86InstrSSE.td:1.129 Fri Jul 7 03:33:52 2006
+++ llvm/lib/Target/X86/X86InstrSSE.td Tue Jul 25 15:25:40 2006
@@ -1223,7 +1223,7 @@
// Shuffle and unpack instructions
let isTwoAddress = 1 in {
-let isCommutable = 1, isConvertibleToThreeAddress = 1 in // Convert to pshufd
+let isConvertibleToThreeAddress = 1 in // Convert to pshufd
def SHUFPSrri : PSIi8<0xC6, MRMSrcReg,
(ops VR128:$dst, VR128:$src1, VR128:$src2, i32i8imm:$src3),
"shufps {$src3, $src2, $dst|$dst, $src2, $src3}",
@@ -1236,7 +1236,6 @@
[(set VR128:$dst, (v4f32 (vector_shuffle
VR128:$src1, (load addr:$src2),
SHUFP_shuffle_mask:$src3)))]>;
-let isCommutable = 1 in
def SHUFPDrri : PDIi8<0xC6, MRMSrcReg,
(ops VR128:$dst, VR128:$src1, VR128:$src2, i8imm:$src3),
"shufpd {$src3, $src2, $dst|$dst, $src2, $src3}",
More information about the llvm-commits
mailing list