1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

Fix an obvious omission in the SelectionDAGBuilder where we were

dropping weights on the floor for invokes. This was impeding my writing
further test cases for invoke when interacting with probabilities and
block placement.

No test case as there doesn't appear to be a way to test this stuff. =/
Suggestions for a test case of course welcome. I hope to be able to add
test cases that indirectly cover this eventually by adding probabilities
to the exceptional edge and reordering blocks as a result.

llvm-svn: 145060
This commit is contained in:
Chandler Carruth 2011-11-22 11:37:46 +00:00
parent de9c504d6b
commit 63f2a37e6e

View File

@ -1810,8 +1810,8 @@ void SelectionDAGBuilder::visitInvoke(const InvokeInst &I) {
CopyToExportRegsIfNeeded(&I);
// Update successor info
InvokeMBB->addSuccessor(Return);
InvokeMBB->addSuccessor(LandingPad);
addSuccessorWithWeight(InvokeMBB, Return);
addSuccessorWithWeight(InvokeMBB, LandingPad);
// Drop into normal successor.
DAG.setRoot(DAG.getNode(ISD::BR, getCurDebugLoc(),