Skip to content

X86 can generate movb al, eax ? #1443

@llvmbot

Description

@llvmbot
Bugzilla Link 1071
Resolution INVALID
Resolved on Feb 22, 2010 12:52
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:X86bugzillaIssues migrated from bugzillacompile-failUse [accepts-invalid] and [rejects-valid] insteadinvalidResolved as invalid, i.e. not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions