http://llvm.org/bugs/show_bug.cgi?id=8317

           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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to