[llvm] r240394 - Revert r240302 ("Bring r240130 back.").
Duncan P. N. Exon Smith
dexonsmith at apple.com
Tue Jun 23 19:18:10 PDT 2015
> On 2015 Jun 23, at 18:52, Rafael EspĂndola <rafael.espindola at gmail.com> wrote:
>
> On 23 June 2015 at 16:49, Rafael EspĂndola <rafael.espindola at gmail.com> wrote:
>> Thanks!
>>
>> With asserts this reduces to
>>
>> define void @fj() {
>> call void asm "bsr $0,%eax", "o"(i32 1)
>> ret void
>> }
>>
>> crashing llc.
>
> Gosh, that is horrible.
>
> The way inline asm is implemented is
>
> * We kept most of the old (pre-MC) assembly printer around.
> * We use it to print/expand inline asm to a string.
> * We parse that string.
>
> So anything that can show up in inline asm needs a name by which we
> can find it again.
>
> I think the way to fix this is to directly transition from the inline
> asm pattern "bsr $0,%eax" to a MCInst with an operand pointing to
> whatever we created for $0. That will let us nuke the old printer and
> save memory by not creating names just in case they are used in inline
> asm.
>
> That, unfortunately, is quite a bit more work than I can do at the moment.
That really is horrible. Your suggested direction SGTM; I filed PR23933.
More information about the llvm-commits
mailing list