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).
42 lines
956 B
Common Lisp
42 lines
956 B
Common Lisp
// RUN: %clang_cc1 %s -emit-llvm -o - -triple spir-unknown-unknown | FileCheck %s
|
|
// RUN: %clang_cc1 %s -emit-llvm -o - -triple x86_64-pc-win32 | FileCheck %s
|
|
|
|
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
|
|
|
|
|
|
half test()
|
|
{
|
|
half x = 0.1f;
|
|
x+=2.0f;
|
|
x-=2.0f;
|
|
half y = x + x;
|
|
half z = y * 1.0f;
|
|
return z;
|
|
// CHECK: half 0xH3260
|
|
}
|
|
|
|
// CHECK-LABEL: @test_inc(half noundef %x)
|
|
// CHECK: [[INC:%.*]] = fadd half %x, 0xH3C00
|
|
// CHECK: ret half [[INC]]
|
|
half test_inc(half x)
|
|
{
|
|
return ++x;
|
|
}
|
|
|
|
__attribute__((overloadable)) int min(int, int);
|
|
__attribute__((overloadable)) half min(half, half);
|
|
__attribute__((overloadable)) float min(float, float);
|
|
|
|
__kernel void foo( __global half* buf, __global float* buf2 )
|
|
{
|
|
buf[0] = min( buf[0], 1.5h );
|
|
// CHECK: half noundef 0xH3E00
|
|
buf[0] = min( buf2[0], 1.5f );
|
|
// CHECK: float noundef 1.500000e+00
|
|
|
|
const half one = 1.6666;
|
|
buf[1] = min( buf[1], one );
|
|
// CHECK: half noundef 0xH3EAB
|
|
}
|
|
|