1// REQUIRES: amdgpu-registered-target
2// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu tonga -S -emit-llvm -o - %s | FileCheck %s
3
4typedef unsigned long ulong;
5
6
7// CHECK-LABEL: @test_s_memrealtime
8// CHECK: call i64 @llvm.amdgcn.s.memrealtime()
9void test_s_memrealtime(global ulong* out)
10{
11  *out = __builtin_amdgcn_s_memrealtime();
12}
13