[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp
Evan Cheng
evan.cheng at apple.com
Wed Jan 18 00:08:50 PST 2006
Changes in directory llvm/lib/Target/X86:
X86ISelLowering.cpp updated: 1.47 -> 1.48
---
Log message:
If a call return type is i1, insert a truncate from X86::AL to i1.
---
Diffs of the changes: (+4 -0)
X86ISelLowering.cpp | 4 ++++
1 files changed, 4 insertions(+)
Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.47 llvm/lib/Target/X86/X86ISelLowering.cpp:1.48
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.47 Tue Jan 17 15:58:21 2006
+++ llvm/lib/Target/X86/X86ISelLowering.cpp Wed Jan 18 02:08:38 2006
@@ -531,6 +531,8 @@
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 @@
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);
More information about the llvm-commits
mailing list