[llvm-commits] CVS: llvm/lib/Target/TargetLowering.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Mar 30 16:46:48 PST 2006
Changes in directory llvm/lib/Target:
TargetLowering.cpp updated: 1.49 -> 1.50
---
Log message:
Modify the TargetLowering::getPackedTypeBreakdown method to also return the
unpromoted element type.
---
Diffs of the changes: (+7 -4)
TargetLowering.cpp | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
Index: llvm/lib/Target/TargetLowering.cpp
diff -u llvm/lib/Target/TargetLowering.cpp:1.49 llvm/lib/Target/TargetLowering.cpp:1.50
--- llvm/lib/Target/TargetLowering.cpp:1.49 Thu Mar 30 18:28:56 2006
+++ llvm/lib/Target/TargetLowering.cpp Thu Mar 30 18:46:36 2006
@@ -148,11 +148,13 @@
///
/// This method returns the number and type of the resultant breakdown.
///
-MVT::ValueType TargetLowering::getPackedTypeBreakdown(const PackedType *PTy,
- unsigned &NumVals) const {
+unsigned TargetLowering::getPackedTypeBreakdown(const PackedType *PTy,
+ MVT::ValueType &PTyElementVT,
+ MVT::ValueType &PTyLegalElementVT) const {
// Figure out the right, legal destination reg to copy into.
unsigned NumElts = PTy->getNumElements();
MVT::ValueType EltTy = getValueType(PTy->getElementType());
+ PTyElementVT = EltTy;
unsigned NumVectorRegs = 1;
@@ -170,13 +172,14 @@
VT = getVectorType(EltTy, NumElts);
MVT::ValueType DestVT = getTypeToTransformTo(VT);
+ PTyLegalElementVT = DestVT;
if (DestVT < VT) {
// Value is expanded, e.g. i64 -> i16.
- NumVals = NumVectorRegs*(MVT::getSizeInBits(VT)/MVT::getSizeInBits(DestVT));
+ return NumVectorRegs*(MVT::getSizeInBits(VT)/MVT::getSizeInBits(DestVT));
} else {
// Otherwise, promotion or legal types use the same number of registers as
// the vector decimated to the appropriate level.
- NumVals = NumVectorRegs;
+ return NumVectorRegs;
}
return DestVT;
More information about the llvm-commits
mailing list