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).
48 lines
1.4 KiB
Plaintext
48 lines
1.4 KiB
Plaintext
// REQUIRES: amdgpu-registered-target
|
|
// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -target-cpu gfx906 -x hip -fcuda-is-device -emit-llvm %s \
|
|
// RUN: -o - | FileCheck %s
|
|
|
|
constexpr static int OpCtrl()
|
|
{
|
|
return 15 + 1;
|
|
}
|
|
|
|
constexpr static int RowMask()
|
|
{
|
|
return 3 + 1;
|
|
}
|
|
|
|
constexpr static int BankMask()
|
|
{
|
|
return 2 + 1;
|
|
}
|
|
|
|
constexpr static bool BountCtrl()
|
|
{
|
|
return true & false;
|
|
}
|
|
|
|
// CHECK: call i32 @llvm.amdgcn.update.dpp.i32(i32 %0, i32 %1, i32 16, i32 0, i32 0, i1 false)
|
|
__attribute__((global)) void test_update_dpp_const_fold_imm_operand_2(int* out, int a, int b)
|
|
{
|
|
*out = __builtin_amdgcn_update_dpp(a, b, OpCtrl(), 0, 0, false);
|
|
}
|
|
|
|
// CHECK: call i32 @llvm.amdgcn.update.dpp.i32(i32 %0, i32 %1, i32 0, i32 4, i32 0, i1 false)
|
|
__attribute__((global)) void test_update_dpp_const_fold_imm_operand_3(int* out, int a, int b)
|
|
{
|
|
*out = __builtin_amdgcn_update_dpp(a, b, 0, RowMask(), 0, false);
|
|
}
|
|
|
|
// CHECK: call i32 @llvm.amdgcn.update.dpp.i32(i32 %0, i32 %1, i32 0, i32 0, i32 3, i1 false)
|
|
__attribute__((global)) void test_update_dpp_const_fold_imm_operand_4(int* out, int a, int b)
|
|
{
|
|
*out = __builtin_amdgcn_update_dpp(a, b, 0, 0, BankMask(), false);
|
|
}
|
|
|
|
// CHECK: call i32 @llvm.amdgcn.update.dpp.i32(i32 %0, i32 %1, i32 0, i32 0, i32 0, i1 false)
|
|
__attribute__((global)) void test_update_dpp_const_fold_imm_operand_5(int* out, int a, int b)
|
|
{
|
|
*out = __builtin_amdgcn_update_dpp(a, b, 0, 0, 0, BountCtrl());
|
|
}
|