Skip to content

[Issue]: failure of AMDGPU DAG->DAG Pattern Instruction Selection due to llvm.llrint.i64.f32 #90

@ravil-mobile

Description

@ravil-mobile

Problem Description

The compiler from [email protected] suite fails to generate the code for llvm.llrint.i64.f32.

Operating System

Ubuntu 20.04.1 LTS

CPU

Intel(R) Xeon(R) Gold 6132 CPU

GPU

AMD Instinct MI100

ROCm Version

ROCm 6.0.0

ROCm Component

llvm-project

Steps to Reproduce

Here is a small reproducible example (func.ll)

declare i64 @llvm.llrint.i64.f32(float)

define i64 @convert(float %arg) {
entry:
  %0 = tail call i64 @llvm.llrint.i64.f32(float %arg)
  ret i64 %0
}

Here is the corresponding Makefile

CC=/opt/rocm/llvm/bin/llc

x86: func.ll
        $(CC) $< -mtriple="x86_64-linux-gnu" -o x86.o

amdgcn: func.ll
        $(CC) $< -mtriple="amdgcn-amd-amdhsa" -o amdgcn.o

clean:
        rm -f x86.o amdgcn.o

Execute the following to reproduce the bug

make amdgcn

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

This bug was discovered during code generation of a Triton kernel. The original source of the issue is here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions