[LLVMbugs] [Bug 8317] New: X86InstrInfo::convertToThreeAddress violates register class constraints

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 6 15:00:25 PDT 2010


           Summary: X86InstrInfo::convertToThreeAddress violates register
                    class constraints
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: stoklund at 2pi.dk
                CC: llvmbugs at cs.uiuc.edu

X86InstrInfo::convertToThreeAddress can change an SHL instruction into an LEA.
This can break register class constraints because LEA cannot take ESP as an
offset while SHL can.

LEA requires a GR32_NOSP register while SHL only requires a GR32.

This is an academic exercise since ESP is always reserved anyway, so it doesn't
cause any invalid code to be generated.

It does break the machine code verifier, though.

X86InstrInfo::convertToThreeAddress should switch the regclass of SrcReg from
GR32 to GR32_NOSP, and we may want to use GR32_NOSP as the default class for
i32 values.

The same applies to GR64_NOSP.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list