diff options
author | Nicolas Geoffray <nicolas.geoffray@lip6.fr> | 2008-04-13 13:40:22 +0000 |
---|---|---|
committer | Nicolas Geoffray <nicolas.geoffray@lip6.fr> | 2008-04-13 13:40:22 +0000 |
commit | c0cb28fd3abee9a8b40856990e04f1af2f9bd7b8 (patch) | |
tree | f0b0b0644b0038adae1aefedac31702809d91aff /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | fa0e66471f3b2d12db88a3715f2315e0408d79dd (diff) |
Add a divided flag for the first piece of an argument divided into mulitple parts. Fixes PR1643
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49611 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index ac5cfd2e91..04aa472d8f 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -4162,8 +4162,11 @@ TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) { unsigned NumRegs = getNumRegisters(VT); for (unsigned i = 0; i != NumRegs; ++i) { RetVals.push_back(RegisterVT); + + if (NumRegs > 1 && i == 0) + Flags.setDivided(); // if it isn't first piece, alignment must be 1 - if (i > 0) + else if (i > 0) Flags.setOrigAlign(1); Ops.push_back(DAG.getArgFlags(Flags)); } @@ -4285,7 +4288,9 @@ TargetLowering::LowerCallTo(SDOperand Chain, const Type *RetTy, for (unsigned i = 0; i != NumParts; ++i) { // if it isn't first piece, alignment must be 1 ISD::ArgFlagsTy MyFlags = Flags; - if (i != 0) + if (NumParts > 1 && i == 0) + MyFlags.setDivided(); + else if (i != 0) MyFlags.setOrigAlign(1); Ops.push_back(Parts[i]); |