LLVM/project 3a1206allvm/test/Transforms/LoopVectorize epilog-iv-select-cmp.ll

[LV] Add find-last-iv test with blend (NFC). (#198214)

Add test cases showing functional change for
https://github.com/llvm/llvm-project/pull/194729.
DeltaFile
+78-2llvm/test/Transforms/LoopVectorize/epilog-iv-select-cmp.ll
+78-21 files

LLVM/project 5f2bedcclang/include/clang/AST ASTContext.h, clang/include/clang/Basic Builtins.td

Add clang warning if fp exception functions are called without appropriate flags/pragmas (#187860)

Fixes https://github.com/llvm/llvm-project/issues/128239

The implementation adds warnings for floating-point exception function
calls (fenv.h) made without enabling floating-point exception behavior
via `-ffp-exception-behavior=maytrap/strict` or `#pragma STDC
FENV_ACCESS ON`. To support recognition of all fenv.h builtins,
`fexcept_t` and `fenv_t` were added as builtin types.
DeltaFile
+68-0clang/test/Sema/fenv-access.c
+55-0clang/include/clang/Basic/Builtins.td
+51-0clang/test/Sema/builtin-fenv.c
+36-0clang/lib/Serialization/ASTReader.cpp
+34-1clang/include/clang/AST/ASTContext.h
+35-0clang/test/Sema/fenv-access-implicit.c
+279-114 files not shown
+424-220 files

LLVM/project c5c8e91llvm/lib/Transforms/Instrumentation IndirectCallPromotion.cpp

[ICP] Update comment about duplicate values in VP MD

With https://github.com/llvm/llvm-project/pull/196649 deduplicating VP
values and https://github.com/llvm/llvm-project/pull/193083 enforcing
this, we no longer need to worry about duplicate values, zero or
otherwise. Update the comment to reflect this.

Reviewers: mingmingl-llvm, teresajohnson

Reviewed By: mingmingl-llvm

Pull Request: https://github.com/llvm/llvm-project/pull/198140
DeltaFile
+3-3llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
+3-31 files

LLVM/project 46c1fa8llvm/lib/Transforms/Vectorize LoopVectorize.cpp

[VPlan] Use ResumeForEpilogue to get epilogue vector trip count (NFC). (#198210)

Use ResumeForEpilogue to look up the vector trip count instead of plain
IR lookup. Also prepares for non-phi resume values.
DeltaFile
+26-23llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+26-231 files

LLVM/project 856f7d4llvm/lib/Transforms/Vectorize LoopVectorize.cpp

[LV] Extract helper to simplify phi removal in connectEpiVectorL (NFC) (#198203)

Extract the repeated edge-redirect + DomTree update pattern into a
RedirectEdge lambda, and convert the separate removeIncomingValue calls
for check blocks into a loop.
DeltaFile
+21-31llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+21-311 files

LLVM/project 1745344clang/test/CodeGen/AArch64 neon-perm.c, clang/test/CodeGen/AArch64/neon perm.c

rebase

Created using spr 1.3.7
DeltaFile
+1,250-1,357llvm/test/CodeGen/X86/avx512-calling-conv.ll
+203-915llvm/test/CodeGen/X86/vector-compress.ll
+158-868llvm/test/CodeGen/X86/avx512-ext.ll
+154-866llvm/test/CodeGen/X86/avx512-mask-op.ll
+492-120clang/test/CodeGen/AArch64/neon/perm.c
+0-383clang/test/CodeGen/AArch64/neon-perm.c
+2,257-4,509144 files not shown
+4,879-5,730150 files

LLVM/project e78a23cclang/test/CodeGen/AArch64 neon-perm.c, clang/test/CodeGen/AArch64/neon perm.c

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+1,250-1,357llvm/test/CodeGen/X86/avx512-calling-conv.ll
+203-915llvm/test/CodeGen/X86/vector-compress.ll
+158-868llvm/test/CodeGen/X86/avx512-ext.ll
+154-866llvm/test/CodeGen/X86/avx512-mask-op.ll
+492-120clang/test/CodeGen/AArch64/neon/perm.c
+0-383clang/test/CodeGen/AArch64/neon-perm.c
+2,257-4,509144 files not shown
+4,879-5,730150 files

LLVM/project df90525llvm/lib/Transforms/Scalar JumpTableToSwitch.cpp

[JTS] Readd assertion

Now that VP metadata has been cleaned up a little bit, we can reenable
this assertion.

Reviewers: alexander-shaposhnikov, mtrofin

Pull Request: https://github.com/llvm/llvm-project/pull/198141
DeltaFile
+3-4llvm/lib/Transforms/Scalar/JumpTableToSwitch.cpp
+3-41 files

LLVM/project 94584e7llvm/lib/Transforms/Scalar JumpTableToSwitch.cpp

rebase

Created using spr 1.3.7
DeltaFile
+3-4llvm/lib/Transforms/Scalar/JumpTableToSwitch.cpp
+3-41 files

LLVM/project 56ef779llvm/lib/Transforms/Scalar JumpTableToSwitch.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+3-4llvm/lib/Transforms/Scalar/JumpTableToSwitch.cpp
+3-41 files

LLVM/project c497efbllvm/lib/Transforms/InstCombine InstCombineSelect.cpp, llvm/test/Transforms/InstCombine logical-select.ll

[InstCombine] Convert logical and/or with trunc nuw to i1 into bitwise ops (#198178)

if it is know that `trunc nuw to i1 ` can not be poison logical and/or
can be folded to bitwise ops.

proof https://alive2.llvm.org/ce/z/xQ2Sj-
DeltaFile
+55-0llvm/test/Transforms/InstCombine/logical-select.ll
+13-5llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+68-52 files

LLVM/project f8803b0libcxx/include/__cxx03/__memory uninitialized_algorithms.h, libcxx/include/__memory uninitialized_algorithms.h

[libc++] Require the exact assignment expression to be trivial in __uninitialized_allocator_copy_impl

__uninitialized_allocator_copy_impl has an optimization that replaces allocator_traits::construct with std::copy for raw pointer ranges when the element type is trivially copy constructible and trivially copy assignable.

The copy-assignment trait only checks whether assignment from const T& is trivial. That is weaker than the expression used by std::copy, which evaluates *out = *in. If overload resolution selects a different non-trivial assignment operator for that expression, std::copy can call that operator on uninitialized storage.

Check is_trivially_assignable<_Out&, _In&> instead in both header copies. This matches the assignment expression used by std::copy, preserves the optimized path when that assignment is actually trivial, and avoids making non-const raw pointer callers select the generic allocator_traits::construct overload due to a qualification conversion.

Add a vector copy-constructor regression test with a type whose defaulted copy assignment is trivial but whose templated assignment operator is selected for non-const lvalue sources.

Tested with:
build-libcxx-fresh/bin/llvm-lit -q libcxx/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp libcxx/test/libcxx/memory/uninitialized_allocator_copy.pass.cpp
build-libcxx-fresh/bin/llvm-lit -q --param std=c++03 libcxx/test/libcxx/memory/uninitialized_allocator_copy.pass.cpp
build-libcxx-fresh/bin/llvm-lit -q --param std=c++20 libcxx/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp
build-libcxx-fresh/bin/llvm-lit -q --param std=c++11 libcxx/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp
DeltaFile
+76-1libcxx/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp
+1-1libcxx/include/__cxx03/__memory/uninitialized_algorithms.h
+1-1libcxx/include/__memory/uninitialized_algorithms.h
+78-33 files

LLVM/project 0e92b55compiler-rt/lib/sanitizer_common sanitizer_platform_limits_solaris.cpp

[sanitizer_common] Fix sanitizer_platform_limits_solaris.cpp compilation (#198158)

When switching `clang++` to the default Solaris 11.4 compilation
environment, XPG7 + extensions, `sanitizer_platform_limits_solaris.cpp`
fails to compile:

```
compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cpp:93:53: error: use of undeclared identifier 'ucontext_t'; did you mean 'ucontext_t_sz'?
   93 |   unsigned ucontext_t_sz(void *ctx) { return sizeof(ucontext_t); }
      |                                                     ^~~~~~~~~~
      |                                                     ucontext_t_sz
compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cpp:93:12: note: 'ucontext_t_sz' declared here
   93 |   unsigned ucontext_t_sz(void *ctx) { return sizeof(ucontext_t); }
      |            ^
compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cpp:93:52: error: invalid application of 'sizeof' to a function type
   93 |   unsigned ucontext_t_sz(void *ctx) { return sizeof(ucontext_t); }
      |                                                    ^~~~~~~~~~~~

```

    [4 lines not shown]
DeltaFile
+1-0compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cpp
+1-01 files

LLVM/project 598acfbcompiler-rt/test/asan/TestCases/Posix coverage-module-unloaded.cpp, compiler-rt/test/sanitizer_common/TestCases get_module_and_offset_for_pc.cpp

[sanitizer][test] Fix coverage-module-unloaded.cpp etc. on Solaris (#198164)

When switching `clang++` to the default Solaris 11.4 compilation
environment, XPG7 + extensions, two tests `FAIL`:

```
  AddressSanitizer-i386-sunos :: TestCases/Posix/coverage-module-unloaded.cpp
  AddressSanitizer-i386-sunos-dynamic :: TestCases/Posix/coverage-module-unloaded.cpp

  SanitizerCommon-asan-i386-SunOS :: get_module_and_offset_for_pc.cpp
  SanitizerCommon-ubsan-i386-SunOS :: get_module_and_offset_for_pc.cpp
  SanitizerCommon-ubsan-x86_64-SunOS :: get_module_and_offset_for_pc.cpp
```

The failure mode is the same in both cases: the tests fail to link with
`main` undefined. This happens because `<sys/mman.h>` defines

```
#define SHARED          0x10

    [13 lines not shown]
DeltaFile
+3-3compiler-rt/test/asan/TestCases/Posix/coverage-module-unloaded.cpp
+2-2compiler-rt/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cpp
+5-52 files

LLVM/project 3a2876dmlir/lib/Conversion/MathToSPIRV MathToSPIRV.cpp, mlir/test/Conversion/MathToSPIRV math-to-gl-spirv.mlir

[mlir][SPIR-V] Fix math.powf lowering for non-integer exponents (#197727)

The ConvertFToS usage only works when y is an integer. Use it only for
integer constants, for others: lower as GL.Exp(y * GL.Log(x))
DeltaFile
+72-64mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp
+79-26mlir/test/Conversion/MathToSPIRV/math-to-gl-spirv.mlir
+151-902 files

LLVM/project 47e142bllvm/docs ReleaseNotes.md, llvm/lib/Target/AArch64 AArch64ISelLowering.cpp

[AArch64] Fix handling of x29/x30 in inline assembly clobbers (#167783)

The AArch64 backend was silently ignoring inline assembly clobbers when
numeric register names (x29, x30) were used instead of their
architectural aliases (fp, lr). I found this bug via inline assembly
in Zig, which not normalize the register names the way clang does.

There is an incoplete workaround for this in Rust, but that only
handles `x30/lr`, not `x29/fp`. I thought it would make
sense to fix this properly rather than adding a workaround to Zig.

This patch adds explicit handling in getRegForInlineAsmConstraint() to
map both numeric and alias forms to the correct physical registers,
following the same pattern used by the RISC-V backend.

I've left `x31/sp` without changes, it would nice to have to have
warning when trying to clobber `x31`, just like there is for `sp`,
but that register needs different handling, so it's best done
separately.

    [24 lines not shown]
DeltaFile
+44-0llvm/test/CodeGen/AArch64/inline-asm-clobber-x29-x30.ll
+15-0llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+5-0llvm/docs/ReleaseNotes.md
+64-03 files

LLVM/project d19af7fllvm/utils/lit/lit TestingConfig.py

add comment

Created using spr 1.3.7
DeltaFile
+1-0llvm/utils/lit/lit/TestingConfig.py
+1-01 files

LLVM/project 3597ec5llvm/utils/lit/lit TestingConfig.py

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+1-0llvm/utils/lit/lit/TestingConfig.py
+1-01 files

LLVM/project b88cf99llvm/utils/lit/lit TestingConfig.py

add comment

Created using spr 1.3.7
DeltaFile
+1-0llvm/utils/lit/lit/TestingConfig.py
+1-01 files

LLVM/project f94a690llvm/docs Passes.rst AliasAnalysis.rst, llvm/lib/Passes PassRegistry.def

[Passes] Use consistent naming for printer passes (#198144)
DeltaFile
+5-6llvm/lib/Passes/PassRegistry.def
+4-4llvm/docs/Passes.rst
+3-3llvm/docs/AliasAnalysis.rst
+2-2llvm/test/Analysis/ValueTracking/memory-dereferenceable.ll
+2-2llvm/test/Analysis/AliasSet/saturation.ll
+1-1llvm/test/Analysis/MustExecute/const-cond.ll
+17-1829 files not shown
+45-4735 files

LLVM/project 118f69aclang/test/CodeGen/AArch64/neon perm.c, llvm/test/CodeGen/X86 vector-replicaton-i1-mask.ll avx512-calling-conv.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+1,243-8,768llvm/test/CodeGen/X86/vector-replicaton-i1-mask.ll
+1,250-1,357llvm/test/CodeGen/X86/avx512-calling-conv.ll
+203-915llvm/test/CodeGen/X86/vector-compress.ll
+158-868llvm/test/CodeGen/X86/avx512-ext.ll
+154-866llvm/test/CodeGen/X86/avx512-mask-op.ll
+492-120clang/test/CodeGen/AArch64/neon/perm.c
+3,500-12,894129 files not shown
+6,279-14,433135 files

LLVM/project b0da4e6clang/test/CodeGen/AArch64/neon perm.c, llvm/test/CodeGen/X86 vector-replicaton-i1-mask.ll avx512-calling-conv.ll

rebase

Created using spr 1.3.7
DeltaFile
+1,243-8,768llvm/test/CodeGen/X86/vector-replicaton-i1-mask.ll
+1,250-1,357llvm/test/CodeGen/X86/avx512-calling-conv.ll
+203-915llvm/test/CodeGen/X86/vector-compress.ll
+158-868llvm/test/CodeGen/X86/avx512-ext.ll
+154-866llvm/test/CodeGen/X86/avx512-mask-op.ll
+492-120clang/test/CodeGen/AArch64/neon/perm.c
+3,500-12,894129 files not shown
+6,279-14,433135 files

LLVM/project 0e20dc4clang/test/CodeGen/AArch64/neon perm.c, llvm/test/CodeGen/X86 vector-replicaton-i1-mask.ll avx512-calling-conv.ll

rebase

Created using spr 1.3.7
DeltaFile
+1,243-8,768llvm/test/CodeGen/X86/vector-replicaton-i1-mask.ll
+1,250-1,357llvm/test/CodeGen/X86/avx512-calling-conv.ll
+203-915llvm/test/CodeGen/X86/vector-compress.ll
+158-868llvm/test/CodeGen/X86/avx512-ext.ll
+154-866llvm/test/CodeGen/X86/avx512-mask-op.ll
+492-120clang/test/CodeGen/AArch64/neon/perm.c
+3,500-12,894129 files not shown
+6,279-14,433135 files

LLVM/project 4109d4fclang/test/CodeGen/AArch64/neon perm.c, llvm/test/CodeGen/X86 vector-replicaton-i1-mask.ll avx512-calling-conv.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+1,243-8,768llvm/test/CodeGen/X86/vector-replicaton-i1-mask.ll
+1,250-1,357llvm/test/CodeGen/X86/avx512-calling-conv.ll
+203-915llvm/test/CodeGen/X86/vector-compress.ll
+158-868llvm/test/CodeGen/X86/avx512-ext.ll
+154-866llvm/test/CodeGen/X86/avx512-mask-op.ll
+492-120clang/test/CodeGen/AArch64/neon/perm.c
+3,500-12,894128 files not shown
+6,278-14,427134 files

LLVM/project 7bffb5aclang/test/CodeGen/AArch64/neon perm.c, llvm/test/CodeGen/X86 vector-replicaton-i1-mask.ll avx512-calling-conv.ll

rebase

Created using spr 1.3.7
DeltaFile
+1,243-8,768llvm/test/CodeGen/X86/vector-replicaton-i1-mask.ll
+1,250-1,357llvm/test/CodeGen/X86/avx512-calling-conv.ll
+203-915llvm/test/CodeGen/X86/vector-compress.ll
+158-868llvm/test/CodeGen/X86/avx512-ext.ll
+154-866llvm/test/CodeGen/X86/avx512-mask-op.ll
+492-120clang/test/CodeGen/AArch64/neon/perm.c
+3,500-12,894128 files not shown
+6,278-14,427134 files

LLVM/project a1476d8llvm/lib/Target/X86 X86ISelLowering.cpp

[NFC][X86] shouldUseHorizontalOp - constify SelectionDAG argument (#198185)

Noticed while working on cleaning up VECREDUCE_ADD handling
DeltaFile
+1-1llvm/lib/Target/X86/X86ISelLowering.cpp
+1-11 files

LLVM/project 5ea28b0clang/include/clang/CIR MissingFeatures.h, clang/include/clang/CIR/Dialect/IR CIROps.td

[CIR] Support reference type of non-record ptr in InitCatchParam (#195722)

Support init reference type of non-record ptr type in InitCatchParam
DeltaFile
+147-0clang/test/CIR/CodeGen/try-catch.cpp
+28-7clang/lib/CIR/Dialect/Transforms/EHABILowering.cpp
+17-7clang/lib/CIR/CodeGen/CIRGenException.cpp
+4-1clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+2-2clang/include/clang/CIR/Dialect/IR/CIROps.td
+1-0clang/include/clang/CIR/MissingFeatures.h
+199-176 files

LLVM/project 30e950fflang/include/flang/Parser parse-tree.h, flang/lib/Parser openmp-parsers.cpp

[flang][OpenMP] Rename some "construct" AST nodes to directives, NFC (#198196)

Change
  OpenMPAssumeConstruct    -> OmpAssumeDirective
  OpenMPDeclarativeAssumes -> OmpAssumesDirective
  OpenMPSectionConstruct   -> OmpSectionDirective
DeltaFile
+10-11flang/include/flang/Parser/parse-tree.h
+9-9flang/test/Parser/OpenMP/sections.f90
+7-7flang/test/Parser/OpenMP/assumption.f90
+7-7flang/lib/Parser/openmp-parsers.cpp
+6-6flang/lib/Semantics/resolve-directives.cpp
+5-5flang/lib/Semantics/check-omp-structure.cpp
+44-4510 files not shown
+66-6816 files

LLVM/project ae0ed3eflang/include/flang/Parser parse-tree.h, flang/lib/Lower/OpenMP OpenMP.cpp

[flang][OpenMP] Rename some "construct" AST nodes to directives, NFC

Change
  OpenMPAssumeConstruct    -> OmpAssumeDirective
  OpenMPDeclarativeAssumes -> OmpAssumesDirective
  OpenMPSectionConstruct   -> OmpSectionDirective
DeltaFile
+10-11flang/include/flang/Parser/parse-tree.h
+9-9flang/test/Parser/OpenMP/sections.f90
+7-7flang/test/Parser/OpenMP/assumption.f90
+7-7flang/lib/Parser/openmp-parsers.cpp
+6-6flang/lib/Semantics/resolve-directives.cpp
+5-5flang/lib/Lower/OpenMP/OpenMP.cpp
+44-4510 files not shown
+66-6816 files

LLVM/project 5d51698llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/PhaseOrdering/X86 avg.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+31-42llvm/test/Transforms/PhaseOrdering/X86/avg.ll
+25-24llvm/test/Transforms/SLPVectorizer/X86/gathered-loads-non-full-reg.ll
+17-0llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+6-10llvm/test/Transforms/SLPVectorizer/buildvector-nodes-dependency.ll
+3-7llvm/test/Transforms/SLPVectorizer/X86/complex-fma-combine.ll
+82-835 files