[LLVMbugs] [Bug 3449] New: miscompilation of i512

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Jan 30 22:38:54 PST 2009


           Summary: miscompilation of i512
           Product: libraries
           Version: 1.0
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: clattner at apple.com
                CC: gohman at apple.com, baldrick at free.fr, llvmbugs at cs.uiuc.edu

sumarrray-dbl now fails because SROA is promoting a struct to an i512 and
codegen is shifting by the wrong amount.  Here's a testcase:

define void @test(<8 x double> *%P, i64* %Q) nounwind {
        %A = load <8 x double>* %P
        %B = bitcast <8 x double> %A to i512            ; <i512> [#uses=2]
        %C = lshr i512 %B, 448          ; <i512> [#uses=1]
        %D = trunc i512 %C to i64               ; <i64> [#uses=1]
        volatile store i64 %D, i64* %Q
        ret void

I get:
$ llvm-as < ~/t.ll | llc -march=x86-64

        movq    24(%rdi), %rax
        movq    %rax, (%rsi)

bit 448 = byte 56 not byte 24.  It looks like it is off by 32 or maybe
modulusing by 32 or something weird like that?

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