LLVM/project 2184d7b — clang/unittests/AST ASTImporterTest.cpp

[SystemZ][z/OS]Skip TLS unit test when targeting z/OS (#248621)

Skip ImportedVarDeclPreservesThreadLocalStorage when target lacks TLS
DeltaFile
+5-0clang/unittests/AST/ASTImporterTest.cpp
+5-01 files

LLVM/project 71ec6cc — llvm/lib/Target/PISA/MCTargetDesc PISAInstPrinter.h

[PISA] PISAInstPrinter::printEnumOption remove default-only switch. NFC. (#249240)

Silence MSVC unnecessary switch warning
DeltaFile
+1-4llvm/lib/Target/PISA/MCTargetDesc/PISAInstPrinter.h
+1-41 files

LLVM/project e740bf5 — clang/include/clang/Options Options.td, clang/lib/Driver/ToolChains Clang.cpp

[SystemZ][z/OS]Add -fzos-le-char-mode=ascii (#248965)

Many build configs add this option when building on z/OS. This includes
cmake adding the option when it is used. This will add the option with
the `ascii` suboption. We will add the `ebcdic` suboption in the near
future.

This options will produce an unsupported error on non z/OS platforms and
the `ebcdic` will produce an unsupported value error on z/OS until we
enable that support.
DeltaFile
+35-0clang/test/Driver/zos-le-char-mode.c
+20-0clang/lib/Frontend/CompilerInvocation.cpp
+9-0clang/lib/Driver/ToolChains/Clang.cpp
+5-0clang/test/Driver/zos-comp.c
+3-0clang/include/clang/Options/Options.td
+1-1clang/test/Driver/zos-driver-defaults.c
+73-11 files not shown
+75-17 files

LLVM/project 49081b9 — libc/test/integration/src/__support/threads callonce_publication_test.cpp callonce_spurious_wake_test.cpp, libc/test/integration/src/pthread pthread_once_test.cpp

[libc] Fix callonce ordering and futex wait loop (#249209)

callonce_fastpath used a relaxed atomic load, allowing callers on weakly
ordered architectures to observe FINISH before writes made by the
callback became visible. callonce_slowpath also waited on the futex only
once, so a spurious FUTEX_WAKE let waiting callers return before
initialisation finished.

Pair acquire loads and CAS operations with a release exchange to FINISH,
and loop in callonce_slowpath until FINISH is observed.

Follows the futex wait-loop discipline in Ulrich Drepper, "Futexes Are
Tricky" (2011):
https://akkadia.org/drepper/futex.pdf

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+176-0libc/test/integration/src/__support/threads/thread_test_support.h
+79-0libc/test/integration/src/__support/threads/callonce_spurious_wake_test.cpp
+73-0libc/test/integration/src/__support/threads/callonce_publication_test.cpp
+46-20libc/test/integration/src/pthread/pthread_once_test.cpp
+56-0libc/test/src/__support/threads/callonce_test.cpp
+41-14libc/test/integration/src/threads/call_once_test.cpp
+471-348 files not shown
+581-5814 files

LLVM/project 8f935e9 — llvm/test/tools/llvm-mca/X86/C864GM8 resources-avx512vl.s, llvm/test/tools/llvm-mca/X86/Generic resources-avx512vl.s

[llvm-mca][x86] Add more AVX512VL FMA instruction permutations (#249234)

Followup to #249221 which handled the AVX512F core instructions tested
DeltaFile
+1,681-1llvm/test/tools/llvm-mca/X86/Znver4/resources-avx512vl.s
+1,681-1llvm/test/tools/llvm-mca/X86/SkylakeServer/resources-avx512vl.s
+1,681-1llvm/test/tools/llvm-mca/X86/SapphireRapids/resources-avx512vl.s
+1,681-1llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-avx512vl.s
+1,681-1llvm/test/tools/llvm-mca/X86/Generic/resources-avx512vl.s
+1,681-1llvm/test/tools/llvm-mca/X86/C864GM8/resources-avx512vl.s
+10,086-61 files not shown
+11,767-77 files

LLVM/project fa39c17 — llvm/lib/Transforms/Utils CloneFunction.cpp, llvm/test/DebugInfo/X86 clone-function.ll

[DebugInfo][CloneFunction] Clone elements of local types

After https://github.com/llvm/llvm-project/pull/165032, when a
DISubprogram is cloned in CloneFunction(), its local types are cloned
too. However, nodes in scope of a cloned local type, such as type
elements and nested types, were not cloned. It was leaving the cloned
type in an inconsistent state: its `elements:` were still pointing to
the original type as a scope.

To fix that, identityMDPredicate now traverses scope chains of types and
declaration subprograms, and marks them for cloning if they are in scope of
a type that is to be cloned.
To avoid traversing parts of the same scope chains multiple times, when visiting
different nodes in scope of the same type, the predicate caches decisions for
scoped types.

A Verifier check for incorrectly scoped type elements will be added
in a follow-up patch
DeltaFile
+220-0llvm/test/DebugInfo/X86/clone-function.ll
+87-44llvm/lib/Transforms/Utils/CloneFunction.cpp
+39-0llvm/unittests/Transforms/Utils/CloningTest.cpp
+346-443 files

LLVM/project 5db456d — llvm/lib/Transforms/Vectorize/SLPVectorizer SLPUtils.cpp, llvm/test/Transforms/SLPVectorizer one-element-vector.ll

[SLP]Respect UseMask for non-constants in isUndefVector

isUndefVector ignored masked-out lanes for non-constant vectors and
dropped UseMask when recursing on insertelement chains. A fully
overwritten non-constant <1 x T> base was then treated as live and
shuffled through ShuffleInstructionBuilder, asserting in getVF.

Fixes #249136

Pull-request: https://github.com/llvm/llvm-project/pull/249238
DeltaFile
+105-0llvm/test/Transforms/SLPVectorizer/one-element-vector.ll
+9-10llvm/test/Transforms/SLPVectorizer/X86/split-node-full-match.ll
+5-10llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPUtils.cpp
+4-4llvm/test/Transforms/SLPVectorizer/AArch64/store-chain-split-wide-stored-values.ll
+3-3llvm/test/Transforms/SLPVectorizer/X86/copyable-operand-dup-parent-phi-user.ll
+3-3llvm/test/Transforms/SLPVectorizer/AArch64/externally-used-copyables.ll
+129-3012 files not shown
+146-4518 files

LLVM/project ba72b41 — libcxx/include/__type_traits promote.h, libcxx/test/std/depr/depr.c.headers math_h.pass.cpp

[libc++] Make __promote work with _BitInt, test for _BitInt in math functions (#248826)

Fixes #248462

The problem was that `__promote` hardcoded a list of accepted integer
types, so it wouldn't accept `_BitInt`, which can be fixed by having a
generic case for all integral types.

To verify that the solution works, a temporary
`types::bit_ints_8_16_32_64` list is added, which should be folded into
`types::integral_types` eventually.
DeltaFile
+4-14libcxx/include/__type_traits/promote.h
+18-0libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp
+13-0libcxx/test/support/type_algorithms.h
+6-0libcxx/test/std/numerics/c.math/isunordered.pass.cpp
+6-0libcxx/test/std/numerics/c.math/islessgreater.pass.cpp
+6-0libcxx/test/std/numerics/c.math/islessequal.pass.cpp
+53-149 files not shown
+89-1415 files

LLVM/project d3cd62c — clang/include/clang/AST DeclTemplate.h, clang/lib/Interpreter ErrorRecovery.h ErrorRecovery.cpp

[clang-repl] Add SpecializationAdded recovery for Function and Var TemplateDecl (#249212)
DeltaFile
+38-1clang/test/Interpreter/error-recovery-template-spec.cpp
+27-5clang/lib/Interpreter/ErrorRecovery.cpp
+2-2clang/lib/Interpreter/ErrorRecovery.h
+2-0clang/include/clang/AST/DeclTemplate.h
+69-84 files

LLVM/project 5826a0b — llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 fold-vector-lane-flags.ll arm64-dagcombiner-load-slicing.ll

[AArch64] Decompose store(insert(insert(..)) to separate stores. (#246716)

Given a store(buildvector) we will lower the buildvector to vector lane
inserts, which means expensive cross register bank copies for each lane
to store as a vector. Split the operation up instead, generating
individual store operations for the values on each lane. This generates
more stores but less expensive vector moves.

This is a recommit of #238314 with extra checks to hopefully prevent
combine loops between mergeConsecutiveStores and the new combine.
DeltaFile
+166-144llvm/test/CodeGen/AArch64/scalarized-store.ll
+124-148llvm/test/CodeGen/AArch64/vector-lrint.ll
+124-148llvm/test/CodeGen/AArch64/vector-llrint.ll
+95-0llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+10-14llvm/test/CodeGen/AArch64/arm64-dagcombiner-load-slicing.ll
+5-7llvm/test/CodeGen/AArch64/fold-vector-lane-flags.ll
+524-4613 files not shown
+529-4729 files

LLVM/project b8622bf — llvm/test/tools/llvm-mca/X86/C864GM8 resources-avx512.s, llvm/test/tools/llvm-mca/X86/Generic resources-avx512.s

[llvm-mca][x86] Add more AVX512 FMA instruction permutations (#249221)

I still need to get the AVX512VL variants done, but this at least gets
the AVX512F core instructions tested
DeltaFile
+1,345-1llvm/test/tools/llvm-mca/X86/Znver4/resources-avx512.s
+1,345-1llvm/test/tools/llvm-mca/X86/SkylakeServer/resources-avx512.s
+1,345-1llvm/test/tools/llvm-mca/X86/SapphireRapids/resources-avx512.s
+1,345-1llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-avx512.s
+1,345-1llvm/test/tools/llvm-mca/X86/Generic/resources-avx512.s
+1,345-1llvm/test/tools/llvm-mca/X86/C864GM8/resources-avx512.s
+8,070-61 files not shown
+9,415-77 files

LLVM/project cdb87fc — llvm/lib/Target/SystemZ SystemZISelLowering.cpp, llvm/test/CodeGen/SystemZ inline-asm-flag-output-01.ll

[SystemZ] Extend or truncate @cc flag output to the constraint type (#245401)

LowerAsmOutputForConstraint always returned the i32 IPM/SRL result for
`=@cc`, regardless of the output type. For a 64-bit output like `long`,
SelectionDAGBuilder then tried to truncate the i32 to i64. That hits the
"Invalid truncate node" assertion, and in release builds it produces a
bad node, which gives wrong code on z13 and later.

This zero-extends or truncates the CC value to `OpInfo.ConstraintVT`,
the same way X86 and AArch64 handle their flag outputs. Codegen for
i8/i16/i32 outputs doesn't change; i64 now gets `ipm` + `risbg`. I added
i64 cases to inline-asm-flag-output-01.ll: a plain return, a branch on
the CC value, and a store.

Fixes #245177
DeltaFile
+60-0llvm/test/CodeGen/SystemZ/inline-asm-flag-output-01.ll
+2-1llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+62-12 files

LLVM/project 84a9ed3 — llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 pr45563-2.ll canonicalize-vars-f16-type.ll

[X86] Prevent poison propagation when inserting i8/i16 into zero vector (#248935)

In `LowerINSERT_VECTOR_ELT`, zero-extending an `i8`/`i16` element to
`i32` before `SCALAR_TO_VECTOR` + `VZEXT_MOVL` can propagate
`undef`/`poison` into adjacent zero lanes (same as #248666 for
`LowerBUILD_VECTOR`). Also fixes the SSE4.2 cases from #246207 (covered
by #249006).

Fixes #248928

Assisted-by: Gemini 4 Neon
DeltaFile
+57-0llvm/test/CodeGen/X86/avx-insertelt.ll
+12-8llvm/test/CodeGen/X86/bfloat-int-cvt.ll
+5-2llvm/test/CodeGen/X86/pr246207.ll
+2-2llvm/test/CodeGen/X86/pr45563-2.ll
+3-1llvm/test/CodeGen/X86/canonicalize-vars-f16-type.ll
+3-1llvm/lib/Target/X86/X86ISelLowering.cpp
+82-146 files

LLVM/project e0d5bfa — .github CODEOWNERS

[CODEOWNERS] Remove "masked" rules (#248903)

As per GitHub docs (see the link in CODEOWNERS file):
* "the last matching pattern takes the most precedence."

Remove rules that are currently masked (i.e. not in use). The Arith
files receive @kuhar @krzysz00, and the XeGPU TransformOps directories
receive @ftynse @nicolasvasilache @rolfmorel. The EmulateNarrowType.cpp 
file receives @dcaballe .
DeltaFile
+0-11.github/CODEOWNERS
+0-111 files

LLVM/project 40e93cc — llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize lcssa-crashes.ll narrow-to-single-scalar.ll

[VPlan] Don't count extract-lane users as introducing broadcasts. (#249084)

Like the other extracts already excluded in narrowToSingleScalarRecipes,
ExtractLane of a single-scalar folds to the scalar. Exclude it too, so
recipes only used by extract-lane (e.g. selects feeding exit values) can
be narrowed.
DeltaFile
+4-6llvm/test/Transforms/LoopVectorize/narrow-to-single-scalar.ll
+1-2llvm/test/Transforms/LoopVectorize/lcssa-crashes.ll
+2-1llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+7-93 files

LLVM/project 8ee3215 — llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/VPlan fold-after-unroll.ll

[VPlan] Fold ExtractPenultimateElement of single scalars after unrolling. (#249214)

After unrolling, ExtractPenultimateElement extracts from a single part,
so for single-scalar operands it can be replaced by its operand, as 
already done for ExtractLastLane. Only fold the operand kinds also folded 
forExtractLastLane.

So far VPInstruction::generate handled single-scalar operands implicitly
via VPTransformState's lane map. Folding them in VPlan allows generate
to assume vector operands. For live-ins, this removes the broadcast and 
the extract of the penultimate element.
DeltaFile
+104-0llvm/test/Transforms/LoopVectorize/VPlan/fold-after-unroll.ll
+7-0llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+111-02 files

LLVM/project 38b3a03 — llvm/test/CodeGen/AArch64 aarch64-dup-ext.ll aarch64-matrix-umull-smull.ll

[AArch64][GlobalISel] Add generic G_UMULL and G_SMULL nodes. (#236058)

This ports the AArch64 specific G_SMULL and G_UMULL instructions to be
generic instructions usable by any target. It has two legalization
types, it is generally expected at the moment to have an output twice
the size of the input, but legalization rules in GISel do not limit us
to this factor. Having target independent nodes allows us to legalize
more cleanly.
DeltaFile
+1,068-2,704llvm/test/CodeGen/AArch64/neon-dotreduce.ll
+564-289llvm/test/CodeGen/AArch64/aarch64-mull-masks.ll
+179-237llvm/test/CodeGen/AArch64/overflow-vec.ll
+155-203llvm/test/CodeGen/AArch64/rem-by-const.ll
+126-202llvm/test/CodeGen/AArch64/aarch64-matrix-umull-smull.ll
+77-166llvm/test/CodeGen/AArch64/aarch64-dup-ext.ll
+2,169-3,80138 files not shown
+2,951-4,57844 files

LLVM/project 8932712 — libcxx/docs/DesignDocs RCU.md, libcxx/src/experimental rcu.cpp

[libc++] Implement P2545R4 Read-Copy Update (RCU)  (#175451)

Fixes #105361

---------

Co-authored-by: Louis Dionne <ldionne.2 at gmail.com>
DeltaFile
+453-0libcxx/docs/DesignDocs/RCU.md
+329-0libcxx/test/std/thread/saferecl/saferecl.rcu/saferecl.rcu.base/retire.pass.cpp
+313-0libcxx/test/std/thread/saferecl/saferecl.rcu/saferecl.rcu.domain/rcu_retire.pass.cpp
+273-0libcxx/test/std/thread/saferecl/saferecl.rcu/saferecl.rcu.domain/rcu_synchronize_stress.pass.cpp
+258-0libcxx/src/experimental/rcu.cpp
+233-0libcxx/test/std/thread/saferecl/saferecl.rcu/saferecl.rcu.domain/rcu_barrier.pass.cpp
+1,859-045 files not shown
+3,510-2151 files

LLVM/project 00da207 — llvm/include/llvm/Transforms/InstCombine InstCombiner.h, llvm/lib/Analysis ScalarEvolution.cpp

[LLVM] Migrate call-sites w/o CtxI to new computeSignBits API (#249011)

Migrate to the new computeSignBits SimplifyQuery API in all cases except
when a context-instruction is supplied, defering the issue of safeCtxI
for a follow-up. The SCEV test change can be explained by UseInstrInfo
due to the construction of SQ: there are surely other functional changes
that could be covered with new tests, but we have chosen not to include
new tests.

Assisted-by: llm
DeltaFile
+15-11llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+6-6llvm/test/Analysis/ScalarEvolution/implied-via-division.ll
+3-4llvm/include/llvm/Transforms/InstCombine/InstCombiner.h
+4-3llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+2-1llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h
+1-1llvm/lib/Analysis/ScalarEvolution.cpp
+31-261 files not shown
+32-277 files

LLVM/project 03a0912 — llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 icmp-cst.ll

[AArch64] Fix immediate cost in numberOfInstrToLoadImm (#249199)

The immediate was being treated as 32 bits, even if the original imm was
64, producing the wrong costs for converting conditions to cheaper
immediates. Fixes #248733
DeltaFile
+8-12llvm/test/CodeGen/AArch64/icmp-cst.ll
+2-1llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+10-132 files

LLVM/project 86a351b — llvm/lib/Target/PISA PISAISelLowering.cpp PISARegisterBankInfo.cpp

Apply clang-format
DeltaFile
+91-81llvm/lib/Target/PISA/PISALegalizerInfo.cpp
+65-55llvm/lib/Target/PISA/PISAPostLegalizerCombiner.cpp
+70-40llvm/lib/Target/PISA/PISAPreLegalizerCombiner.cpp
+15-19llvm/lib/Target/PISA/PISACallLowering.cpp
+3-3llvm/lib/Target/PISA/PISARegisterBankInfo.cpp
+2-2llvm/lib/Target/PISA/PISAISelLowering.cpp
+246-2001 files not shown
+248-2027 files

LLVM/project 1b71011 — llvm/lib/Target/Sparc SparcRegisterInfo.cpp, llvm/test/CodeGen/SPARC 64abi.ll frame-index-sp-relative.ll

[SPARC] Address objects relative to %sp when far away from %fp (#248810)

Frame objects are addressed relative to %fp. When an access is out of
immediate range from %fp, its address is built with multiple
instructions even if the object is close to %sp. Use %sp instead when
the offset fits there and the call frame is reserved, so that %sp does
not move.

Assisted-by: Claude
DeltaFile
+297-0llvm/test/CodeGen/SPARC/frame-index-sp-relative.ll
+21-1llvm/lib/Target/Sparc/SparcRegisterInfo.cpp
+1-3llvm/test/CodeGen/SPARC/64abi.ll
+319-43 files

LLVM/project 9a7cbcb — llvm/lib/Target/Sparc SparcInstrInfo.td, llvm/lib/Target/Sparc/AsmParser SparcAsmParser.cpp

[SPARC] Add the LEON5 STBAR options to the assembler (#240762)

LEON5 uses unused bits of the STBAR instruction to implement
functionality similar to the MEMBAR instruction in SPARC V9. It also
provides a write-combining hint for the following store.

Assisted-by: Claude
DeltaFile
+35-11llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
+29-0llvm/test/MC/Sparc/leon5-stbar.s
+27-0llvm/lib/Target/Sparc/SparcInstrInfo.td
+18-8llvm/lib/Target/Sparc/MCTargetDesc/SparcInstPrinter.cpp
+24-0llvm/test/MC/Disassembler/Sparc/leon5-stbar.txt
+22-0llvm/test/MC/Sparc/sparc-asm-errors.s
+155-194 files not shown
+168-2010 files

LLVM/project 0e92d5b — llvm/lib/Target/PISA PISAAsmPrinter.cpp

Fixes
DeltaFile
+9-8llvm/lib/Target/PISA/PISAAsmPrinter.cpp
+9-81 files

LLVM/project 81c5b84 — llvm/lib/Target/PISA PISAAsmPrinter.cpp

Add file headers
DeltaFile
+5-0llvm/lib/Target/PISA/PISAAsmPrinter.cpp
+5-01 files

LLVM/project 75a16af — llvm/lib/Target/PISA PISAAsmPrinter.cpp

Inline comparison into the assertion
DeltaFile
+3-3llvm/lib/Target/PISA/PISAAsmPrinter.cpp
+3-31 files

LLVM/project 867a4e1 — llvm/lib/Target/PISA PISAAsmPrinter.cpp, llvm/test/CodeGen/PISA asm-printer-annotation-globals.ll

Remove the user scan and add a test
DeltaFile
+19-0llvm/test/CodeGen/PISA/asm-printer-annotation-globals.ll
+0-18llvm/lib/Target/PISA/PISAAsmPrinter.cpp
+19-182 files

LLVM/project ff37505 — llvm/lib/Target/PISA PISAAsmPrinter.cpp

Document why AsmPrinter::emitGlobalConstant is not used
DeltaFile
+4-0llvm/lib/Target/PISA/PISAAsmPrinter.cpp
+4-01 files

LLVM/project ceeedb2 — llvm/lib/Target/PISA PISAAsmPrinter.cpp

Formatting fix
DeltaFile
+2-1llvm/lib/Target/PISA/PISAAsmPrinter.cpp
+2-11 files

LLVM/project 0e4947d — llvm/lib/Target/PISA PISAAsmPrinter.cpp, llvm/test/CodeGen/PISA asm-printer-unusual-vector-global.ll

Add a test for reportFatalUsageError
DeltaFile
+8-0llvm/test/CodeGen/PISA/asm-printer-unusual-vector-global.ll
+2-3llvm/lib/Target/PISA/PISAAsmPrinter.cpp
+10-32 files