Open Quuxplusone opened 12 years ago
Attached bad.ll
(779 bytes, application/octet-stream): testcase
I hit this issue when debugging a code generator problem. When bugpoint splits
the module in two halves, the safe module contains the global initializers but
not the functions bodies. If a global initializer contains a blockaddress, the
module is invalid.
To reproduce with r149717 (the -output flag is needed to force bugpoint down
the debugCodeGenerator path):
$ lli bad.ll
the answer is 3.
$ echo "some random string" > out
$ bugpoint bad.ll -run-llc -safe-run-llc -output=out
Read input file : 'bad.ll'
*** All input ok
Initializing execution environment: Found gcc: /usr/bin/gcc
Running the code generator to test for a crash: <llc>
*** Checking the code generator...
<llc><gcc><program>
*** Input program does not match reference diff!
Debugging code generator problem!
Checking to see if the program is misoptimized when these functions are run
through the passes: foo main
<llc> (<--- hangs)
Expected output: bugpoint executes the new module and compares its output with
the reference output.
bad.ll
(779 bytes, application/octet-stream)