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

             Bug #: 12113
           Summary: Dead store when handling larger-than-register shfits
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


Consider:

unsigned int f(unsigned int x)
{
        return 1ULL << ((x % 32));
}

When compiling with -m32, this turns into

f:
    movl    4(%esp), %ecx
    movl    $1, %edx
    shll    %cl, %edx
    xorb    %al, %al
    testb    %al, %al
    movl    $0, %eax
    cmovel    %edx, %eax
    ret

The xorb / testb / cmovel sequence is invariant wrt to the input.

-- 
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