cb424d7448
verify-patch-sanity.py validates every active recipe .patch has internally- consistent hunk line counts — catching the 'malformed patch at line N' failure at commit/CI/preflight time instead of hours into a cook. This cycle hit that class three times (qtwaylandscanner, sddm, xwayland), each only discovered when cookbook tried to apply the patch. Running it across the repo found 29 latent malformed patches (validated against GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22'). They were harmless only because they sit in vendored recipes (baked, not re- applied) — but would fail on any version-bump re-derivation. --fix recounts the hunk headers (body untouched) and repaired all 29. Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test (test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats (empty placeholders, bare-@@ git hunks).
69 lines
2.3 KiB
Common Lisp
69 lines
2.3 KiB
Common Lisp
// REQUIRES: amdgpu-registered-target
|
|
// RUN: %clang_cc1 -cl-std=CL2.0 -O0 -triple amdgcn-unknown-unknown -target-cpu hawaii -emit-llvm -o - %s | FileCheck %s
|
|
// RUN: %clang_cc1 -cl-std=CL2.0 -O0 -triple amdgcn-unknown-unknown -target-cpu fiji -emit-llvm -o - %s | FileCheck %s
|
|
// RUN: %clang_cc1 -cl-std=CL2.0 -O0 -triple amdgcn-unknown-unknown -target-cpu gfx906 -emit-llvm -o - %s | FileCheck %s
|
|
// RUN: %clang_cc1 -cl-std=CL2.0 -O0 -triple amdgcn-unknown-unknown -target-cpu gfx1010 -emit-llvm -o - %s | FileCheck %s
|
|
|
|
typedef unsigned int uint;
|
|
typedef unsigned long ulong;
|
|
|
|
// CHECK-LABEL: @test_s_dcache_inv_vol
|
|
// CHECK: call void @llvm.amdgcn.s.dcache.inv.vol(
|
|
void test_s_dcache_inv_vol()
|
|
{
|
|
__builtin_amdgcn_s_dcache_inv_vol();
|
|
}
|
|
|
|
// CHECK-LABEL: @test_buffer_wbinvl1_vol
|
|
// CHECK: call void @llvm.amdgcn.buffer.wbinvl1.vol()
|
|
void test_buffer_wbinvl1_vol()
|
|
{
|
|
__builtin_amdgcn_buffer_wbinvl1_vol();
|
|
}
|
|
|
|
// CHECK-LABEL: @test_gws_sema_release_all(
|
|
// CHECK: call void @llvm.amdgcn.ds.gws.sema.release.all(i32 %{{[0-9]+}})
|
|
void test_gws_sema_release_all(uint id)
|
|
{
|
|
__builtin_amdgcn_ds_gws_sema_release_all(id);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_s_memtime
|
|
// CHECK: call i64 @llvm.amdgcn.s.memtime()
|
|
void test_s_memtime(global ulong* out)
|
|
{
|
|
*out = __builtin_amdgcn_s_memtime();
|
|
}
|
|
|
|
// CHECK-LABEL: @test_is_shared(
|
|
// CHECK: call i1 @llvm.amdgcn.is.shared(ptr %{{[0-9]+}}
|
|
int test_is_shared(const int* ptr) {
|
|
return __builtin_amdgcn_is_shared(ptr);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_is_private(
|
|
// CHECK: call i1 @llvm.amdgcn.is.private(ptr %{{[0-9]+}}
|
|
int test_is_private(const int* ptr) {
|
|
return __builtin_amdgcn_is_private(ptr);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_is_shared_global(
|
|
// CHECK: [[CAST:%[0-9]+]] = addrspacecast ptr addrspace(1) %{{[0-9]+}} to ptr
|
|
// CHECK: call i1 @llvm.amdgcn.is.shared(ptr [[CAST]]
|
|
int test_is_shared_global(const global int* ptr) {
|
|
return __builtin_amdgcn_is_shared(ptr);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_is_private_global(
|
|
// CHECK: [[CAST:%[0-9]+]] = addrspacecast ptr addrspace(1) %{{[0-9]+}} to ptr
|
|
// CHECK: call i1 @llvm.amdgcn.is.private(ptr [[CAST]]
|
|
int test_is_private_global(const global int* ptr) {
|
|
return __builtin_amdgcn_is_private(ptr);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_groupstaticsize
|
|
// CHECK: call i32 @llvm.amdgcn.groupstaticsize()
|
|
void test_groupstaticsize(global uint* out) {
|
|
*out = __builtin_amdgcn_groupstaticsize();
|
|
}
|