From 413b979fe4b3482f347fc7b613d7dcda81e34874 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 11 Jan 2006 18:21:25 +0000 Subject: [PATCH] Dead FP arguments still use an incoming FP reg. This fixes Regression/CodeGen/PowerPC/2006-01-11-darwin-fp-argument.ll, which was distilled from a miscompilation in 252.eon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25217 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCISelLowering.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp index 75be67021ab..976f80fafa9 100644 --- a/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/lib/Target/PowerPC/PPCISelLowering.cpp @@ -509,7 +509,13 @@ PPCTargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) { case MVT::f32: case MVT::f64: ObjSize = (ObjectVT == MVT::f64) ? 8 : 4; - if (!ArgLive) break; + if (!ArgLive) { + if (FPR_remaining > 0) { + --FPR_remaining; + ++FPR_idx; + } + break; + } if (FPR_remaining > 0) { unsigned VReg; if (ObjectVT == MVT::f32) -- 2.34.1