Index: cfe/trunk/include/clang/Basic/BuiltinsAMDGPU.def =================================================================== --- cfe/trunk/include/clang/Basic/BuiltinsAMDGPU.def +++ cfe/trunk/include/clang/Basic/BuiltinsAMDGPU.def @@ -39,6 +39,8 @@ BUILTIN(__builtin_amdgcn_s_waitcnt, "vIi", "n") BUILTIN(__builtin_amdgcn_s_barrier, "v", "n") BUILTIN(__builtin_amdgcn_wave_barrier, "v", "n") +BUILTIN(__builtin_amdgcn_s_dcache_inv, "v", "n") +BUILTIN(__builtin_amdgcn_buffer_wbinvl1, "v", "n") BUILTIN(__builtin_amdgcn_div_scale, "dddbb*", "n") BUILTIN(__builtin_amdgcn_div_scalef, "fffbb*", "n") BUILTIN(__builtin_amdgcn_div_fmas, "ddddb", "nc") Index: cfe/trunk/test/CodeGenOpenCL/builtins-amdgcn.cl =================================================================== --- cfe/trunk/test/CodeGenOpenCL/builtins-amdgcn.cl +++ cfe/trunk/test/CodeGenOpenCL/builtins-amdgcn.cl @@ -263,6 +263,20 @@ *out = __builtin_amdgcn_class(a, b); } +// CHECK-LABEL: @test_buffer_wbinvl1 +// CHECK: call void @llvm.amdgcn.buffer.wbinvl1( +void test_buffer_wbinvl1() +{ + __builtin_amdgcn_buffer_wbinvl1(); +} + +// CHECK-LABEL: @test_s_dcache_inv +// CHECK: call void @llvm.amdgcn.s.dcache.inv( +void test_s_dcache_inv() +{ + __builtin_amdgcn_s_dcache_inv(); +} + // CHECK-LABEL: @test_s_waitcnt // CHECK: call void @llvm.amdgcn.s.waitcnt( void test_s_waitcnt()