[PATCH] Catch malformed inline assembly clobber constraints

Eric Christopher echristo at gmail.com
Wed Sep 3 18:49:42 PDT 2014


On Wed, Sep 3, 2014 at 6:06 PM, Akira Hatanaka <ahatanak at gmail.com> wrote:

> On Wed, Sep 3, 2014 at 5:32 PM, Eric Christopher <echristo at gmail.com>
> wrote:
>
>> The testcase doesn't need either the triple or the data layout for an
>> llvm-as test.
>>
>>
> OK, I'll remove the triples and data layout.
>
>
>> Also, I tried it, which llvm_unreachable? (I mean, it's obviously doing
>> something wonky so it's not necessarily a bad patch, but I can't duplicate
>> whatever problem you're seeing).
>>
>>
> Sorry, my comment was misleading. If you compile the test case with "llc
> -march=aarch64", llc terminates at MachineValueType.h:386.
>
>
I see it now, thanks. I'd tried an older version of llc and it didn't fail
oddly enough.

I'm not sure this is the right place for the check, could probably do the
clobber error checking up above where it's set? Any reason to put it down
here?

Thanks!

-eric



>
>
>> -eric
>>
>>
>>
>>
>> On Wed, Sep 3, 2014 at 1:45 PM, Akira Hatanaka <ahatanak at gmail.com>
>> wrote:
>>
>>> The attached patch adds a check to InlineAsm::ConstraintInfo::Parse
>>> which checks that '{' immediately follows '~' in the inline assembly
>>> clobber constraint. This enables catching the error in the test case
>>> earlier by LLParser and printing a more helpful diagnostic, rather than
>>> terminating when an llvm_unreachable is triggered.
>>>
>>> This patch fixes rdar://problem/14206559.
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140903/5049ea30/attachment.html>


More information about the llvm-commits mailing list