[mlir][complex] Fix miscompile with log(exp) fold (#212781)
The complex folder `log(exp(z)) -> z` leads to a miscompile if |Im(z)|
\> pi since `clog` is expected to return the principal value of the
complex log, whose imaginary part is in `(pi, pi]`.
Since we cannot assume properties on `z`, this PR removes the incorrect
folder and updates the associated test.
[mlir][x86] Fix - Allow AMX lowering not to care about epilogue ops. (#215459)
`x86` AMX lowering looks to patten match with `transfer_write` or
`store` and hence it doesn't re-write for epilogue ops.
This patch fixes/extend the lower pattern of AMX to not care about
epilogue ops.
Issue: https://github.com/libxsmm/tpp-mlir/issues/1171
[clang][ASTImporter] Remove 'hasReturnTypeDeclaredInside' (#169504)
The function `hasReturnTypeDeclaredInside` and a related visitor class
was used to detect recursive import of function declarations. There is
now a new way to detect the recursive import that works in all cases
(unlike the previous method). A test is added to show a case when
the old solution does not work.
ipfw: rework 32-bit KBI detection
When we run 14.X jail on 15.X host system previous implementation could
not correctly detect 32-bit KBI due to jails can overwrite osreldate.
Add special handling for this case and use detection using
IP_FW_DUMP_SOPTCODES and IP_FW_XGET sockopts version.
Reported by: Vova Grebenschikov
Fixes: 704ec5e68c44
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D56616
[mlir][linalg] TileUsingFor - variadic tiles and interchange (#214539)
Extends the 'structured.tile_using_for' op to accept packed handle
containing variable number of tile sizes, and dynamic and packed loop
interchange values.
Packed handles allows for runtime tiling decisions which improves
transform schedule flexibility and reusability.
The extension follows the existing approach used by other tiling ops.
Assisted-by: Claude
www/pomerium-envoy-custom: fix GOROOT to track default Go version
Use ${GO_SUFFIX} instead of hardcoded go125, so the GOROOT path
tracks whatever Go version USES=go selects. This fixes a build
failure after the default Go version was switched to 1.26.
mail/exim: daemon fails to create notifier socket on start if no correct exit (+)
Since recent version (e.g. 4.98) exim successfully creates notifier socket file in FreeBSD.
But if file already exists during exim start it's just ignored with error message in log.
Without notifier socket exim cannot check if there is already running exim daemon
with e.g. such condition: ${if eq {$queue_size} {} }.
Add socket file removing before daemon start.
exim_notifier_socket variable is added for notifier_socket setting overriding in exim configuration.
PR: 281615
Notified by: vvd
(cherry picked from commit 5d6b7ba559157e30942d5a06683662823d078d59)
[AIX][SystemZ][Support] Check if file is dir on open instead of read (#214815)
See
https://github.ibm.com/compiler/llvm-project/commit/678f19f08296fec299438130cf5943714c590b7e
for the original change.
This original change would run fstat() on the file at every read(). In
the non-error situation that is a lot of redundant checking. Moving the
fstat() check to openNativeFileForRead() will reduce the checks to a
minimum and still produce the same error if someone tries to open a
directory.
(cherry picked from commit 9c7ba7b1d12ed3f395a2317c525a98e5bfcf28e9)
workflows/release-task: Stop uploading lit to test.pypi.org (#214979)
The gh-action-pypi-publish action only supports being run once per job.
Running it twice results in the second upload always failing. Rather
than trying to create a complicated job structure to support uploading
to test.pypi.org and pypi.org, we just remove the test.pypi.org upload
for now.
(cherry picked from commit b6a9f2f765e49740062847a3319a4dc4cc5ebab1)
release-tasks: Disable lit publishing for release candidates (#214972)
There is no rc in the lit version string, so release candidates get
published using the non-rc version number.
(cherry picked from commit ef4d4d074570232364982564782c86083d5dcf78)
[LoongArch][LASX] Fix fptosi/fptoui from <4 x float> to <4 x i64> (#214621)
These were lowered through a 128-bit f32 to i32/u32 conversion followed
by a sign/zero extension, which silently clamps any finite input that
does not fit in i32/u32 instead of producing the correct 64-bit integer.
Convert directly with xvftintrzl.l.s for the signed case. For the
unsigned case there is no f32 -> u64 lane conversion in LASX, so widen
to f64 first (which is exact) and convert with xvftintrz.lu.d. Both
forms use xvpermi.d to move the inputs into the low 64 bits of each
128-bit lane, as required by these lane-wise conversions.
Built and verified on Arch Linux for Loong64:
https://github.com/lcpu-club/loongarch-packages/pull/974. Both the LLVM
side and the Highway test suite that discovered the bug have passed
verification.
Assisted by Kimi K3 AI agent.
Fixes https://github.com/llvm/llvm-project/issues/214605
[2 lines not shown]
[X86] Fix miscompile of fptosi.sat.iN.f16 for NaN under avx512fp16 (#210556)
`X86TargetLowering::LowerFP_TO_INT_SAT` incorrectly lowered
`llvm.fptosi.sat.iN.f16` for N = 13, 14, 15, 16 under `avx512fp16`
codegen: NaN inputs produced the destination type's minimum value
instead of the 0 that the intrinsic's documented semantics require.
Vector forms that scalarize through this lowering are affected under
the same condition, applied per element. See the third commit message
for the full root-cause analysis and fix rationale.
---
Assisted-by: Claude (Anthropic)
Assisted-by: Codex (OpenAI)
The investigation, root-cause analysis, fix, and tests in this PR were
developed with substantial AI assistance (Claude), including four
independent AI-assisted review rounds (Codex). I reviewed and take
responsibility for all code, analysis, and claims in this PR, and can
[3 lines not shown]
[WebAssembly][FastISel] Fix sext i1 to i64 with +sign-ext (#213734) (#214007)
Fixes #213734
---
## Summary
At `-O0`, WebAssembly FastISel could miscompile programs that
sign-extend an i1 value to i64 when the `+sign-ext` target feature is
enabled. The bug was introduced in LLVM 23 by the FastISel sign-ext
optimization (#179855).
For `sext i1 to i64`, FastISel fell through its switch without emitting
any instruction and returned an undefined register. Code that uses this
pattern to adjust integer division results (such as floor division)
could then compute the wrong answer. The issue reporter saw `-1` instead
of the correct `-2`.
This patch restructures `signExtend()` so i8, i16, and i32 still use
[20 lines not shown]
[IR] Set Number of Hungoff Uses after allocation (#213304)
If allocation of the Use[] in allocHungoffUses fails (e.g. due to OOM),
it may happen that the destructor of User is called with NumUserOperands
> 0. Then `Use::zap` tries to destruct Uses that were not constructed in
the first place.
Example scenario for SwitchInst:
`SwitchInst::init()` is called, which means the constructor of the
parent class User went through successfully, which means the destructor
of User will be called eventually. If now `SwitchInst::init()` calls
first `setNumHungOffUseOperands(2)` and then `allocHungoffUses()` and
the allocation there fails, `~User()` is called and tries to destruct 2
Uses, which can lead to problems.
This patch consequently ensures that first the allocation happens and
then NumUserOperands is set accordingly, so that this problem is
prevented.
(cherry picked from commit e416b09711039b65a37b6c83977fb04c2c0889ea)