1; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s 2 3declare void @g() 4 5define void @test_ptrauth_bundle(i64 %arg0, i32 %arg1, ptr %arg2) { 6 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) ] 10 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) ] 14 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) ] 18 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) ] 22 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) ] 26 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 30 ret void 31} 32