LLVM/project 1211be2lldb/source/Plugins/Process/FreeBSD NativeRegisterContextFreeBSD_x86.cpp, lldb/source/Plugins/Process/NetBSD NativeRegisterContextNetBSD_x86.cpp

[lldb][X86] Fix *BSD build on GCC workaround change (#214514)

Reflect the class change on FreeBSD code.

Fixes: de4f929700f8 ("[lldb][x86] Remove GCC 6 workaround")
DeltaFile
+1-1lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86.cpp
+1-1lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86.cpp
+2-22 files

LLVM/project b0b88aalibcxx/test/libcxx/input.output/iostream.objects cin-read-stdio-sync.sh.cpp

fixup! [libcxx] Speed up xsgetn for always_noconv
DeltaFile
+9-0libcxx/test/libcxx/input.output/iostream.objects/cin-read-stdio-sync.sh.cpp
+9-01 files

LLVM/project 2a0c57cllvm/lib/Target/AArch64/GISel AArch64InstructionSelector.cpp, llvm/test/CodeGen/AArch64/GlobalISel select-store.mir

[AArch64][GlobalISel] Fix invalid subregister copies for truncating stores (#213935)

The custom truncating store selector always created a subregister copy
matching the memory type. When storing an i16 value to i8 both types
used GPR32, producing an invalid copy:
```
  *** Bad machine code: Invalid subregister index for virtual register ***
  - function:    truncstores
  - basic block: %bb.0  (0xb1a58e8738c0)
  - instruction: %2:gpr32 = COPY %val16.sub_32:gpr32
  - operand 1:   %val16.sub_32:gpr32
  Register class GPR32 does not support subreg index sub_32
  LLVM ERROR: Found 1 machine code errors.
```
This code path should only be used for FPRs. The existing RegBankSelect
avoids this by inserting a G_ANYEXT from i16 to i32, allowing the
imported pattern to match. It was exposed by the type-based
RegBankSelect prototype in #199040.

Assisted-by: codex
DeltaFile
+6-0llvm/test/CodeGen/AArch64/GlobalISel/select-store.mir
+2-1llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
+8-12 files

LLVM/project e0c0675llvm/lib/CodeGen/AsmPrinter DwarfUnit.cpp DwarfUnit.h, llvm/test/DebugInfo/X86 debug-macro-dwo.ll

[NFC][DWARF] Prefer addSectionLabel (#214239)

This is a follow-up to a comment on #213128.

addSectionDelta was only called in sites within if statements that would
branch on whether or not split DWARF is enabled and then branching to
either addSectionDelta or addSectionLabel. Instead we can just make
addSectionLabel call addSectionDelta internally if we're in a DwoUnit to
make things simpler.

This is obviously NFC for most cases. For macro info, we were previously
branching on useSplitDWARF which can differ, but only in the case we are
emitting into the skeleton compile unit, which we should not be doing
for macro info.
DeltaFile
+15-20llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+3-13llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+6-5llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
+4-3llvm/test/DebugInfo/X86/debug-macro-dwo.ll
+3-1llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+31-425 files

LLVM/project a26bbddllvm/lib/Transforms/Utils Local.cpp, llvm/test/Transforms/GVNSink threadlocal_address.ll

[GVNSink] Do not sink @llvm.threadlocal.address (#214582)

Sinking this intrinsic with different arguments requires the use of a
phi node which violates verifier assumptions about the intrinsic. So we
mark it as unable to have operands replaced with variables.

Fixes #214565
DeltaFile
+48-0llvm/test/Transforms/GVNSink/threadlocal_address.ll
+5-0llvm/lib/Transforms/Utils/Local.cpp
+53-02 files

LLVM/project 0b65d8bmlir/lib/ExecutionEngine CRunnerUtils.cpp

[NFC] Add missing <cmath> continuation (#214641)

I missed a missing import from
https://github.com/llvm/llvm-project/pull/214410, found this failing
downstream
DeltaFile
+1-0mlir/lib/ExecutionEngine/CRunnerUtils.cpp
+1-01 files

LLVM/project 44cbd66llvm/test/Analysis/CostModel/AArch64 load_store.ll

[AArch64] Add load/store cost model test. NFC (#214648)

These are copied from the X86 tests with some adjustments.
DeltaFile
+2,999-0llvm/test/Analysis/CostModel/AArch64/load_store.ll
+2,999-01 files

LLVM/project 5b94e6fclang/test/CodeGenHLSL/builtins atan2-overloads_mat.hlsl atan2_mat-overloads.hlsl, clang/test/SemaHLSL/BuiltIns atan2-errors_mat.hlsl atan2_mat-errors.hlsl

Update `atan2` matrix tests (#214550)

This PR updates the `atan2` matrix sema error test to cover the full set
of argument/type error cases (mirroring `pow_mat-errors.hlsl`). It also
renames two tests to match the `<intrinsic>_mat-<suffix>` convention
that other intrinsics follow.
DeltaFile
+0-52clang/test/CodeGenHLSL/builtins/atan2-overloads_mat.hlsl
+52-0clang/test/CodeGenHLSL/builtins/atan2_mat-overloads.hlsl
+36-0clang/test/SemaHLSL/BuiltIns/atan2_mat-errors.hlsl
+0-7clang/test/SemaHLSL/BuiltIns/atan2-errors_mat.hlsl
+88-594 files

LLVM/project 65cb5bcllvm/lib/Target/PISA PISAAsmPrinter.cpp

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

LLVM/project 200993fllvm/test/Analysis/CostModel/RISCV reduce-scalable-int.ll vp-intrinsics.ll, llvm/test/Transforms/SLPVectorizer/RISCV runtime-strided-stores.ll

[RISCV] Increase cost of vmv.x.s and vfmv.f.s (#214481)

A change landed that enabled SLP vectorization in more places, but it
caused a 16% regression in 508.namd_r on the spacemit-k3:
https://github.com/llvm/llvm-project/issues/214417

The root cause is that we're emitting two vfmv.f.s now which are
generally slow due to the vector->scalar domain crossing:
https://godbolt.org/z/dMo55zPMa

Reciprocal throughput of vmv.x.s/vfmv.f.s is 6 times higher than
vmv.s.x/vfmv.s.f on the spacemit-k3 and 2.5 higher on the P870 according
to https://camel-cdr.github.io/rvv-bench-results/

This PR increases the cost of a vmv.x.s/vfmv.f.s from 1->2, which is
just enough to prevent unprofitable SLP vectorization and fixes the
regression on 508.namd_r.

It also has the bonus side effect of preventing loop vectorization where

    [3 lines not shown]
DeltaFile
+859-864llvm/test/Analysis/CostModel/RISCV/rvv-extractelement.ll
+239-239llvm/test/Analysis/CostModel/RISCV/cast.ll
+126-126llvm/test/Analysis/CostModel/RISCV/reduce-fadd.ll
+124-124llvm/test/Analysis/CostModel/RISCV/vp-intrinsics.ll
+114-114llvm/test/Analysis/CostModel/RISCV/reduce-scalable-int.ll
+132-66llvm/test/Transforms/SLPVectorizer/RISCV/runtime-strided-stores.ll
+1,594-1,53336 files not shown
+2,634-2,39442 files

LLVM/project 9adc253flang/include/flang/Semantics tools.h, flang/lib/Lower ConvertVariable.cpp

[Flang] Coarray allocation, update error for pointer component #193829 (#194651)

The TODO message in `verify()` was not completly displayed, so it has
been replaced by `emitErrorOp`.
In addition, the test in `ConvertVariable` has been updated by adding
pointer direct component case.
Fix #193829
DeltaFile
+15-3flang/lib/Lower/ConvertVariable.cpp
+3-3flang/lib/Optimizer/Dialect/MIF/MIFOps.cpp
+5-0flang/lib/Semantics/tools.cpp
+2-1flang/test/Lower/MIF/coarray_allocation3.f90
+2-0flang/include/flang/Semantics/tools.h
+27-75 files

LLVM/project 75c3118llvm/lib/Target/PISA CMakeLists.txt PISAAsmPrinter.cpp, llvm/test/CodeGen/PISA unreachable.ll return.ll

Add PISA AsmPrinter

Add PISAAsmPrinter to complete the codegen pipeline with end-to-end code
emission.
DeltaFile
+933-0llvm/lib/Target/PISA/PISAAsmPrinter.cpp
+352-0llvm/test/CodeGen/PISA/store.ll
+350-0llvm/test/CodeGen/PISA/load.ll
+37-0llvm/test/CodeGen/PISA/return.ll
+14-0llvm/test/CodeGen/PISA/unreachable.ll
+1-0llvm/lib/Target/PISA/CMakeLists.txt
+1,687-06 files

LLVM/project f11fc54llvm/lib/Target/PISA PISAKernelByValArgsLowering.cpp

Formatting fix
DeltaFile
+4-3llvm/lib/Target/PISA/PISAKernelByValArgsLowering.cpp
+4-31 files

LLVM/project 4300427llvm/lib/Target/PISA CMakeLists.txt

Review fixes
DeltaFile
+1-1llvm/lib/Target/PISA/CMakeLists.txt
+1-11 files

LLVM/project 6e827e9llvm/lib/Target/Lanai LanaiTargetMachine.h

formatting

Created using spr 1.3.7
DeltaFile
+1-1llvm/lib/Target/Lanai/LanaiTargetMachine.h
+1-11 files

LLVM/project b020e06clang/docs ClangFormatStyleOptions.rst ClangFormatStyleOptions.md, clang/include/clang/Format Format.h

rebase

Created using spr 1.3.7
DeltaFile
+8,221-0clang/docs/ClangFormatStyleOptions.md
+0-8,043clang/docs/ClangFormatStyleOptions.rst
+2,087-1,967llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+445-403llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+404-404clang/include/clang/Format/Format.h
+743-0llvm/test/CodeGen/SPIRV/hlsl-intrinsics/pow_mat.ll
+11,900-10,817473 files not shown
+33,141-18,287479 files

LLVM/project e65e45bclang/docs ClangFormatStyleOptions.rst ClangFormatStyleOptions.md, clang/include/clang/Format Format.h

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+8,221-0clang/docs/ClangFormatStyleOptions.md
+0-8,043clang/docs/ClangFormatStyleOptions.rst
+2,087-1,967llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+445-403llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+404-404clang/include/clang/Format/Format.h
+743-0llvm/test/CodeGen/SPIRV/hlsl-intrinsics/pow_mat.ll
+11,900-10,817473 files not shown
+33,141-18,287479 files

LLVM/project d2ace49clang/docs ClangFormatStyleOptions.rst ClangFormatStyleOptions.md, clang/include/clang/Format Format.h

rebase

Created using spr 1.3.7
DeltaFile
+8,221-0clang/docs/ClangFormatStyleOptions.md
+0-8,043clang/docs/ClangFormatStyleOptions.rst
+2,087-1,967llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+445-403llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+404-404clang/include/clang/Format/Format.h
+743-0llvm/test/CodeGen/SPIRV/hlsl-intrinsics/pow_mat.ll
+11,900-10,817473 files not shown
+33,141-18,287479 files

LLVM/project b71d97aclang/docs ClangFormatStyleOptions.rst ClangFormatStyleOptions.md, clang/include/clang/Format Format.h

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+8,221-0clang/docs/ClangFormatStyleOptions.md
+0-8,043clang/docs/ClangFormatStyleOptions.rst
+2,087-1,967llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+445-403llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+404-404clang/include/clang/Format/Format.h
+743-0llvm/test/CodeGen/SPIRV/hlsl-intrinsics/pow_mat.ll
+11,900-10,817473 files not shown
+33,141-18,287479 files

LLVM/project 7762e71clang/docs ClangFormatStyleOptions.rst ClangFormatStyleOptions.md, clang/include/clang/Format Format.h

rebase

Created using spr 1.3.7
DeltaFile
+8,221-0clang/docs/ClangFormatStyleOptions.md
+0-8,043clang/docs/ClangFormatStyleOptions.rst
+2,087-1,967llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+445-403llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+404-404clang/include/clang/Format/Format.h
+743-0llvm/test/CodeGen/SPIRV/hlsl-intrinsics/pow_mat.ll
+11,900-10,817473 files not shown
+33,141-18,287479 files

LLVM/project fb41d36clang/docs ClangFormatStyleOptions.rst ClangFormatStyleOptions.md, clang/include/clang/Format Format.h

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+8,221-0clang/docs/ClangFormatStyleOptions.md
+0-8,043clang/docs/ClangFormatStyleOptions.rst
+2,087-1,967llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+445-403llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+404-404clang/include/clang/Format/Format.h
+743-0llvm/test/CodeGen/SPIRV/hlsl-intrinsics/pow_mat.ll
+11,900-10,817473 files not shown
+33,141-18,287479 files

LLVM/project 0ca6142clang/docs ClangFormatStyleOptions.rst ClangFormatStyleOptions.md, clang/include/clang/Format Format.h

rebase

Created using spr 1.3.7
DeltaFile
+8,221-0clang/docs/ClangFormatStyleOptions.md
+0-8,043clang/docs/ClangFormatStyleOptions.rst
+2,087-1,967llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+445-403llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+404-404clang/include/clang/Format/Format.h
+743-0llvm/test/CodeGen/SPIRV/hlsl-intrinsics/pow_mat.ll
+11,900-10,817473 files not shown
+33,141-18,287479 files

LLVM/project 6ba9d2cclang/docs ClangFormatStyleOptions.rst ClangFormatStyleOptions.md, clang/include/clang/Format Format.h

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+8,221-0clang/docs/ClangFormatStyleOptions.md
+0-8,043clang/docs/ClangFormatStyleOptions.rst
+2,087-1,967llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+445-403llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+404-404clang/include/clang/Format/Format.h
+743-0llvm/test/CodeGen/SPIRV/hlsl-intrinsics/pow_mat.ll
+11,900-10,817473 files not shown
+33,141-18,287479 files

LLVM/project 0b5cc57llvm/include/llvm/Target TargetMachine.h

[Target] Add shouldDefaultToNewPM flag

This will allow for tools like clang/flang/llc to default to the NewPM
for targets that request it.

Future patches will update clang/llc and flip it for targets that have
been fully ported but shouldn't have a large blast radius (like Lanai
and MSP430).

Pursuant to
https://discourse.llvm.org/t/rfc-incrementally-enabling-the-newpm-for-codegen/91410/11.

Reviewers: arsenm, vikramRH, aengelke

Pull Request: https://github.com/llvm/llvm-project/pull/214570
DeltaFile
+4-0llvm/include/llvm/Target/TargetMachine.h
+4-01 files

LLVM/project fa4bd25llvm/lib/Transforms/Vectorize LoopVectorizationPlanner.h VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/RISCV tail-folding-complex-mask.ll

[VPlan] Append recipes created via builder to worklist

The previous PR appended the top most created recipe to the worklist, and this PR extends it to any other nested recipes that were created, similar to InstCombine.

This removes the header mask in a good few more places on RISC-V as measured on SPEC CPU 2017, e.g. for the following loop:

```c
long f(const int *p, const int *q, long n) {
  long a = 0, b = 0;
  for (long i = 0;; i++) {
    if (p[i] && q[i]) { a += i; b += i; }
    if (i + 1 == n) break;
  }
  return a + b;
}
```

Before:


    [49 lines not shown]
DeltaFile
+24-7llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+11-4llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+2-3llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-complex-mask.ll
+37-143 files

LLVM/project dd95c05llvm/test/Transforms/LoopVectorize/RISCV tail-folding-complex-mask.ll

Precommit test
DeltaFile
+163-0llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-complex-mask.ll
+163-01 files

LLVM/project f5f9e87llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize blend-i1.ll

[VPlan] Process simplifyRecipes in a worklist

This brings simplifyRecipes further in line with InstCombine, and asides from unlocking more simplifications it also helps avoid spurious test churn whenever passes are moved around simplifyRecipes.

For now just push the new recipe onto the worklist, not its users.
This uses a post order traversal so we maintain the same simplification order as before.

I've gone through and checked every simplification we do is a canonicalisation that converges, and I checked on llvm-test-suite + SPEC CPU 2017 in various configurations that we don't hit any cycles.
DeltaFile
+23-14llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+1-2llvm/test/Transforms/LoopVectorize/blend-i1.ll
+24-162 files

LLVM/project a6b2f97llvm/test/Transforms/LoopVectorize blend-i1.ll

Precommit test
DeltaFile
+58-0llvm/test/Transforms/LoopVectorize/blend-i1.ll
+58-01 files

LLVM/project 5c3123allvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/VPlan constant-fold.ll

[VPlan] Make simplifyRecipe more like InstCombine

Most combines in simplifyRecipe RAUW a value, but not all of them erase the old recipe.
Unify them and bring it in line with InstCombine by having it return a VPValue, which simplifyRecipes can then call RAUW with, and automatically erase the old recipe.

Similarly to InstCombine, combines that modify a recipe should return the same recipe.
DeltaFile
+116-153llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+6-9llvm/test/Transforms/LoopVectorize/X86/funclet.ll
+0-11llvm/test/Transforms/LoopVectorize/VPlan/constant-fold.ll
+122-1733 files

LLVM/project e723bdfllvm/lib/Transforms/Vectorize VPlanTransforms.cpp

Update trunc combine, fix m_Not return position
DeltaFile
+4-4llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+4-41 files