From 00810c39daf1dd00ac965d8163ea331adfe7c974 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 11 Mar 2010 19:50:31 +0000 Subject: [PATCH] revert r98270. llvm-svn: 98281 --- llvm/lib/Target/X86/X86ISelLowering.cpp | 4 ++-- llvm/test/CodeGen/X86/tailcallfp2.ll | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 88e2fa15ee74..9b7f6fc6aeee 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -2091,7 +2091,7 @@ X86TargetLowering::LowerCall(SDValue Chain, SDValue Callee, // tailcall must happen after callee-saved registers are poped. // FIXME: Give it a special register class that contains caller-saved // register instead? - unsigned TCReg = Is64Bit ? X86::R11 : X86::ECX; + unsigned TCReg = Is64Bit ? X86::R11 : X86::EAX; Chain = DAG.getCopyToReg(Chain, dl, DAG.getRegister(TCReg, getPointerTy()), Callee,InFlag); @@ -2145,7 +2145,7 @@ X86TargetLowering::LowerCall(SDValue Chain, SDValue Callee, } assert(((Callee.getOpcode() == ISD::Register && - (cast(Callee)->getReg() == X86::ECX || + (cast(Callee)->getReg() == X86::EAX || cast(Callee)->getReg() == X86::R11)) || Callee.getOpcode() == ISD::TargetExternalSymbol || Callee.getOpcode() == ISD::TargetGlobalAddress) && diff --git a/llvm/test/CodeGen/X86/tailcallfp2.ll b/llvm/test/CodeGen/X86/tailcallfp2.ll index 8bfae1bb8de5..3841f518976b 100644 --- a/llvm/test/CodeGen/X86/tailcallfp2.ll +++ b/llvm/test/CodeGen/X86/tailcallfp2.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 -tailcallopt | grep {jmp} | grep {\\*%ecx} +; RUN: llc < %s -march=x86 -tailcallopt | grep {jmp} | grep {\\*%eax} declare i32 @putchar(i32)