diff options
author | Chris Lattner <sabre@nondot.org> | 2005-12-27 03:02:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-12-27 03:02:18 +0000 |
commit | f31d193cce7c2df2708cacbaae123222116320a0 (patch) | |
tree | 2ca86e928eb75aff753e5c10c72481c79591b874 | |
parent | 874874657eea1d50062a973321ab256d8e761496 (diff) |
Fix a problem duraid pointed out to me compiling kc++ with -enable-x86-fastcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25024 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index b419f31d47..a5b261c837 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -591,6 +591,9 @@ X86TargetLowering::LowerFastCCArguments(Function &F, SelectionDAG &DAG) { X86::R8RegisterClass); ArgValue = DAG.getCopyFromReg(DAG.getRoot(), VReg, MVT::i8); DAG.setRoot(ArgValue.getValue(1)); + if (ObjectVT == MVT::i1) + // FIXME: Should insert a assertzext here. + ArgValue = DAG.getNode(ISD::TRUNCATE, MVT::i1, ArgValue); } ++NumIntRegs; break; @@ -780,6 +783,8 @@ X86TargetLowering::LowerFastCCCallTo(SDOperand Chain, const Type *RetTy, switch (getValueType(Args[i].second)) { default: assert(0 && "Unexpected ValueType for argument!"); case MVT::i1: + Args[i].first = DAG.getNode(ISD::ANY_EXTEND, MVT::i8, Args[i].first); + // Fall through. case MVT::i8: case MVT::i16: case MVT::i32: |