[SPIRV][NewPM] Port SPIRVPostLegalizer
Standard NewPM pass porting. Most of the implementation was already in
static functions so this was pretty simple.
Reviewers: Keenuts, aeubanks, VyacheslavLevytskyy
Pull Request: https://github.com/llvm/llvm-project/pull/219109
[SPIRV][NewPM] Port SPIRVPreLegalizerCombiner
Standard NewPM pass porting. We do need to move the rule config parsing
into being per MF, but this should not be a noticeable regression.
Reviewers: aeubanks, Keenuts, VyacheslavLevytskyy
Pull Request: https://github.com/llvm/llvm-project/pull/219108
[SPIRV][NewPM] Port SPIRVPreLegalizer
Standard NewPM pass porting. The pass does not use any analyses and was
already largely implemented as static functions so this is mostly just
adding the NewPM boilerplate.
Reviewers: aeubanks, Keenuts, VyacheslavLevytskyy
Pull Request: https://github.com/llvm/llvm-project/pull/219104
Pull up following revision(s) (requested by joe in ticket #443):
sys/dev/ic/bcmgenet.c: revision 1.25
PR kern/60592
properly move bits to ensure unicast bit and locally administered
bits were rightly set.
ZTS: exec_001_pos: copy the exec test binary under its own name
The test copies $STF_PATH/ls to $TESTDIR/myls and executes it directly,
to verify a filesystem with exec=on actually allows running a binary
from it. On Alpine, ls is an applet of a multi-call binary (the
"coreutils" package) that dispatches on argv[0]'s basename; invoked as
"myls" it doesn't recognize any applet by that name and exits with
"coreutils: unknown program 'myls'" before the exec=on behavior this
test is meant to verify ever comes into play.
Copy it to $TESTDIR/ls instead of $TESTDIR/myls. Dispatch is by basename
only, so this is a plain rename with no other behavior change, and
continues to exercise exactly what the test intends: copy a real binary
onto the pool and confirm it runs and mmap(2)s with PROT_EXEC
successfully.
exec_002_neg.ksh has the identical $TESTDIR/myls pattern but sets
exec=off before ever trying to run it; the kernel refuses the execve(2)
itself (EACCES/126) before the binary's own argv[0] dispatch would run
[7 lines not shown]
ZTS: fix user_namespace_001 on Alpine Linux (BusyBox)
On Alpine, touch and chmod are symlinks to /bin/busybox, a multi-call
binary that determines the program to run from argv[0]. readlink -f
resolves through the symlink to /bin/coreutils, losing the program name,
which causes BusyBox to fail with "unknown program".
Drop readlink -f and use command -v directly, which returns the symlink
path itself. On other platforms the commands are real binaries, so this
is a no-op.
Fixes the following tests on Alpine 3.24:
- user_namespace/user_namespace_001
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Moch <mail at alexmoch.com>
Closes #18999
[PGOProfile] Use .proftext in test to avoid binary blob (#219055)
Use `.proftext` in `thinlto_indirect_call_promotion.ll` to avoid
checking in the binary file `thinlto_indirect_call_promotion.profraw`
(and `update_thinlto_indirect_call_promotion_inputs.sh` that generates
the profile).
I ran `llvm-profdata show --text` to convert the `.profdata` file into a
`.proftext` file that could be inlined into the test. I actually had to
regenerate the `.profraw` file because of a version mismatch. I suspect
that the `REQUIRES: zlib` in the test was actually making this test not
run at all, because it was failing on my machine before this.
Also delete
`llvm/test/tools/llvm-profdata/Inputs/thinlto_indirect_call_promotion.profraw`
which seems to be completely unused.
[InstrProf] Remove pgotestir.profraw test file (#219068)
Remove `pgotestir.profraw` which is actually the same as
`pgotestir.proftext`. Also rename `pgotestclang.profraw` to
`pgotestclang.proftext` since it is actually just a test file, not a
binary blob. Update the test to reflect these changes.
ZTS: procfs_list_stale_read: accept Alpine's EIO error message
The procfs_list_stale_read test expects `cat` to print "Input/output
error", which is the wording used by GNU coreutils. Alpine's `cat`
reports the same EIO condition as "I/O error", causing the test to fail
even though the expected I/O error occurred.
Accept both error message variants so the test is independent of the
`cat` implementation's wording.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Moch <mail at alexmoch.com>
Closes #18998
vdev_disk_open: fix ENOENT retry & cleanup error handling
In 88261a83ae I reorganized the blockdev open error handling to
accommodate the permission check. What I didn't notice was that I'd made
the ENOENT case break after the timeout, rather than looping and
retrying.
This commit fixes it up the right way, and this time adds a lot more
commentary to make it easier to see what's happening for each case.
Sponsored-by: TrueNAS
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Ameer Hamza <ahamza at ixsystems.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18993
[Reassociate] Improve handling of fadd/fmul pairs (#218675)
Currently fadd/fmul pairs are treated as leaf nodes in order to preserve
pairs of instructions likely to result in FMA generation. However, doing
this unconditionally can prevent reassociation of deeper expression
trees. This commit fixes that by preserving an fadd/fmul pair as a leaf
only when the other operand of the fadd is not itself a reassociable
fadd expression.
arc: harness buf_hdr's anon state invariant checks
There are several places where hdr is checked for arc_anon state
without the hash_lock, for example at arc_release() or at
arc_buf_destroy(), and it's supposed that the hdr must not be
in the hash table in this state and not having IO_IN_PROGRESS.
However, those invariants are not asserted in release builds.
But even if they would, there is one place in the current code
where they would pass without noticing the problem.
This place is at arc_write_done() where we first insert hdr
into the hash table, then clear IO_IN_PROGRESS flag, then drop
the reference and only then move its state from anon to mru:
7048 exists = buf_hash_insert(hdr, &hash_lock); /* still anon */
...
7081 arc_hdr_clear_flags(hdr, ARC_FLAG_IO_IN_PROGRESS);
7082 VERIFY3S(remove_reference(hdr, hdr), >, 0); /* ref: 2 -> 1 */
7084 if (exists == NULL && hdr->b_l1hdr.b_state == arc_anon)
[32 lines not shown]
zdb: add detailed diagnostics for MOS leaks and spacemap refs
- Print per-object leak details for leaked DSL clone maps and
leaked SPA space map objects.
- When spacemap histogram refcounts mismatch, print component
breakdown (dtl, metaslab, obsolete, checkpoint, log).
- List unreferenced histogram space map objects with their
`smp_alloc` and `smp_length` fields for debugging.
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Martin Minkus <martin.minkus at gmail.com>
Closes #18906
ZTS: fix zinject argument order in mmp_write_uberblocks
glibc's getopt() permutes argv by default (a GNU extension), reordering
flags to the front regardless of where they appear. musl's getopt() is
strict POSIX and stops parsing options at the first non-option argument.
This test's zinject invocation places -L after the positional pool name
($TESTPOOL), which only glibc tolerates; under musl, zinject sees two
leftover positional tokens ($TESTPOOL and the argument to the now-
unparsed -L) and fails with "device (-d) injection requires a single
pool name" instead of injecting the fault.
Move "-L uber" before the positional pool name. This is accepted
identically under glibc's permuting getopt(), so the change is a no-op
on every other platform.
Fixes the following tests on Alpine 3.24:
- mmp/mmp_write_uberblocks
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
[2 lines not shown]
[GlobalISel] Drop nuw/nsw/disjoint when widening a result with G_ANYEXT (#218558)
nuw/nsw/disjoint flags are only true at the original width. G_ANYEXT
leaves the new high bits unconstrained, so they must be dropped.
[SLSR] Skip candidate-basis differences when `SCEVUnknown`s differ (NFC) (#217451)
After SLSR finds a non-constant delta for a candidate, it will continue
searching for a constant delta. However, when the set of `SCEVUnknown`s
differs between a candidate and a basis, the offset cannot be constant.
Thus, prune that candidate and avoid an expensive, fruitless call to
`getSCEVMinus()`.
[AMDGPU][GlobalISel] Fix i64-to-i16 clamp combine on inverted bounds (#216306)
`abs(Cmp2 - Cmp1)` check couldn't tell inverted bounds `(Lo > Hi)` from
valid ones, letting the combine build a med3 that clamped to the wrong
range instead of the constant smin/smax result