Closed nickdesaulniers closed 2 years ago
mentioned in issue llvm/llvm-project#9667
mentioned in issue llvm/llvm-bugzilla-archive#42147
And that was merged to release_90 in r371490.
Eli has a patch: https://reviews.llvm.org/D67306 I tested it and it solves the issue.
I've found the problem; I'll post a patch soon. Apparently, analyzeBranch on an INLINEASM_BR produces weird results, at least on some targets: it returns true to indicate failure, but TBB is non-null. This confuses IfConversion. Not sure if any other passes get confused by this.
Looks like ifconversion is misbehaving, again... looking.
Creduce'd example: https://gist.github.com/nickdesaulniers/15b47087aa7bfca9d8df6208f4733231
Seems to be related to -fsanitize-coverage=trace-pc
as well.
Something strange is going on. I just tried to compile bttv-cards.o twice. The first crashed clang:
CC drivers/media/pci/bt8xx/bttv-cards.o fatal error: error in backend: Branch Fix Up pass failed to converge! clang-9: error: clang frontend command failed with exit code 70 (use -v to see invocation)
the second compiled. Nondeterminism?
Here's the test case (still trying to reduce it further): https://gist.github.com/nickdesaulniers/75346bd618121a3e98be648fb14ba03e (too big to be attached here). Running creduce now.
If the issue here isn't represented by the testcase in D62555, what is the issue, exactly? Can you put some sort of testcase here?
Reopening; r371111 may have fixed the IR from D62555, but the larger issue is still a problem. I spoke too soon: https://github.com/ClangBuiltLinux/linux/issues/494#issuecomment-528952495
confirming this is fixed in r371111, thanks again Eli!
r371111. (I haven't verified the C testcase, but the IR from D62555 is fixed.)
assigned to @nickdesaulniers
Extended Description
forked from https://github.com/ClangBuiltLinux/linux/issues/494
See attached test case. We saw a few of these w/ x86_64. There's typically a pass that's removing a label that it should not be. I'll continue to dig, and report more info there.