[llvm-bugs] [Bug 43981] New: arm64 global isel: LLVM ERROR: unable to legalize instruction: %2:_(s16), %3:_(s1) = G_UADDO %1:_, %4:_ (in function: slice)

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Nov 12 08:40:38 PST 2019


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

            Bug ID: 43981
           Summary: arm64 global isel: LLVM ERROR: unable to legalize
                    instruction: %2:_(s16), %3:_(s1) = G_UADDO %1:_, %4:_
                    (in function: slice)
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: regehr at cs.utah.edu
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    nunoplopes at sapo.pt

I'm seeing some crashes when trying to compile small functions to arm64 using
global isel. This is on Ubuntu 18.04 and the LLVM is from Nov 11. 

If these bugs aren't interesting please let me know.



$ cat w16r1_1376-stripped.ll 
; ModuleID = '<stdin>'
source_filename = "w16r1_1376.ll"

define i64 @slice(i64) {
  %2 = trunc i64 %0 to i16
  %3 = add nsw i16 %2, 2
  %4 = icmp ult i16 %3, %2
  %5 = zext i1 %4 to i64
  ret i64 %5
}

$ llc -march=arm64 -global-isel w16r1_1376-stripped.ll 
LLVM ERROR: unable to legalize instruction: %2:_(s16), %3:_(s1) = G_UADDO %1:_,
%4:_ (in function: slice)

$ llc --version
LLVM (http://llvm.org/):
  LLVM version 10.0.0git
  Optimized build.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: broadwell

  Registered Targets:
    aarch64    - AArch64 (little endian)
    aarch64_32 - AArch64 (little endian ILP32)
    aarch64_be - AArch64 (big endian)
    amdgcn     - AMD GCN GPUs
    arm        - ARM
    arm64      - ARM64 (little endian)
    arm64_32   - ARM64 (little endian ILP32)
    armeb      - ARM (big endian)
    bpf        - BPF (host endian)
    bpfeb      - BPF (big endian)
    bpfel      - BPF (little endian)
    hexagon    - Hexagon
    lanai      - Lanai
    mips       - MIPS (32-bit big endian)
    mips64     - MIPS (64-bit big endian)
    mips64el   - MIPS (64-bit little endian)
    mipsel     - MIPS (32-bit little endian)
    msp430     - MSP430 [experimental]
    nvptx      - NVIDIA PTX 32-bit
    nvptx64    - NVIDIA PTX 64-bit
    ppc32      - PowerPC 32
    ppc64      - PowerPC 64
    ppc64le    - PowerPC 64 LE
    r600       - AMD GPUs HD2XXX-HD6XXX
    riscv32    - 32-bit RISC-V
    riscv64    - 64-bit RISC-V
    sparc      - Sparc
    sparcel    - Sparc LE
    sparcv9    - Sparc V9
    systemz    - SystemZ
    thumb      - Thumb
    thumbeb    - Thumb (big endian)
    wasm32     - WebAssembly 32-bit
    wasm64     - WebAssembly 64-bit
    x86        - 32-bit X86: Pentium-Pro and above
    x86-64     - 64-bit X86: EM64T and AMD64
    xcore      - XCore
$

-- 
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/20191112/f2ac6f64/attachment.html>


More information about the llvm-bugs mailing list