-
Notifications
You must be signed in to change notification settings - Fork 63
Fix assertion in FunctionComparator::cmpInlineAsm #111
Conversation
I'd prefer the commit message (and possibly even a comment in the code) to mention the LLVM bug and that this is a temporary workaround until there is an upstream fix. It's possible that upstream will do the same thing, but if not, we should backport the upstream patch eventually. |
The LLVM bug is mentioned in the commit message. |
Oh, sorry for the noise. |
@eddyb told me to bug you, so here I am @alexcrichton. |
Thanks! We tend to not accept patches though that aren't in upstream LLVM, so can this be submitted upstream first? |
It's effectively our policy at this point that changes like this aren't accepted unless they're in upstream LLVM first, so unless there's extenuating circumstances this should be reviewed by LLVM authors first. |
I've submitted this change and a test based on @rkruppe's reduced IR for review upstream at https://reviews.llvm.org/D46495. |
@alexcrichton It seems to me that @nikic's patch was accepted upstream, can we backport it here now?
|
Yes once there's an LLVM commit in the git mirror to cherry-pick then it should be cherry-picked. |
Change has landed upstream via llvm-mirror/llvm@0ccb7f4, so can be cherry-picked now :) |
Fixes bug https://bugs.llvm.org/show_bug.cgi?id=37339. InlineAsm is only uniqued if the FunctionTypes are exactly the same, while cmpTypes() for example considers all pointer types in the default address space to be the same. For this reason the end of cmpInlineAsm() can be reached. This patch replaces the unreachable assertion with a check that the function types are not identical. Differential Revision: https://reviews.llvm.org/D46495 Reviewers: jfb git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331990 91177308-0d34-0410-b5e6-96231b3b80d8
I cherry-picked it in this very PR. LGTM? |
https://bugs.llvm.org/show_bug.cgi?id=37339