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

            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: unassignedb...@nondot.org
          Reporter: an...@samba.org
                CC: llvm-bugs@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
...
zot:                                    
        li 3, -32768
        blr


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

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to