X86 can generate movb al, eax ? #1443
Labels
backend:X86
bugzilla
Issues migrated from bugzilla
compile-fail
Use [accepts-invalid] and [rejects-valid] instead
invalid
Resolved as invalid, i.e. not a bug
Extended Description
While testing this function:
define bool i32() { ret bool true; }
I noticed that it is possible for the X86 backend to generate:
movb al, eax
which doesn't assemble.
To make this happen, go to CodeGen/SelectionISel.cpp in the visitRetInst
function and make it not do an extend (of any kind) for boolean. This will
cause the Legalizer to apply an ANY_EXTEND which, presumably, means that not
doing an extend is okay. While that change is not correct, the X86 backend
shouldn't generate incorrect instructions either.
The text was updated successfully, but these errors were encountered: