[llvm-commits] [release_19] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp
Tanya Lattner
tonic at nondot.org
Thu Nov 9 20:27:33 PST 2006
Changes in directory llvm/lib/Target/X86:
X86ISelLowering.cpp updated: 1.287.2.1 -> 1.287.2.2
---
Log message:
Reverting patch
---
Diffs of the changes: (+7 -23)
X86ISelLowering.cpp | 30 +++++++-----------------------
1 files changed, 7 insertions(+), 23 deletions(-)
Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.287.2.1 llvm/lib/Target/X86/X86ISelLowering.cpp:1.287.2.2
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.287.2.1 Thu Nov 9 22:05:13 2006
+++ llvm/lib/Target/X86/X86ISelLowering.cpp Thu Nov 9 22:27:20 2006
@@ -516,9 +516,10 @@
BytesToPopOnReturn = 0; // Callee pops nothing.
BytesCallerReserves = ArgOffset;
- // If this is a struct return on, the callee pops the hidden struct
- // pointer. This is common for Darwin/X86, Linux & Mingw32 targets.
- if (MF.getFunction()->getCallingConv() == CallingConv::CSRet)
+ // If this is a struct return on Darwin/X86, the callee pops the hidden struct
+ // pointer.
+ if (MF.getFunction()->getCallingConv() == CallingConv::CSRet &&
+ Subtarget->isTargetDarwin())
BytesToPopOnReturn = 4;
// Return the new list of results.
@@ -679,10 +680,9 @@
// Create the CALLSEQ_END node.
unsigned NumBytesForCalleeToPush = 0;
- // If this is is a call to a struct-return function, the callee
+ // If this is is a call to a struct-return function on Darwin/X86, the callee
// pops the hidden struct pointer, so we have to push it back.
- // This is common for Darwin/X86, Linux & Mingw32 targets.
- if (CallingConv == CallingConv::CSRet)
+ if (CallingConv == CallingConv::CSRet && Subtarget->isTargetDarwin())
NumBytesForCalleeToPush = 4;
NodeTys.clear();
@@ -2582,22 +2582,6 @@
isUndefOrEqual(N->getOperand(3), 3);
}
-/// isMOVHLPS_v_undef_Mask - Special case of isMOVHLPSMask for canonical form
-/// of vector_shuffle v, v, <2, 3, 2, 3>, i.e. vector_shuffle v, undef,
-/// <2, 3, 2, 3>
-bool X86::isMOVHLPS_v_undef_Mask(SDNode *N) {
- assert(N->getOpcode() == ISD::BUILD_VECTOR);
-
- if (N->getNumOperands() != 4)
- return false;
-
- // Expect bit0 == 2, bit1 == 3, bit2 == 2, bit3 == 3
- return isUndefOrEqual(N->getOperand(0), 2) &&
- isUndefOrEqual(N->getOperand(1), 3) &&
- isUndefOrEqual(N->getOperand(2), 2) &&
- isUndefOrEqual(N->getOperand(3), 3);
-}
-
/// isMOVLPMask - Return true if the specified VECTOR_SHUFFLE operand
/// specifies a shuffle of elements that is suitable for input to MOVLP{S|D}.
bool X86::isMOVLPMask(SDNode *N) {
@@ -3740,7 +3724,7 @@
SDOperand Mask = DAG.getNode(ISD::BUILD_VECTOR, MaskVT,
&IdxVec[0], IdxVec.size());
Vec = DAG.getNode(ISD::VECTOR_SHUFFLE, Vec.getValueType(),
- Vec, DAG.getNode(ISD::UNDEF, Vec.getValueType()), Mask);
+ Vec, Vec, Mask);
return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, VT, Vec,
DAG.getConstant(0, getPointerTy()));
} else if (MVT::getSizeInBits(VT) == 64) {
More information about the llvm-commits
mailing list