[SimplifyCFG][PGO] Add missing overflow check to ConstantFoldTerminator (#178964)
Branch weight metadata can overflow when folding large branch weights.
Updated branch weights to uint64_t, added check for overflow, and then
set branch weights using setFittedBranchWeights to ensure branch weight
metadata is not lost.
[mlir][shape] Fix crash in ShapeOfOpToConstShapeOp (#180737)
This PR fixes a crash when `shape.shape_of` op has static arg and shape
result type. Fixes #180719.
[mlir][sparse] Fix a crash if block not have terminator (#180741)
This PR fixes a crash in `verifyNumBlockArgs` if region not end with a
terminator. Fixes #180720.
Clang: Add nsz to llvm.minnum and llvm.maxnum emitted from fmin and fmax (#113133)
See: https://github.com/llvm/llvm-project/pull/112852
We will define llvm.minnum and llvm.maxnum with +0.0>-0.0, by default,
while libc doesn't require it.
[CIR][X86] Add support for vpshl/vpshr builtins (#179538)
This patch also adds support for fshl/fshr operations so that
vpshl/vpshr intrinsics can lower to them
Part of: #167765
[FlowSensitive] [StatusOr] Add test fixture target to Bazel (#180302)
This can be used to make sure downstream extensions to the model still
pass the unit tests.
[CodeGen] Expand power-of-2 div/rem at IR level in ExpandIRInsts.
Previously, power-of-2 div/rem operations wider than
MaxLegalDivRemBitWidth were excluded from IR expansion and left for
backend peephole optimizations. Some backends can fail to process such
instructions in case we switch off DAGCombiner.
Now ExpandIRInsts expands them into shift/mask sequences:
- udiv X, 2^C -> lshr X, C
- urem X, 2^C -> and X, (2^C - 1)
- sdiv X, 2^C -> bias adjustment + ashr X, C
- srem X, 2^C -> X - (((X + Bias) >> C) << C)
Special cases handled:
- Division/remainder by 1 or -1 (identity, negation, or zero)
- Exact division (sdiv exact skips bias, produces ashr exact)
- Negative power-of-2 divisors (result is negated)
- INT_MIN divisor (correct via countr_zero on bit pattern)
[mlir][acc] Fixed side effects for [first]private/reduction. (#180791)
This patch moves the definitions of memory effects for the data
entry/exit operations into C++ code. The main reason for this
is to modify the effects of [first]private and reduction
operations: they should not access `CurrentDeviceIdResource`
when they are located inside a compute construct.
The ODS to C++ migration was done with AI assistance. I reviewed
these changes and made sure it was an NFC change. After that
I modified [first]private and reduction implementations.
[libc] Add option to disable printf bit int (#180832)
Requested as a binary size optimization. Updates the parser, converter
utils, config, tests, and docs.
[llvm][cas] Validate OnDiskKeyValueDB against the corresponding OnDiskGraphDB (#180852)
We were previously using the primary OnDiskGraphDB when validating the
upstream OnDiskKeyValueDB, which is incorrect since the values being
stored are direct offsets and therefore cannot be used across DBs
without translating to a hash value first.
rdar://170067863
[docs] Move Maintainers.rst to Maintainers.md in preparation to reformat
This change intentionally produces malformatted documentation, and is
only present to ensure git detects the file rename for blame purposes.
[clang] Convert Maintainers.md from rst to markdown
I link-ified the github usernames as well, and tried to match the LLVM
maintainer file formatting.
This move may cause issues with CMake incremental builds, but this can
be fixed by deleting the entire build director, or if you prefer to be
more targetted, just `build/tools/clang/docs`, since that will have a
stale Maintainers.rst file otherwise.
[BOLT] Keep folded functions in BinaryFunctions map. NFC (#180392)
In relocation mode, keep folded functions in the BinaryFunctions map
instead of erasing them. Mark them as folded using setFolded() and skip
emitting them.