From 0a00bece0d0b0e457856d13b383b23ad509080d5 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 22 Aug 2005 21:33:11 +0000 Subject: [PATCH] Fix a crash I introduced into the IA64 backend with my copyfromreg change. It used to crash on any function that took float arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22973 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/IA64/IA64ISelPattern.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Target/IA64/IA64ISelPattern.cpp b/lib/Target/IA64/IA64ISelPattern.cpp index 1ca4176c3a5..cb815212c19 100644 --- a/lib/Target/IA64/IA64ISelPattern.cpp +++ b/lib/Target/IA64/IA64ISelPattern.cpp @@ -202,7 +202,9 @@ IA64TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) { argPreg[count] = args_FP[used_FPArgs++]; argOpc[count] = IA64::FMOV; argt = newroot = DAG.getCopyFromReg(DAG.getRoot(), argVreg[count], - getValueType(I->getType())); + MVT::f64); + if (I->getType() == Type::FloatTy) + argt = DAG.getNode(ISD::FP_ROUND, MVT::f32, argt); break; case MVT::i1: // NOTE: as far as C abi stuff goes, // bools are just boring old ints