Skip to content

[amdgpu] Using fp128 fails with unsupported libcalls #121122

Open
@Flakebi

Description

@Flakebi

fp128 seems to work fine in arguments and return values, but trying to do computations like fmul or fdiv fails:

target triple = "amdgcn-amd-amdhsa"

define fp128 @fp128(fp128 %a, fp128 %b) {
  %res = fmul fp128 %a, %b
  ret fp128 %res
}

results in

LLVM ERROR: unsupported libcall legalization
Stack dump:
…
#10 llvm::SITargetLowering::LowerCall(llvm::TargetLowering::CallLoweringInfo&, llvm::SmallVectorImpl<llvm::SDValue>&) const llvm-project/llvm/lib/Target/AMDGPU/SIISelLowering.cpp:3877:34

I assume this is expected.
I encountered this while trying to compile Rust code, see also rust-lang/compiler-builtins#737.

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