[llvm-bugs] [Bug 26381] New: PowerPC64: fast isel doesn't sign extend 32bit signed constant

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jan 29 14:33:56 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26381

            Bug ID: 26381
           Summary: PowerPC64: fast isel doesn't sign extend 32bit signed
                    constant
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: PowerPC
          Assignee: unassignedbugs at nondot.org
          Reporter: anton at samba.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Using the following testcase:


target datalayout = "e-m:e-i64:64-n32:64"
target triple = "powerpc64le-unknown-linux-gnu"

define internal signext i32 @foo() #0 {
  ret i32 -125452974
}


-O1 sign extends the constant:


# llc -O1 test.ll
...
foo:                                    
        lis 3, -1915
        ori 3, 3, 48466
        blr


-O1 -fast-isel zero extends the constant:


# llc -O1 -fast-isel test.ll
...
foo:                                    
        lis 3, 31810
        ori 3, 3, 57001
        sldi 3, 3, 1
        blr

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160129/5efa83c4/attachment-0001.html>


More information about the llvm-bugs mailing list