mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
2bbc0bd7c0
Intrinsics can only be called directly, taking their address is not legal. This is currently only enforced for intrinsics that have an ID, rather than all intrinsics. Adjust the check to cover all intrinsics. This came up in D106013. Differential Revision: https://reviews.llvm.org/D106095
10 lines
308 B
LLVM
10 lines
308 B
LLVM
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
|
|
|
|
declare i32 @llvm.umax.i32(i32, i32)
|
|
declare i32 @llvm.my.custom.intrinsic()
|
|
|
|
; CHECK: Invalid user of intrinsic instruction!
|
|
@g1 = global i32(i32, i32)* @llvm.umax.i32
|
|
; CHECK: Invalid user of intrinsic instruction!
|
|
@g2 = global i32()* @llvm.my.custom.intrinsic
|