llvm-project/llvm/test/Assembler/implicit-intrinsic-declaration-invalid3.ll
Nikita Popov 89f8ba2855
[AsmParser] Support calling intrinsics without mangling suffix (#89172)
This adds proper support for calling intrinsics without mangling suffix
when parsing textual IR. This already worked (mostly by accident) when
only a single mangling suffix was in use.

This patch extends support to the case where the intrinsic is used with
multiple signatures, and as such multiple different intrinsic
declarations have to be inserted. The final IR will have intrinsics with
mangling suffix as usual.

Motivated by the discussion at:
https://discourse.llvm.org/t/recent-improvements-to-the-ir-parser/77366
2024-04-19 09:04:02 +09:00

10 lines
238 B
LLVM

; RUN: not llvm-as < %s 2>&1 | FileCheck %s
; Use of unknown intrinsic without declaration should be rejected.
; CHECK: error: use of undefined value '@llvm.foobar'
define void @test() {
call i8 @llvm.foobar(i8 0, i16 1)
ret void
}