1 ; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s
5 define void @test_ptrauth_bundle(i64 %arg0, i32 %arg1, ptr %arg2) {
7 ; CHECK: Multiple ptrauth operand bundles
8 ; CHECK-NEXT: call void %arg2() [ "ptrauth"(i32 42, i64 100), "ptrauth"(i32 42, i64 %arg0) ]
9 call void %arg2() [ "ptrauth"(i32 42, i64 100), "ptrauth"(i32 42, i64 %arg0) ]
11 ; CHECK: Ptrauth bundle key operand must be an i32 constant
12 ; CHECK-NEXT: call void %arg2() [ "ptrauth"(i32 %arg1, i64 120) ]
13 call void %arg2() [ "ptrauth"(i32 %arg1, i64 120) ]
15 ; CHECK: Ptrauth bundle key operand must be an i32 constant
16 ; CHECK-NEXT: call void %arg2() [ "ptrauth"(i64 42, i64 120) ]
17 call void %arg2() [ "ptrauth"(i64 42, i64 120) ]
19 ; CHECK: Ptrauth bundle discriminator operand must be an i64
20 ; CHECK-NEXT: call void %arg2() [ "ptrauth"(i32 42, i32 120) ]
21 call void %arg2() [ "ptrauth"(i32 42, i32 120) ]
23 ; CHECK: Direct call cannot have a ptrauth bundle
24 ; CHECK-NEXT: call void @g() [ "ptrauth"(i32 42, i64 120) ]
25 call void @g() [ "ptrauth"(i32 42, i64 120) ]
27 ; CHECK-NOT: call void
28 call void %arg2() [ "ptrauth"(i32 42, i64 120) ] ; OK
29 call void %arg2() [ "ptrauth"(i32 42, i64 %arg0) ] ; OK