// Test memory tagging extension intrinsics
// RUN: %clang_cc1 -no-opaque-pointers -triple aarch64-none-linux-eabi -target-feature +mte -O3 -S -emit-llvm -o - %s | FileCheck %s
// CHECK-LABEL: define{{.*}} i32* @create_tag1
int *
// CHECK-LABEL: define{{.*}} i16* @create_tag2
short *
// CHECK-LABEL: define{{.*}} i8* @create_tag3
char *
// CHECK-LABEL: define{{.*}} i8* @increment_tag1
char *
// CHECK-LABEL: define{{.*}} i16* @increment_tag2
short *
// CHECK-LABEL: define{{.*}} i32 @exclude_tag
unsigned
// CHECK-LABEL: define{{.*}} i32* @get_tag1
int *
// CHECK-LABEL: define{{.*}} i16* @get_tag2
short *
// CHECK-LABEL: define{{.*}} void @set_tag1
void
// CHECK-LABEL: define{{.*}} i64 @subtract_pointers
ptrdiff_t
// CHECK-LABEL: define{{.*}} i64 @subtract_pointers_null_1
ptrdiff_t
// CHECK-LABEL: define{{.*}} i64 @subtract_pointers_null_2
ptrdiff_t
// Check arithmetic promotion on return type
// CHECK-LABEL: define{{.*}} i32 @subtract_pointers4
int