First Last Prev Next    No search results available
Details
: [adce] ADCE considers blocks without postdominators to be...
Bug#: 116
: libraries
: Scalar Optimizations
Status: RESOLVED
Resolution: FIXED
: All
: All
: 1.0
: P2
: normal
: 1.1

:
: miscompilation
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Brian R. Gaeke <gaeke+bugs@uiuc.edu>
Assigned To: Chris Lattner <sabre@nondot.org>

Attachments
test case (6.54 KB, text/plain)
2003-11-16 00:38, Brian R. Gaeke
Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2003-11-16 00:37
I reduced ed, which has not worked for the longest time, into a test case.
It turned out to be kind of interesting: ed's main() has a loop involving a goto
and a sigsetjmp. Unfortunately, I am now pretty tired, so I'm going to make this
brief: the LLVM program which I am going to attach to this bug is supposed to
print "ok\n", and it loops infinitely instead if you apply opt -adce.
------- Comment #1 From Brian R. Gaeke 2003-11-16 00:38:23 -------
Created an attachment (id=23) [details]
test case

This is the test case, reduced beyond recognition from ed-0.2/main.c
------- Comment #2 From Chris Lattner 2003-11-16 15:35:35 -------
This bug is caused by the code doing basically this:

...
  while (1) exit(0);
...

No post-dominance information exists for this loop because it cannot reach the
exit node of the CFG (a return or unwind instruction).  ADCE should obviously
not delete these blocks though.  I'm preparing a patch.

-Chris
------- Comment #3 From Chris Lattner 2003-11-16 15:41:04 -------
Fixed like this (comments in the patch):
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20031110/009564.html

Thanks for taking the time to reduce this testcase.  This is a _bad_
miscompilation.  :(

-Chris
------- Comment #4 From Chris Lattner 2003-11-16 15:47:31 -------
Oh yeah, the testcase is here:
llvm/test/Regression/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll

First Last Prev Next    No search results available