[LLVMbugs] [Bug 1261] instcombine miscompilation

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Apr 7 14:06:35 PDT 2007


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

rspencer at x10sys.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|1205                        |
             Status|RESOLVED                    |REOPENED
         Resolution|DUPLICATE                   |



------- Additional Comments From rspencer at x10sys.com  2007-04-07 16:06 -------
It seems this is a bug after all. After bug 1205 was closed (Instcombine changes
to support APInt), I reran the test case. It produced:

define i16 @test(i31 %zzz) {
entry:
        %A1 = zext i31 %zzz to i32              ; <i32> [#uses=1]
        %B = add i32 %A1, 16384         ; <i32> [#uses=1]
        %C = lshr i32 %B, 15            ; <i32> [#uses=1]
        %D = trunc i32 %C to i16                ; <i16> [#uses=1]
        ret i16 %D
}

i.e. the "sext" changed to zext without any other compensating changes.

This needs to be investigated freshly to determine if the zext is okay or if
this is truly a bug.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list