[PATCH] D114895: [SelectionDagBuilder] improve CallBrInst BlockAddress constraint handling
Bill Wendling via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 7 16:34:39 PST 2021
void added a comment.
In D114895#3178108 <https://reviews.llvm.org/D114895#3178108>, @nickdesaulniers wrote:
> In D114895#3177794 <https://reviews.llvm.org/D114895#3177794>, @efriedma wrote:
>
>> In D114895#3170282 <https://reviews.llvm.org/D114895#3170282>, @nickdesaulniers wrote:
>>
>>> Unless you can tie a block address. Hopefully `"+r"(&&goto_label)` isn't a valid output constraint...
>>>
>>> void x(void) {
>>> asm goto ("":"+r"(&&foo):::foo);
>>> // ^ error: lvalue required in 'asm' statement
>>> foo:;
>>> }
>>
>> I think you meant to write something like this:
>>
>> void *x(void) {
>> void *p = &&foo;
>> asm goto ("":"+r"(p):::foo);
>> foo:;
>> return p;
>> }
>
> Damn! Then yeah, this approach (Diff 392533) is still broken.
I must be missing something. Isn't that just simply reassigning the variable `p` and not using the label `foo` for output?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114895/new/
https://reviews.llvm.org/D114895
More information about the llvm-commits
mailing list