[llvm] r249786 - [SEH] Fix llvm.eh.exceptioncode fast register allocation assertion
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 8 17:15:13 PDT 2015
Author: rnk
Date: Thu Oct 8 19:15:13 2015
New Revision: 249786
URL: http://llvm.org/viewvc/llvm-project?rev=249786&view=rev
Log:
[SEH] Fix llvm.eh.exceptioncode fast register allocation assertion
I called the wrong MachineBasicBlock::addLiveIn() overload.
Modified:
llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/trunk/test/CodeGen/X86/seh-exception-code.ll
Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=249786&r1=249785&r2=249786&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Thu Oct 8 19:15:13 2015
@@ -264,7 +264,6 @@ private:
/// personality specific tasks. Returns true if the block should be
/// instruction selected, false if no code should be emitted for it.
bool PrepareEHLandingPad();
- bool PrepareEHPad();
/// \brief Perform instruction selection on all basic blocks in the function.
void SelectAllBasicBlocks(const Function &Fn);
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=249786&r1=249785&r2=249786&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu Oct 8 19:15:13 2015
@@ -950,7 +950,7 @@ bool SelectionDAGISel::PrepareEHLandingP
// the live in physreg and copy into the vreg.
MCPhysReg EHPhysReg = TLI->getExceptionPointerRegister();
assert(EHPhysReg && "target lacks exception pointer register");
- FuncInfo->ExceptionPointerVirtReg = MBB->addLiveIn(EHPhysReg, PtrRC);
+ MBB->addLiveIn(EHPhysReg);
unsigned VReg = FuncInfo->getCatchPadExceptionPointerVReg(CPI, PtrRC);
BuildMI(*MBB, FuncInfo->InsertPt, SDB->getCurDebugLoc(),
TII->get(TargetOpcode::COPY), VReg)
Modified: llvm/trunk/test/CodeGen/X86/seh-exception-code.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/seh-exception-code.ll?rev=249786&r1=249785&r2=249786&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/seh-exception-code.ll (original)
+++ llvm/trunk/test/CodeGen/X86/seh-exception-code.ll Thu Oct 8 19:15:13 2015
@@ -1,4 +1,5 @@
; RUN: llc < %s | FileCheck %s
+; RUN: llc -O0 < %s | FileCheck %s
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-windows-msvc"
@@ -34,8 +35,7 @@ catchendblock:
; CHECK-LABEL: ehcode:
; CHECK: xorl %ecx, %ecx
; CHECK: callq f
-; CHECK: retq
; CHECK: # %__except
-; CHECK-NEXT: movl %eax, %ecx
+; CHECK: movl %eax, %ecx
; CHECK-NEXT: callq f
More information about the llvm-commits
mailing list