[llvm-commits] [llvm] r104691 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Wed May 26 01:10:02 PDT 2010
Author: zhongxingxu
Date: Wed May 26 03:10:02 2010
New Revision: 104691
URL: http://llvm.org/viewvc/llvm-project?rev=104691&view=rev
Log:
SRetReturnReg was set in LowerFormalArguments(). So only assert it here.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=104691&r1=104690&r2=104691&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed May 26 03:10:02 2010
@@ -1259,10 +1259,8 @@
MachineFunction &MF = DAG.getMachineFunction();
X86MachineFunctionInfo *FuncInfo = MF.getInfo<X86MachineFunctionInfo>();
unsigned Reg = FuncInfo->getSRetReturnReg();
- if (!Reg) {
- Reg = MRI.createVirtualRegister(getRegClassFor(MVT::i64));
- FuncInfo->setSRetReturnReg(Reg);
- }
+ assert(Reg &&
+ "SRetReturnReg should have been set in LowerFormalArguments().");
SDValue Val = DAG.getCopyFromReg(Chain, dl, Reg, getPointerTy());
Chain = DAG.getCopyToReg(Chain, dl, X86::RAX, Val, Flag);
More information about the llvm-commits
mailing list