[LLVMbugs] [Bug 2004] New: missed instcombine with trunc+sext

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Feb 9 17:11:32 PST 2008


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

           Summary: missed instcombine with trunc+sext
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: llvmbugs at cs.uiuc.edu


define i32 @a(i32 %x) {
entry:
        %tmp14 = shl i32 %x, 27
        %tmp15 = ashr i32 %tmp14, 27
        %tmp1516 = trunc i32 %tmp15 to i8
        %tmp151617 = sext i8 %tmp1516 to i32
        ret i32 %tmp151617
}

run with "opt -std-compile-opts" is left unchanged; the trunc+sext should be
eliminated.  (Note that CodeGen is actually smart enough to do this, but it
would be nice if it worked on the IR level as well.)


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