Revert "[SLP] Support ordered fadd reduction via reduction intrinsics" (#198756)
This caused assertion failures, see discussion on the original PR.
Reverts llvm/llvm-project#189451
[libc] Fix modular printf attributes (#194003)
This fixes the validation error related to modular printf missing format attribute in C++ code by moving the validation after the implicit format attribute is added for builtins and known library functions.
This also adds a simple C++ test since the C code did compile successfully because the implicit attributes were added in time for the validation happening for C code.
Assisted-by: codex, reviewed and cross checked, also tested with ATfE,
by me. Modular printf reduced code size from ~37K to ~13K for int-only
printf sample.
[clang] implement CWG2064: ignore value dependence for decltype
The 'decltype' for a value-dependent (but non-type-dependent) should be known,
so this patch makes them non-opaque instead.
This patch also implements what's neceessary to allow overloading
on pure differences in instantiation dependence, making `std::void_t`
usable for SFINAE purposes.
This also readds a few test cases from da98651, which was a previous attempt
at resolving CWG2064.
Fixes #8740
Fixes #61818
Fixes #190388
[CodeGen] Always print 64 bit hash value in MachineBlockHashInfoPrinterPass (#198598)
Hash length must be fixed-size. 0x prefix is counted against the width in
format_hex. Increasing from 16 to 18.
[DAGCombiner] Don't fold cheap extracts of multiple use splats (#134120)
For out-of loop sum reductions, the loop vectorizer will emit an initial
reduction vector like this in the preheader, where there might be an
initial value to begin summing from:
```llvm
%v = insertelement <vscale x 4 x i32> zeroinitializer, i32 %initial, i64 0
```
On RISC-V we currently lower this quite poorly with two splats of 0, one
at m1 and one at m2:
vsetvli a1, zero, e32, m1, ta, ma
vmv.v.i v10, 0
vsetvli zero, zero, e32, m1, tu, ma
vmv.s.x v10, a0
vsetvli a0, zero, e32, m2, ta, ma
vmv.v.i v8, 0
[32 lines not shown]
[LoopInterchange] Drop ninf from instructions involved in interchange (#197923)
Applying loop-interchange can alter the order of operations in reduction
calculations. If these operations involve floating‑point arithmetic, the
results may change as well. If an instruction in the chain has the
`ninf` flag, it means that reordering can produce a poison value, which
may lead to undefined behavior even though the original program is not.
This patch addresses this issue by dropping `ninf` flags from the
instructions involved in the transformation, as discussed in #148851.
Fixes #148851.
[mlir][SPIR-V] Add ISubBorrow canonicalization patterns (#198637)
Mirror the IAddCarry folder, rewrite isubborrow(x, 0) to <x, 0> via
CompositeConstruct, and fold the all-constant case into a single
spirv.Constant struct
[lldb] Update TestDelayedBreakpoint test to use the right setting (#198751)
This test should regardless of which setting is the default for delayed
breakpoints.
[LoopInterchange] Detect unsupported PHIs in inner loop exit block correctly (#194323)
In the legality check phase, `areInnerLoopExitPHIsSupported` inspects
the PHI nodes in the exit block of the inner loop and bail out if
certain unsupported PHI node is found. This functions had several
issues:
- Conflating with the inner loop and the outer loop
- Unnecessarily conservative when LCSSA-chains exist, which will be
handled by `simplifyLCSSA` function
This patch fixes the above issues to detect unsupported PHIs correctly.
Fix #193746
[libc] Change POSIX to posix in unistd.yaml (#198745)
1. In `header.py`, the canonical identifiers for standards are
explicitly defined in lowercase and mapped to their uppercase/pretty
names for display:
```python
# All the canonical identifiers are in lowercase for easy maintenance.
# This maps them to the pretty descriptions to generate in header comments.
LIBRARY_DESCRIPTIONS = {
"stdc": "Standard C",
"posix": "POSIX",
"bsd": "BSD",
"gnu": "GNU",
"linux": "Linux",
"uefi": "UEFI",
"svid": "SVID",
}
```
[7 lines not shown]
[lldb] Fix delayed breakpoints on running processes
Breakpoints should never be delayed on a running process, as they can
immediately affect program execution.
Revert "[clang] Give unnamed namespaces internal linkage" (#198738)
This was causing assertion failures:
Assertion `D->getCachedLinkage() == LV.getLinkage()' failed.
see discussion on the original PR.
Reverts llvm/llvm-project#198215
[mlir][SPIRVToLLVM] Add missing conversions for GL ops (#198722)
Add direct LLVM intrinsic lowerings for spirv.GL.Pow, spirv.GL.Fma,
spirv.GL.UMax, spirv.GL.UMin, and spirv.GL.SAbs
[DAG] isKnownNeverZero - add computeKnownBits fallback DemandedElts handling and tests (#198691)
Add DemandedElts to fallback cases in isKnownNeverZero
Fixes #183041
Tests:
AND and XOR as fallback cases, can see the improvement after code updated.