Home | History | Annotate | Download | only in CodeGenOpenCL
      1 // REQUIRES: amdgpu-registered-target
      2 // RUN: %clang_cc1 -triple amdgcn-unknown-unknown -S -emit-llvm -o - %s | FileCheck %s
      3 
      4 // CHECK-LABEL: @test_builtin_clz(
      5 // CHECK: tail call i32 @llvm.ctlz.i32(i32 %a, i1 true)
      6 void test_builtin_clz(global int* out, int a)
      7 {
      8   *out = __builtin_clz(a);
      9 }
     10 
     11 // CHECK-LABEL: @test_builtin_clzl(
     12 // CHECK: tail call i64 @llvm.ctlz.i64(i64 %a, i1 true)
     13 void test_builtin_clzl(global long* out, long a)
     14 {
     15   *out = __builtin_clzl(a);
     16 }
     17