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).
63 lines
1.4 KiB
LLVM
63 lines
1.4 KiB
LLVM
; RUN: llvm-as < %s | llvm-dis | FileCheck %s --check-prefix=ASSEM-DISASS
|
|
; RUN: opt < %s -O3 -S | FileCheck %s --check-prefix=OPT
|
|
; RUN: verify-uselistorder %s
|
|
; Basic smoke tests for bfloat type.
|
|
|
|
define bfloat @check_bfloat(bfloat %A) {
|
|
; ASSEM-DISASS: ret bfloat %A
|
|
ret bfloat %A
|
|
}
|
|
|
|
define bfloat @check_bfloat_literal() {
|
|
; ASSEM-DISASS: ret bfloat 0xR3149
|
|
ret bfloat 0xR3149
|
|
}
|
|
|
|
define <4 x bfloat> @check_fixed_vector() {
|
|
; ASSEM-DISASS: ret <4 x bfloat> %tmp
|
|
%tmp = fadd <4 x bfloat> undef, undef
|
|
ret <4 x bfloat> %tmp
|
|
}
|
|
|
|
define <vscale x 4 x bfloat> @check_vector() {
|
|
; ASSEM-DISASS: ret <vscale x 4 x bfloat> %tmp
|
|
%tmp = fadd <vscale x 4 x bfloat> undef, undef
|
|
ret <vscale x 4 x bfloat> %tmp
|
|
}
|
|
|
|
define bfloat @check_bfloat_constprop() {
|
|
%tmp = fadd bfloat 0xR40C0, 0xR40C0
|
|
; OPT: 0xR4140
|
|
ret bfloat %tmp
|
|
}
|
|
|
|
define float @check_bfloat_convert() {
|
|
%tmp = fpext bfloat 0xR4C8D to float
|
|
; OPT: 0x4191A00000000000
|
|
ret float %tmp
|
|
}
|
|
|
|
; ASSEM-DISASS-LABEL @snan_bfloat
|
|
define bfloat @snan_bfloat() {
|
|
; ASSEM-DISASS: ret bfloat 0xR7F81
|
|
ret bfloat 0xR7F81
|
|
}
|
|
|
|
; ASSEM-DISASS-LABEL @qnan_bfloat
|
|
define bfloat @qnan_bfloat() {
|
|
; ASSEM-DISASS: ret bfloat 0xR7FC0
|
|
ret bfloat 0xR7FC0
|
|
}
|
|
|
|
; ASSEM-DISASS-LABEL @pos_inf_bfloat
|
|
define bfloat @pos_inf_bfloat() {
|
|
; ASSEM-DISASS: ret bfloat 0xR7F80
|
|
ret bfloat 0xR7F80
|
|
}
|
|
|
|
; ASSEM-DISASS-LABEL @neg_inf_bfloat
|
|
define bfloat @neg_inf_bfloat() {
|
|
; ASSEM-DISASS: ret bfloat 0xRFF80
|
|
ret bfloat 0xRFF80
|
|
}
|