LLVM/project 710bb33llvm/test/CodeGen/AMDGPU/GlobalISel fdiv.f32.ll

AMDGPU: Remove dead check prefixes from test
DeltaFile
+0-60llvm/test/CodeGen/AMDGPU/GlobalISel/fdiv.f32.ll
+0-601 files

LLVM/project 7bc05a8libcxx/docs/Status Cxx2cIssues.csv, libcxx/test/std/utilities/optional/optional.specalg swap.pass.cpp

[libc++] Resolve LWG4439 and LWG4300 (#174257)

Resolves #171340 implemented in #155202

Resolves #171402 implemented in #155202

- Add `swap` test for `optional<T&>` to ensure an ADL-found swap isn't
selected.
- Drive-by: Update documentation for LWG4300 since it's already
completed
DeltaFile
+38-0libcxx/test/std/utilities/optional/optional.specalg/swap.pass.cpp
+2-2libcxx/docs/Status/Cxx2cIssues.csv
+40-22 files

LLVM/project 75432cellvm/include/llvm/IR Intrinsics.td, llvm/include/llvm/Transforms/Instrumentation LowerAllowCheckPass.h

[LowerAllowCheck] Add llvm.allow.sanitize.* intrinsics (#172029)

Add new intrinsics:
  - llvm.allow.sanitize.address
  - llvm.allow.sanitize.thread
  - llvm.allow.sanitize.memory
  - llvm.allow.sanitize.hwaddress

These intrinsics return true if the corresponding sanitizer is enabled
for the function, and false otherwise. They are lowered by
LowerAllowCheckPass to constant booleans based on the corresponding
sanitize_* function attributes. LowerAllowCheckPass is now "required" to
run on functions with optnone to ensure correct lowering at O0.

The LowerAllowCheckPass already performs similar duties for
@llvm.allow.runtime.check and @llvm.allow.ubsan.check, although with
subtly different semantics (based on profiles and/or sampling). In this
case, we want to make the true/false decision based on if any one of
address/memory/thread sanitization is enabled.
DeltaFile
+53-20llvm/lib/Transforms/Instrumentation/LowerAllowCheckPass.cpp
+70-0llvm/test/Transforms/LowerAllowCheck/sanitize-check.ll
+14-0llvm/include/llvm/IR/Intrinsics.td
+2-0llvm/include/llvm/Transforms/Instrumentation/LowerAllowCheckPass.h
+139-204 files

LLVM/project d953c36llvm/lib/Analysis InstructionSimplify.cpp, llvm/test/Transforms/InstCombine select-cmp.ll

[Instcombine] Fold select of ucmp/scmp (#168505)

Folds `select(icmp(eq, X, Y), 0, llvm.cmp(X, Y))` -> `llvm.cmp(X, Y)`
for `llvm.ucmp` and `llvm.scmp`.

Alive Proof: https://alive2.llvm.org/ce/z/sPJhgr

Closes https://github.com/llvm/llvm-project/issues/166579
DeltaFile
+92-0llvm/test/Transforms/InstCombine/select-cmp.ll
+17-0llvm/lib/Analysis/InstructionSimplify.cpp
+109-02 files

LLVM/project 8d879edlibcxx/include/__flat_map flat_map.h flat_multimap.h, libcxx/test/std/containers/container.adaptors/flat.map robust_against_nonbool.compile.pass.cpp

[libc++] Make sure `flat_{multi}map::key_compare` handle `boolean-testable` correctly (#132621)

This is sibling of
[#69378](https://github.com/llvm/llvm-project/pull/69378).

---------

Co-authored-by: Hui Xie <hui.xie1990 at gmail.com>
Co-authored-by: A. Jiang <de34 at live.cn>
DeltaFile
+51-0libcxx/test/std/containers/container.adaptors/flat.map/robust_against_nonbool.compile.pass.cpp
+47-0libcxx/test/std/containers/container.adaptors/flat.multimap/robust_against_nonbool.compile.pass.cpp
+2-2libcxx/include/__flat_map/flat_map.h
+1-1libcxx/include/__flat_map/flat_multimap.h
+101-34 files

LLVM/project 19358calibcxx/include/__flat_set flat_set.h, libcxx/test/std/containers/container.adaptors/flat.multiset robust_against_nonbool.compile.pass.cpp

[libc++] Make sure `flat_set::key_compare` handle `boolean-testable` correctly (#132622)

Also add test for `flat_multiset` to avoid regression.

---------

Co-authored-by: Hui Xie <hui.xie1990 at gmail.com>
Co-authored-by: A. Jiang <de34 at live.cn>
DeltaFile
+44-0libcxx/test/std/containers/container.adaptors/flat.multiset/robust_against_nonbool.compile.pass.cpp
+44-0libcxx/test/std/containers/container.adaptors/flat.set/robust_against_nonbool.compile.pass.cpp
+1-1libcxx/include/__flat_set/flat_set.h
+89-13 files

LLVM/project 8663c30llvm/lib/Target/X86 X86ISelLowering.cpp

[X86] Cleanup uses of "(BW-1) - LOG2(C)" --> "CLZ(C)" instead. NFC. (#174167)

We know in both cases that the value `C` is a power-of-2 constant, so we
know the "(BW-1) - LOG2(C)" can be more obviously represented as
"CLZ(C)".

In both places it occurs it also makes it much easier to understand
what's being done: shift the single masked bit up to the MSB and then
use SRA to splat it to all bits.
DeltaFile
+3-4llvm/lib/Target/X86/X86ISelLowering.cpp
+3-41 files

LLVM/project ce3dafellvm/test/Transforms/LoopVectorize vector-loop-backedge-elimination-early-exit.ll

update test Transforms/LoopVectorize/vector-loop-backedge-elimination-early-exit.ll
DeltaFile
+3-3llvm/test/Transforms/LoopVectorize/vector-loop-backedge-elimination-early-exit.ll
+3-31 files

LLVM/project 800c3b4clang/test/Headers __clang_hip_math.hip, llvm/lib/IR Instructions.cpp

Revert "Revert 159f1c048e08a8780d92858cfc80e723c90235e3 (#173893)"

This reverts commit 86b9f90b9574b3a7d15d28a91f6316459dcfa046.
DeltaFile
+81-88llvm/test/Transforms/DFAJumpThreading/dfa-unfold-select.ll
+22-22clang/test/Headers/__clang_hip_math.hip
+17-24llvm/lib/IR/Instructions.cpp
+18-18llvm/test/Transforms/LoopVectorize/single_early_exit_live_outs.ll
+15-17llvm/test/Transforms/DFAJumpThreading/dfa-jump-threading-transform.ll
+12-12llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll
+165-18167 files not shown
+316-34373 files

LLVM/project 9b8addfllvm/lib/Transforms/Utils CloneFunction.cpp

[CloneFunction] Fix non-deterministic PHI cleanup using PHINode::removeIncomingValueIf() (#173975)

Previously, we use `std::map<BasicBlock *, unsigned> PredCount` to track
excess incoming blocks and removed them one by one using
`removeIncomingValue`.

Since `PredCount` use `BasicBlock *` as key, the iteration order depends
on the memory addresses of the blocks. With
`PHINode::removeIncomingValue()` changed to use the swapping strategy,
the order in which operands are removed affects the final order of the
remaining operands in the PHI node. This will cause non-determinism in
compiles.

This patch uses `PHINode::removeIncomingValueIf()` to remove invalid
incoming blocks that no longer go to `NewBB` block, fixes the
non-determinism.
DeltaFile
+18-12llvm/lib/Transforms/Utils/CloneFunction.cpp
+18-121 files

LLVM/project 465d11elibcxx/docs/Status Cxx2cIssues.csv, libcxx/include optional

[libc++] LWG3627: Inconsistent specifications for `std::make_optional` overloads (#173466)

It should be sufficient to use `is_constructible_v<decay_t<T>, T>` in
the constraints, because the `const optional<U>&`/`optional<U>&&`
constructors are sufficiently constrained.

Drive-by: Refactor
`libcxx/test/std/utilities/optional/optional.specalg/make_optional.pass.cpp`
to run more cases during constant evaluation.
DeltaFile
+70-31libcxx/test/std/utilities/optional/optional.specalg/make_optional.pass.cpp
+2-1libcxx/include/optional
+1-1libcxx/docs/Status/Cxx2cIssues.csv
+73-333 files

LLVM/project 56905bellvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-exp.ll

InstCombine: Positive normal exp results imply possible negative normal inputs (#174273)

Fix mishandling exp where the result is known to only be a negative
normal.
DeltaFile
+13-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-exp.ll
+2-1llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+15-12 files

LLVM/project e4414a4llvm/docs Vectorizers.rst

[LV][doc] Update and extend the docs on floating-point reduction vectorization (#172809)

The docs for reduction vectorization currently say that

> We support floating point reduction operations when -ffast-math is
used.

This is outdated, as there are now cases where floating-point reductions
are vectorized even without -ffast-math, through ordered reduction.
This PR updates the documentation for reduction vectorization, noting
that that AArch64 and RISC-V default to ordered FP reductions being
permitted. Furthermore, an explanation of why the vectorization of FP
reduction is such a special case is added to the docs.

---------

Co-authored-by: GYT <tiborgyri at gmail.com>
Co-authored-by: Florian Hahn <flo at fhahn.com>
DeltaFile
+13-1llvm/docs/Vectorizers.rst
+13-11 files

LLVM/project 00fdb29llvm/lib/Analysis ValueTracking.cpp

ValueTracking: Avoid unnecessary denormal mode lookup for fadd (#174272)

The mode was already queried, so don't do it again.
DeltaFile
+4-8llvm/lib/Analysis/ValueTracking.cpp
+4-81 files

LLVM/project 5cbc6a6llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor nofpclass.ll

ValueTracking: Improve handling of fadd in computeKnownFPClass. (#174123)

This already recognized that if both inputs are positive, the
result is positive. Extend this to the mirror situation with
negative inputs.

Also special case fadd x, x. Canonically, fmul x, 2 is fadd x, x.
We can tell the sign bit won't change, and 0 will propagate.
DeltaFile
+25-25llvm/test/Transforms/Attributor/nofpclass.ll
+24-4llvm/lib/Analysis/ValueTracking.cpp
+49-292 files

LLVM/project 30e88femlir/include/mlir/Interfaces ControlFlowInterfaces.h ControlFlowInterfaces.td, mlir/lib/Dialect/SCF/IR SCF.cpp

[mlir][draft] Consolidate patterns into RegionBranchOpInterface patterns

fix some tests

reorganize code
DeltaFile
+17-813mlir/lib/Dialect/SCF/IR/SCF.cpp
+496-0mlir/lib/Interfaces/ControlFlowInterfaces.cpp
+11-13mlir/test/Dialect/SCF/canonicalize.mlir
+9-0mlir/include/mlir/Interfaces/ControlFlowInterfaces.h
+4-4mlir/test/Transforms/remove-dead-values.mlir
+5-0mlir/include/mlir/Interfaces/ControlFlowInterfaces.td
+542-8306 files

LLVM/project f727163llvm/test/CodeGen/AMDGPU fminnum.ll fmaxnum.ll

AMDGPU: Remove some unnecessary callsite attributes from tests (#174270)

DeltaFile
+9-9llvm/test/CodeGen/AMDGPU/fminnum.ll
+6-6llvm/test/CodeGen/AMDGPU/fmaxnum.ll
+2-2llvm/test/CodeGen/AMDGPU/fneg-combines.ll
+2-2llvm/test/CodeGen/AMDGPU/fneg-combines.f16.ll
+2-2llvm/test/CodeGen/AMDGPU/fneg-combines.new.ll
+1-1llvm/test/CodeGen/AMDGPU/mul24-pass-ordering.ll
+22-226 files

LLVM/project 612ca55llvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-exp.ll

InstCombine: Positive normal exp results imply possible negative normal inputs

Fix mishandling exp where the result is known to only be a positive normal,
but the input is only known to be negative.
DeltaFile
+13-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-exp.ll
+2-1llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+15-12 files

LLVM/project abdf646mlir/include/mlir/Interfaces ControlFlowInterfaces.h ControlFlowInterfaces.td, mlir/lib/Dialect/SCF/IR SCF.cpp

[mlir][draft] Consolidate patterns into RegionBranchOpInterface patterns

fix some tests

reorganize code
DeltaFile
+17-813mlir/lib/Dialect/SCF/IR/SCF.cpp
+487-0mlir/lib/Interfaces/ControlFlowInterfaces.cpp
+11-13mlir/test/Dialect/SCF/canonicalize.mlir
+9-0mlir/include/mlir/Interfaces/ControlFlowInterfaces.h
+4-4mlir/test/Transforms/remove-dead-values.mlir
+5-0mlir/include/mlir/Interfaces/ControlFlowInterfaces.td
+533-8306 files

LLVM/project 0aa519bllvm/test/Verifier token1-without-asserts.ll token1-with-asserts.ll

Verifier: Fix duplicated test with asserts and !asserts (#174271)

The same test content was duplicated for asserts and !asserts
builds, but the behavior is the same either way.
DeltaFile
+0-12llvm/test/Verifier/token1-without-asserts.ll
+0-12llvm/test/Verifier/token1-with-asserts.ll
+11-0llvm/test/Verifier/token1.ll
+1-2llvm/test/Verifier/tokenlike1-without-asserts.ll
+12-264 files

LLVM/project c857e4cllvm/test/Verifier token1-without-asserts.ll token1-with-asserts.ll

Verifier: Fix duplicated test with asserts and !asserts

The same test content was duplicated for asserts and !asserts
builds, but the behavior is the same either way.
DeltaFile
+0-12llvm/test/Verifier/token1-without-asserts.ll
+0-12llvm/test/Verifier/token1-with-asserts.ll
+11-0llvm/test/Verifier/token1.ll
+1-2llvm/test/Verifier/tokenlike1-without-asserts.ll
+12-264 files

LLVM/project cfd3beallvm/lib/Analysis ValueTracking.cpp

ValueTracking: Avoid unnecessary denormal mode lookup for fadd

The mode was already queried, so don't do it again.
DeltaFile
+4-8llvm/lib/Analysis/ValueTracking.cpp
+4-81 files

LLVM/project 107b4d4llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor nofpclass.ll

More accurate double 0 handling
DeltaFile
+4-4llvm/test/Transforms/Attributor/nofpclass.ll
+2-1llvm/lib/Analysis/ValueTracking.cpp
+6-52 files

LLVM/project e69004bllvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor nofpclass.ll

Consider output denorm mode
DeltaFile
+6-6llvm/test/Transforms/Attributor/nofpclass.ll
+5-2llvm/lib/Analysis/ValueTracking.cpp
+11-82 files

LLVM/project 70a5cc6llvm/lib/Analysis ValueTracking.cpp

Neg 0 handling redundant
DeltaFile
+4-10llvm/lib/Analysis/ValueTracking.cpp
+4-101 files

LLVM/project 0ba8411llvm/test/CodeGen/AMDGPU fminnum.ll fmaxnum.ll

AMDGPU: Remove some unnecessary callsite attributes from tests
DeltaFile
+9-9llvm/test/CodeGen/AMDGPU/fminnum.ll
+6-6llvm/test/CodeGen/AMDGPU/fmaxnum.ll
+2-2llvm/test/CodeGen/AMDGPU/fneg-combines.f16.ll
+2-2llvm/test/CodeGen/AMDGPU/fneg-combines.ll
+2-2llvm/test/CodeGen/AMDGPU/fneg-combines.new.ll
+1-1llvm/test/CodeGen/AMDGPU/mul24-pass-ordering.ll
+22-226 files

LLVM/project 44a7552llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor nofpclass.ll

ValueTracking: Improve handling of fadd in computeKnownFPClass.

This already recognized that if both inputs are positive, the
result is positive. Extend this to the mirror situation with
negative inputs.

Also special case fadd x, x. Canonically, fmul x, 2 is fadd x, x.
We can tell the sign bit won't change, and 0 will propagate.
DeltaFile
+29-29llvm/test/Transforms/Attributor/nofpclass.ll
+24-4llvm/lib/Analysis/ValueTracking.cpp
+53-332 files

LLVM/project c3a3151llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor nofpclass.ll

Check isGuaranteedNotToBeUndef
DeltaFile
+6-4llvm/lib/Analysis/ValueTracking.cpp
+2-2llvm/test/Transforms/Attributor/nofpclass.ll
+8-62 files

LLVM/project 3d3093ellvm/test/Transforms/Attributor nofpclass.ll

ValueTracking: Add more baseline tests for computeKnownPPClass of fadd (#174122)

Test cases with fadd x, x. Also test cases where both inputs are known
negative.
DeltaFile
+754-106llvm/test/Transforms/Attributor/nofpclass.ll
+754-1061 files

LLVM/project e1d7735llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 combine-ptest-256.ll

[X86] combinePTESTCC - always prefer TESTPS/D to PTEST on AVX (#174097)

If the elements are sign-bit splats AVX targets can always use TESTPS/D directly, potentially allowing further simplification.

Many Intel targets have slightly lower tp/uops requirements for TESTPS/D vs PTEST - AMD is neutral.

Fixes the AVX1 `testz(ashr(X,bw-1),-1)` codegen for the `okD` testcase from #156233
DeltaFile
+7-19llvm/test/CodeGen/X86/combine-ptest-256.ll
+10-8llvm/lib/Target/X86/X86ISelLowering.cpp
+17-272 files