llvm / llvm/llvm-project

[IR Verifier] Add check to IR Verifier that calling convention isn't allowed on most intrinsics

Open
#197,608 0 comments 0 reactions 1 assignee Claimed by @wenju-he View on GitHub
new issue
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

The issue is exposed in #197151 : IR Verifier isn't reporting error on wrong calling convention used in `tail call fastcc float @llvm.fabs.f32(` on amdgpu target.

Most intrinsics should use C calling convention:
- backend can lower intrinsic to standard library calls, e.g. memcpy in libc. Other calling conventions can break ABI.
- Custom calling convention may break instruction selection of intrinsics in codegen.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.