diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-01-18 08:08:38 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-01-18 08:08:38 +0000 |
commit | 68e5d084f1a51e71b38aceb8ccc12734adcce9ef (patch) | |
tree | 39c47c52b32f3508ca1b6319bc4069e3285ac6da | |
parent | 43da9c65f26d2c2211f1028f70320a65d7868cab (diff) | |
download | external_llvm-68e5d084f1a51e71b38aceb8ccc12734adcce9ef.zip external_llvm-68e5d084f1a51e71b38aceb8ccc12734adcce9ef.tar.gz external_llvm-68e5d084f1a51e71b38aceb8ccc12734adcce9ef.tar.bz2 |
If a call return type is i1, insert a truncate from X86::AL to i1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25415 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 1d71891..6a65614 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -531,6 +531,8 @@ X86TargetLowering::LowerCCCCallTo(SDOperand Chain, const Type *RetTy, case MVT::i8: RetVal = DAG.getCopyFromReg(Chain, X86::AL, MVT::i8, InFlag); Chain = RetVal.getValue(1); + if (RetTyVT == MVT::i1) + RetVal = DAG.getNode(ISD::TRUNCATE, MVT::i1, RetVal); break; case MVT::i16: RetVal = DAG.getCopyFromReg(Chain, X86::AX, MVT::i16, InFlag); @@ -1057,6 +1059,8 @@ X86TargetLowering::LowerFastCCCallTo(SDOperand Chain, const Type *RetTy, case MVT::i8: RetVal = DAG.getCopyFromReg(Chain, X86::AL, MVT::i8, InFlag); Chain = RetVal.getValue(1); + if (RetTyVT == MVT::i1) + RetVal = DAG.getNode(ISD::TRUNCATE, MVT::i1, RetVal); break; case MVT::i16: RetVal = DAG.getCopyFromReg(Chain, X86::AX, MVT::i16, InFlag); |