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).
51 lines
1.9 KiB
LLVM
51 lines
1.9 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
|
|
; This test checks to make sure that constant exprs fold in some simple
|
|
; situations
|
|
|
|
; RUN: opt -S < %s | FileCheck %s
|
|
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
|
|
; RUN: verify-uselistorder %s
|
|
|
|
@A = global i64 0
|
|
|
|
@add = global ptr inttoptr (i64 add (i64 ptrtoint (ptr @A to i64), i64 0) to ptr) ; X + 0 == X
|
|
@sub = global ptr inttoptr (i64 sub (i64 ptrtoint (ptr @A to i64), i64 0) to ptr) ; X - 0 == X
|
|
@xor = global ptr inttoptr (i64 xor (i64 ptrtoint (ptr @A to i64), i64 0) to ptr) ; X ^ 0 == X
|
|
|
|
%Ty = type { i32, i32 }
|
|
@B = external global %Ty
|
|
|
|
; PR2206
|
|
@cons = weak global i32 0, align 8 ; <ptr> [#uses=1]
|
|
|
|
@gep1 = global <2 x ptr> getelementptr(i8, <2 x ptr> undef, <2 x i64> <i64 1, i64 1>)
|
|
@gep2 = global <2 x ptr> getelementptr({ i8 }, <2 x ptr> undef, <2 x i64> <i64 1, i64 1>, <2 x i32> <i32 0, i32 0>)
|
|
@gep3 = global <2 x ptr> getelementptr(i8, <2 x ptr> zeroinitializer, <2 x i64> <i64 0, i64 0>)
|
|
@gep4 = global <2 x ptr> getelementptr({ i8 }, <2 x ptr> zeroinitializer, <2 x i64> <i64 0, i64 0>, <2 x i32> <i32 0, i32 0>)
|
|
|
|
@bitcast1 = global <2 x i32> bitcast (<4 x i16> <i16 -1, i16 -1, i16 -1, i16 -1> to <2 x i32>)
|
|
@bitcast2 = global <4 x i16> bitcast (<2 x i32> <i32 -1, i32 -1> to <4 x i16>)
|
|
|
|
|
|
; Need a function to make update_test_checks.py work.
|
|
;.
|
|
; CHECK: @A = global i64 0
|
|
; CHECK: @add = global ptr @A
|
|
; CHECK: @sub = global ptr @A
|
|
; CHECK: @xor = global ptr @A
|
|
; CHECK: @B = external global %Ty
|
|
; CHECK: @cons = weak global i32 0, align 8
|
|
; CHECK: @gep1 = global <2 x ptr> undef
|
|
; CHECK: @gep2 = global <2 x ptr> undef
|
|
; CHECK: @gep3 = global <2 x ptr> zeroinitializer
|
|
; CHECK: @gep4 = global <2 x ptr> zeroinitializer
|
|
; CHECK: @bitcast1 = global <2 x i32> splat (i32 -1)
|
|
; CHECK: @bitcast2 = global <4 x i16> splat (i16 -1)
|
|
;.
|
|
define void @dummy() {
|
|
; CHECK-LABEL: @dummy(
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
ret void
|
|
}
|