This is an archive of the discontinued LLVM Phabricator instance.

Fix for PR 19261: generate unconditional branches with "-O0 -fast-isel=false"
ClosedPublic

Authored by dfukalov on Mar 27 2014, 8:58 AM.

Details

Summary

Fix for PR 19261:

llc doesn't generate nodes for unconditional fall-through branches for targets without FastISel implementation (X86 has it, but can be disabled by "-fast-isel=false") in SelectionDAGBuilder::visitBr(). So for line 4 in the following testcase

1: void foo(int i){
2: switch(i){
3: default:
4: break;
5: }
6: return;
7: }

there is no corresponding line in .debug_line section, and a debugger cannot set a breakpoint at line 4.

Diff Detail

Event Timeline

timurrrr resigned from this revision.Mar 27 2014, 9:21 AM
timurrrr added reviewers: dblaikie, echristo.

Unfortunately, I'm not familiar with this code.

rnk accepted this revision.Apr 2 2014, 2:25 PM

lgtm2

echristo accepted this revision.Apr 2 2014, 2:29 PM

Sorry, lost it in my review queue.

LGTM. Please commit.

I have no commit access... Reid would you please commit it? Thanks in advance.

I've gone ahead and committed it as:

A test/DebugInfo/unconditional-branch.ll
M lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
r205529

I changed the name of the test file and removed the X86 specific bits.
It still passes on my machines, but I'll watch the bots and make sure.

Thanks!

-eric

dfukalov closed this revision.Feb 16 2016, 9:22 AM

committed in r205529