[llvm-bugs] [Bug 26356] New: PowerPC64: fast isel creates bad constant

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 28 08:13:43 PST 2016


            Bug ID: 26356
           Summary: PowerPC64: fast isel creates bad 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

The following testcase:

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

; Function Attrs: nounwind
define internal zeroext i16 @zot() #0 {
        ret i16 32768

Creates an incorrect negative constant when built with -fast-isel:

# llc -O1 -fast-isel x.ll
        li 3, -32768

Without -fast-isel, we get the correct unsigned constant:

# llc -O1 x.ll
        li 3, 0
        ori 3, 3, 32768

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/20160128/a0e8ffa4/attachment.html>

More information about the llvm-bugs mailing list