[llvm-commits] [llvm] r131597 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp
Eli Friedman
eli.friedman at gmail.com
Wed May 18 16:13:10 PDT 2011
Author: efriedma
Date: Wed May 18 18:13:10 2011
New Revision: 131597
URL: http://llvm.org/viewvc/llvm-project?rev=131597&view=rev
Log:
Revert unintentional commit.
Modified:
llvm/trunk/lib/Target/X86/X86FastISel.cpp
Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=131597&r1=131596&r2=131597&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Wed May 18 18:13:10 2011
@@ -722,39 +722,18 @@
// Only handle register returns for now.
if (!VA.isRegLoc())
return false;
+ // TODO: For now, don't try to handle cases where getLocInfo()
+ // says Full but the types don't match.
+ if (TLI.getValueType(RV->getType()) != VA.getValVT())
+ return false;
// The calling-convention tables for x87 returns don't tell
// the whole story.
if (VA.getLocReg() == X86::ST0 || VA.getLocReg() == X86::ST1)
return false;
- unsigned SrcReg = Reg + VA.getValNo();
- EVT SrcVT = TLI.getValueType(RV->getType());
- EVT DstVT = VA.getValVT();
- // Special handling for extended integers.
- if (SrcVT != DstVT) {
- return false;
- if (SrcVT != MVT::i1 && SrcVT != MVT::i8 && SrcVT != MVT::i16)
- return false;
-
- if (!Outs[0].Flags.isZExt() && !Outs[0].Flags.isSExt())
- return false;
-
- assert(DstVT == MVT::i32 && "X86 should always ext to i32");
-
- if (SrcVT == MVT::i1) {
- if (Outs[0].Flags.isSExt())
- return false;
- SrcReg = FastEmitZExtFromI1(MVT::i8, SrcReg, /*TODO: Kill=*/false);
- SrcVT = MVT::i8;
- }
- unsigned Op = Outs[0].Flags.isZExt() ? ISD::ZERO_EXTEND :
- ISD::SIGN_EXTEND;
- SrcReg = FastEmit_r(SrcVT.getSimpleVT(), DstVT.getSimpleVT(), Op,
- SrcReg, /*TODO: Kill=*/false);
- }
-
// Make the copy.
+ unsigned SrcReg = Reg + VA.getValNo();
unsigned DstReg = VA.getLocReg();
const TargetRegisterClass* SrcRC = MRI.getRegClass(SrcReg);
// Avoid a cross-class copy. This is very unlikely.
More information about the llvm-commits
mailing list