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).
41 lines
1.6 KiB
LLVM
41 lines
1.6 KiB
LLVM
; RUN: opt < %s -passes='cgscc(inline)' -pass-remarks='inline' -S 2>&1 | FileCheck %s
|
|
; RUN: opt < %s -passes='cgscc(inline)' -pass-remarks='inl.*' -S 2>&1 | FileCheck %s
|
|
; RUN: opt < %s -passes='cgscc(inline)' -pass-remarks='vector' -pass-remarks='inl' -S 2>&1 | FileCheck %s
|
|
|
|
; These two should not yield an inline remark for the same reason.
|
|
; In the first command, we only ask for vectorizer remarks, in the
|
|
; second one we ask for the inliner, but we then ask for the vectorizer
|
|
; (thus overriding the first flag).
|
|
; RUN: opt < %s -passes='cgscc(inline)' -pass-remarks='vector' -S 2>&1 | FileCheck --check-prefix=REMARKS %s
|
|
; RUN: opt < %s -passes='cgscc(inline)' -pass-remarks='inl' -pass-remarks='vector' -S 2>&1 | FileCheck --check-prefix=REMARKS %s
|
|
|
|
; RUN: opt < %s -passes='cgscc(inline)' -S 2>&1 | FileCheck --check-prefix=REMARKS %s
|
|
; RUN: not opt < %s -pass-remarks='(' 2>&1 | FileCheck --check-prefix=BAD-REGEXP %s
|
|
|
|
define i32 @foo(i32 %x, i32 %y) #0 {
|
|
entry:
|
|
%x.addr = alloca i32, align 4
|
|
%y.addr = alloca i32, align 4
|
|
store i32 %x, ptr %x.addr, align 4
|
|
store i32 %y, ptr %y.addr, align 4
|
|
%0 = load i32, ptr %x.addr, align 4
|
|
%1 = load i32, ptr %y.addr, align 4
|
|
%add = add nsw i32 %0, %1
|
|
ret i32 %add
|
|
}
|
|
|
|
define i32 @bar(i32 %j) #0 {
|
|
entry:
|
|
%j.addr = alloca i32, align 4
|
|
store i32 %j, ptr %j.addr, align 4
|
|
%0 = load i32, ptr %j.addr, align 4
|
|
%1 = load i32, ptr %j.addr, align 4
|
|
%sub = sub nsw i32 %1, 2
|
|
%call = call i32 @foo(i32 %0, i32 %sub)
|
|
; CHECK: 'foo' inlined into 'bar'
|
|
; REMARKS-NOT: 'foo' inlined into 'bar'
|
|
ret i32 %call
|
|
}
|
|
|
|
; BAD-REGEXP: Invalid regular expression '(' in -pass-remarks:
|