LLVM/project b6d48dc — llvm/test/CodeGen/AMDGPU memintrinsic-unroll.ll amdgcn.bitcast.832bit.ll

Rebase, improvements

Created using spr 1.3.7
DeltaFile
+88,705-91,244llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+25,383-26,405llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+9,311-9,381llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+8,998-9,209llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+8,016-8,194llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.832bit.ll
+7,335-7,432llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+147,748-151,8656,530 files not shown
+545,020-383,8136,536 files

LLVM/project d02b4b8 — offload/plugins-nextgen/amdgpu/src rtl.cpp

use sizeof
DeltaFile
+2-1offload/plugins-nextgen/amdgpu/src/rtl.cpp
+2-11 files

LLVM/project 7c3ae84 — llvm/lib/CodeGen StackColoring.cpp, llvm/test/CodeGen/AArch64 stack-coloring-alignment.ll

[StackColoring] Update IR when merging stack slots of differing alignment (#237412)
DeltaFile
+33-0llvm/test/CodeGen/AArch64/stack-coloring-alignment.ll
+4-0llvm/lib/CodeGen/StackColoring.cpp
+37-02 files

LLVM/project 15b43f2 — clang/lib/StaticAnalyzer/Checkers Iterator.cpp IteratorModeling.cpp, clang/test/Analysis iterator-concrete-offset.cpp

[analyzer] Reject non-symbolic iterator offsets in alpha iterator checkers (#232622)

`evalBinOp()` can return a concrete value for a constrained iterator
offset. Storing `getAsSymbol()` from that result leaves a null offset in
the model, which is later dereferenced.

Return failure for non-symbolic results and let `++`/`--` fall back to a
fresh offset, preserving the container and the old position for postfix
results.
DeltaFile
+73-0clang/test/Analysis/iterator-concrete-offset.cpp
+32-22clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp
+11-6clang/lib/StaticAnalyzer/Checkers/Iterator.cpp
+116-283 files

LLVM/project 7856fb6 — llvm/docs AMDGPUUsage.rst, llvm/test/CodeGen/AMDGPU amdgcn.bitcast.512bit.ll amdgcn.bitcast.1024bit.ll

Rebase

Created using spr 1.3.7
DeltaFile
+88,705-91,244llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+25,383-26,405llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+22,584-0llvm/test/CodeGen/NVPTX/load-sm90.ll
+0-22,228llvm/docs/AMDGPUUsage.rst
+21,644-0llvm/test/CodeGen/NVPTX/store-sm90.ll
+20,068-0llvm/test/CodeGen/NVPTX/load-sm60.ll
+178,384-139,8777,379 files not shown
+735,440-434,3727,385 files

LLVM/project 4fd1825 — offload/plugins-nextgen/amdgpu/src rtl.cpp

constexpr mask
DeltaFile
+3-2offload/plugins-nextgen/amdgpu/src/rtl.cpp
+3-21 files

LLVM/project 8c2b4bc — llvm/test/CodeGen/AMDGPU frem.ll amdgcn.bitcast.512bit.ll, llvm/test/CodeGen/NVPTX load-sm90.ll atomicrmw-elementwise-sm70.ll

Rebase, address comments

Created using spr 1.3.7
DeltaFile
+91,369-93,724llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+26,679-27,700llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+31,642-15,264llvm/test/CodeGen/AMDGPU/frem.ll
+31,848-0llvm/test/CodeGen/NVPTX/atomicrmw-elementwise-sm60.ll
+31,310-0llvm/test/CodeGen/NVPTX/atomicrmw-elementwise-sm70.ll
+22,584-0llvm/test/CodeGen/NVPTX/load-sm90.ll
+235,432-136,68815,375 files not shown
+1,487,304-737,32815,381 files

LLVM/project 384a71b — llvm/lib/Analysis Loads.cpp, llvm/test/Transforms/LoopVectorize load-deref-pred-align.ll

[Loads] Require step to be a multiple of alignment in isDereferenceable. (#237759)

Add missing check ensuring Step is also a multiple of the alignemnt in
isDereferenceableAndAlignedInLoop. Otherwise the loads in the loop may
not have the required alignment in all iterations.
DeltaFile
+80-0llvm/test/Transforms/LoopVectorize/load-deref-pred-align.ll
+4-3llvm/lib/Analysis/Loads.cpp
+84-32 files

LLVM/project 09a8f4e — compiler-rt/lib/asan asan_internal.h asan_interceptors.h, compiler-rt/lib/sanitizer_common sanitizer_platform_limits_posix.cpp sanitizer_mac.cpp

[compiler-rt][Darwin] Split SANITIZER_IOS into SANITIZER_IOSLIKE and SANITIZER_IOS

SANITIZER_IOS is now TARGET_OS_IOS (iOS only), while the previous
meaning (TARGET_OS_IPHONE, iOS and iOS-like) is renamed SANITIZER_IOSLIKE.

Assisted-By: Claude

rdar://191534752
DeltaFile
+17-3compiler-rt/lib/sanitizer_common/sanitizer_platform.h
+9-9compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
+2-2compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+2-2compiler-rt/lib/asan/asan_mapping.h
+1-1compiler-rt/lib/asan/asan_internal.h
+1-1compiler-rt/lib/asan/asan_interceptors.h
+32-1810 files not shown
+42-2816 files

LLVM/project 9587093 — clang/lib/Sema SemaOpenMP.cpp, clang/test/OpenMP reverse_messages.cpp for_loop_messages.cpp

[Clang][OpenMP] Fix crashes on a `braced-init-list` in the `init` or increment of a loop (#233248)

Fixes #202562

The loop analysis kept the braced-init-list of `int i = {0}` (and of `i
+= {1}`) as the bound or step as written. The loop transformations copy
the trip count through a `TreeTransform`, which rebuilds a list without
a type, so `{0} - 1` fails to build and the transform asserts. Pointer
and aggregate-iterator counters hit a related assert even under plain
`omp for`, and the IRBuilder path crashed on a braced step.

The analysis now never keeps a bare list: a list wrapping one expression
becomes that expression, an empty or class-type list becomes the
`T{...}` node Sema builds for a functional cast. The IRBuilder loop path
uses the same helper for its step.

Assisted-by : LLM tools, reviewed and tested by me.
DeltaFile
+82-0clang/test/OpenMP/unroll_messages.cpp
+36-6clang/lib/Sema/SemaOpenMP.cpp
+32-0clang/test/OpenMP/unroll_codegen_braced_init.cpp
+16-0clang/test/OpenMP/irbuilder_braced_init.cpp
+15-0clang/test/OpenMP/for_loop_messages.cpp
+8-0clang/test/OpenMP/reverse_messages.cpp
+189-61 files not shown
+191-67 files

LLVM/project e993cb6 — compiler-rt/lib/copyprof copyprof.cpp CMakeLists.txt, compiler-rt/lib/copyprof/tests copyprof_state_test.cpp

[CopyProf] Intercept new/delete and track per-object cost.

This intercepts the C++ `new` and `delete` operators, so that all
heap memory owned by a copy is tracked.

Using per-object state tracking, reports now tell the user how much
accumulated memory a copy is worth and whether it allocated.
This is useful for filtering of reports.

RFC: https://discourse.llvm.org/t/rfc-copysanitizer-csan-detecting-unneccessary-object-copies-at-runtime/91038
DeltaFile
+139-0compiler-rt/lib/copyprof/copyprof_new_delete.cpp
+102-0compiler-rt/lib/copyprof/tests/copyprof_state_test.cpp
+70-0compiler-rt/lib/copyprof/copyprof_per_object_state.cpp
+44-0compiler-rt/lib/copyprof/copyprof_per_object_state.h
+23-0compiler-rt/lib/copyprof/CMakeLists.txt
+17-5compiler-rt/lib/copyprof/copyprof.cpp
+395-57 files not shown
+440-1813 files

LLVM/project 049d35a — compiler-rt/lib/copyprof copyprof_internal.h copyprof_interceptors.cpp, compiler-rt/lib/copyprof/tests copyprof_state_test.cpp

[CopyProf] Intercept C heap functions.

A copy that owns heap memory is only unnecessary if that memory is not
modified either. This intercepts the libc heap functions and routes them
to the CopyProf allocator, which marks memory allocated while copying as
copy, and checks the shadow memory of memory freed during destruction.

Memory allocated inside a d'tor is marked as copy as well, so that
freeing temporaries does not suppress reports.

Now that `malloc` is intercepted, `strndup` and `realpath` are
intercepted as well.

RFC: https://discourse.llvm.org/t/rfc-copysanitizer-csan-detecting-unneccessary-object-copies-at-runtime/91038
DeltaFile
+197-0compiler-rt/lib/copyprof/tests/copyprof_state_test.cpp
+182-0compiler-rt/lib/copyprof/copyprof_malloc_linux.cpp
+15-4compiler-rt/lib/copyprof/copyprof_allocator.cpp
+10-8compiler-rt/lib/copyprof/copyprof_state.h
+2-7compiler-rt/lib/copyprof/copyprof_interceptors.cpp
+4-0compiler-rt/lib/copyprof/copyprof_internal.h
+410-192 files not shown
+415-198 files

LLVM/project 4ca8900 — compiler-rt/lib/copyprof copyprof.cpp CMakeLists.txt, compiler-rt/lib/copyprof/tests CMakeLists.txt copyprof_allocator_test.cpp

[CopyProf] Add standalone allocator.

Detecting modifications of heap memory owned by a copy requires hooking
all (de)allocations and knowing allocation sizes. This adds a CopyProf
specific allocator based on the sanitizer_common allocator.

It provides surrogates for the libc heap functions, which are hooked up
to interceptors in a subsequent patch.

RFC: https://discourse.llvm.org/t/rfc-copysanitizer-csan-detecting-unneccessary-object-copies-at-runtime/91038
Previous PR: #232851
DeltaFile
+312-0compiler-rt/lib/copyprof/copyprof_allocator.cpp
+227-0compiler-rt/lib/copyprof/tests/copyprof_allocator_test.cpp
+45-0compiler-rt/lib/copyprof/copyprof_allocator.h
+2-0compiler-rt/lib/copyprof/copyprof.cpp
+2-0compiler-rt/lib/copyprof/CMakeLists.txt
+1-0compiler-rt/lib/copyprof/tests/CMakeLists.txt
+589-06 files

LLVM/project 3f46fbf — compiler-rt/lib/copyprof copyprof_preinit.cpp copyprof_interceptors_memintrinsics.cpp, compiler-rt/lib/copyprof/tests copyprof_state_test.cpp copyprof_interceptors_test.cpp

[CopyProf] Add libc interceptors.

A copy is reported as unnecessary if neither the object nor any memory
it owns is modified before it is destroyed. So far, writes by
uninstrumented code, most importantly library functions (e.g. `memcpy`,
`memset`, etc.), are not accounted for, which leads to false positives.
Interceptors make these writes visible.

Additionally, objects constructed inside a d'tor are now marked as copy,
so that destroying temporaries (e.g. a string built for a log message)
does not suppress reports.

Note that `strndup` and `realpath` are not intercepted yet, as their
interceptors allocate memory via the `malloc` interceptor, which is only
added in a subsequent patch.

RFC:
https://discourse.llvm.org/t/rfc-copysanitizer-csan-detecting-unneccessary-object-copies-at-runtime/91038
Previous PR: #225905
DeltaFile
+121-0compiler-rt/lib/copyprof/tests/copyprof_interceptors_test.cpp
+80-25compiler-rt/lib/copyprof/tests/copyprof_state_test.cpp
+90-0compiler-rt/lib/copyprof/copyprof_interceptors.cpp
+64-0compiler-rt/lib/copyprof/copyprof_interceptors.h
+27-0compiler-rt/lib/copyprof/copyprof_interceptors_memintrinsics.cpp
+23-0compiler-rt/lib/copyprof/copyprof_preinit.cpp
+405-256 files not shown
+461-3312 files

LLVM/project 426c04c — compiler-rt/lib/copyprof/tests copyprof_state_test.cpp

[CopyProf][NFC] Add argument comments in state test.

Split out of #232851 as requested in review.
DeltaFile
+3-3compiler-rt/lib/copyprof/tests/copyprof_state_test.cpp
+3-31 files

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

[libc++] Implement P2545R4 Read-Copy Update (RCU) (#175451)
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
+258-0libcxx/src/experimental/rcu.cpp
+233-0libcxx/test/std/thread/saferecl/saferecl.rcu/saferecl.rcu.domain/rcu_barrier.pass.cpp
+191-0libcxx/test/benchmarks/thread/saferecl.rcu/reader_writer.bench.cpp
+1,777-045 files not shown
+3,310-2151 files

LLVM/project 0c252ba — llvm/lib/ExecutionEngine/Orc ReOptimizeLayer.cpp

[ORC] Match const void *Tag signature in orc_rt_lite_reoptimize_helper

SelfExecutorProcessControl::jitDispatchViaWrapperFunctionManager takes a const void *FnTag second parameter; using void *Tag in orc_rt_lite_reoptimize_helper's JITDispatch function pointer trips -fsanitize=cfi-icall.

This is needed to remove the `LIT_FILTER_OUT="ExecutionEngine/"` workaround in https://github.com/llvm/llvm-zorg/blob/d6d19aa00e80a00ee06119d173d1979dbeed1ab2/zorg/buildbot/builders/sanitizers/buildbot_functions.sh#L665 on https://lab.llvm.org/buildbot/#/builders/sanitizer-x86_64-linux-bootstrap-cfi and https://lab.llvm.org/buildbot/#/builders/sanitizer-aarch64-linux-bootstrap-cfi.

Assisted-by: Gemini
Pull-request: https://github.com/llvm/llvm-project/pull/237757
DeltaFile
+2-2llvm/lib/ExecutionEngine/Orc/ReOptimizeLayer.cpp
+2-21 files

LLVM/project 142ee9c — llvm/utils/sanitizers ubsan_ignorelist.txt

[cfi] Ignore cfi-icall on LLVMContext::yield and JIT calls

LLVMContextSetYieldCallback casts a C callback with a mismatched pointer type, and ExecutionEngine / JIT tools invoke runtime-generated JIT code outside the link-time CFI jump table.

This is needed to remove the `LIT_FILTER_OUT="ExecutionEngine/"` workaround in https://github.com/llvm/llvm-zorg/blob/d6d19aa00e80a00ee06119d173d1979dbeed1ab2/zorg/buildbot/builders/sanitizers/buildbot_functions.sh#L665 on https://lab.llvm.org/buildbot/#/builders/sanitizer-x86_64-linux-bootstrap-cfi and https://lab.llvm.org/buildbot/#/builders/sanitizer-aarch64-linux-bootstrap-cfi.

Assisted-by: Gemini
Pull-request: https://github.com/llvm/llvm-project/pull/237755
DeltaFile
+10-0llvm/utils/sanitizers/ubsan_ignorelist.txt
+10-01 files

LLVM/project 97b751c — llvm/lib/ExecutionEngine/Orc/TargetProcess JITLoaderPerf.cpp

[ORC] Export perf JIT loader wrapper symbols with LLVM_ALWAYS_EXPORT

PerfSupportPlugin resolves llvm_orc_registerJITLoaderPerf{Start,End,Impl} dynamically from process symbols, which fails when static executables are built with -fvisibility=hidden.

This is needed to remove the `LIT_FILTER_OUT="ExecutionEngine/"` workaround in https://github.com/llvm/llvm-zorg/blob/d6d19aa00e80a00ee06119d173d1979dbeed1ab2/zorg/buildbot/builders/sanitizers/buildbot_functions.sh#L665 on https://lab.llvm.org/buildbot/#/builders/sanitizer-x86_64-linux-bootstrap-cfi.

Assisted-by: Gemini
Pull-request: https://github.com/llvm/llvm-project/pull/237756
DeltaFile
+6-6llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderPerf.cpp
+6-61 files

LLVM/project 13b0c4a — libcxx/test/extensions/gnu/hash specializations.verify.cpp

[libc++][test] Avoid assert() in gnu/hash/specializations.verify.cpp

PR: https://github.com/llvm/llvm-project/pull/237485

Assisted-by: Gemini
DeltaFile
+1-2libcxx/test/extensions/gnu/hash/specializations.verify.cpp
+1-21 files

LLVM/project cee4b9e — llvm/include/llvm/CodeGen/GlobalISel LegalizationArtifactCombiner.h LegalizerInfo.h, llvm/lib/CodeGen/GlobalISel LegalizerInfo.cpp

[GlobalISel] Remove LegalizeActions::NotFound (#237729)

This is unused, covered nowadays by Unsupported.
DeltaFile
+1-5llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
+0-3llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
+1-1llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
+0-1llvm/unittests/CodeGen/GlobalISel/LegalizerInfoTest.cpp
+2-104 files

LLVM/project 149a32f — llvm/utils/sanitizers ubsan_ignorelist.txt

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+9-35llvm/utils/sanitizers/ubsan_ignorelist.txt
+9-351 files

LLVM/project 41a3605 — llvm/lib/ExecutionEngine/Orc/TargetProcess JITLoaderPerf.cpp

[ORC] Export perf JIT loader wrapper symbols with LLVM_ALWAYS_EXPORT

PerfSupportPlugin resolves llvm_orc_registerJITLoaderPerf{Start,End,Impl} dynamically from process symbols, which fails when static executables are built with -fvisibility=hidden.

This is needed to remove the `LIT_FILTER_OUT="ExecutionEngine/"` workaround in https://github.com/llvm/llvm-zorg/blob/d6d19aa00e80a00ee06119d173d1979dbeed1ab2/zorg/buildbot/builders/sanitizers/buildbot_functions.sh#L665 on https://lab.llvm.org/buildbot/#/builders/sanitizer-x86_64-linux-bootstrap-cfi.

Assisted-by: Gemini
Pull-request: https://github.com/llvm/llvm-project/pull/237756
DeltaFile
+6-6llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderPerf.cpp
+6-61 files

LLVM/project 5a2538d — llvm/lib/ExecutionEngine/Orc ReOptimizeLayer.cpp

[ORC] Match const void *Tag signature in orc_rt_lite_reoptimize_helper

SelfExecutorProcessControl::jitDispatchViaWrapperFunctionManager takes a const void *FnTag second parameter; using void *Tag in orc_rt_lite_reoptimize_helper's JITDispatch function pointer trips -fsanitize=cfi-icall.

This is needed to remove the `LIT_FILTER_OUT="ExecutionEngine/"` workaround in https://github.com/llvm/llvm-zorg/blob/d6d19aa00e80a00ee06119d173d1979dbeed1ab2/zorg/buildbot/builders/sanitizers/buildbot_functions.sh#L665 on https://lab.llvm.org/buildbot/#/builders/sanitizer-x86_64-linux-bootstrap-cfi and https://lab.llvm.org/buildbot/#/builders/sanitizer-aarch64-linux-bootstrap-cfi.

Assisted-by: Gemini
Pull-request: https://github.com/llvm/llvm-project/pull/237757
DeltaFile
+2-2llvm/lib/ExecutionEngine/Orc/ReOptimizeLayer.cpp
+2-21 files

LLVM/project ee84f04 — llvm/utils/sanitizers ubsan_ignorelist.txt

[cfi] Ignore cfi-icall on LLVMContext::yield and JIT calls

LLVMContextSetYieldCallback casts a C callback with a mismatched pointer type, and ExecutionEngine / JIT tools invoke runtime-generated JIT code outside the link-time CFI jump table.

This is needed to remove the `LIT_FILTER_OUT="ExecutionEngine/"` workaround in https://github.com/llvm/llvm-zorg/blob/d6d19aa00e80a00ee06119d173d1979dbeed1ab2/zorg/buildbot/builders/sanitizers/buildbot_functions.sh#L665 on https://lab.llvm.org/buildbot/#/builders/sanitizer-x86_64-linux-bootstrap-cfi and https://lab.llvm.org/buildbot/#/builders/sanitizer-aarch64-linux-bootstrap-cfi.

Assisted-by: Gemini
Pull-request: https://github.com/llvm/llvm-project/pull/237755
DeltaFile
+10-0llvm/utils/sanitizers/ubsan_ignorelist.txt
+10-01 files

LLVM/project 999b73d — llvm/test/Transforms/LoopVectorize/AArch64 invalid-costs.ll conditional-branches-cost.ll, llvm/test/Transforms/LoopVectorize/RISCV zvl1024b-crash.ll

[VPlan] Compute branch costs in VPlan. (#234377)

Compute the costs of branches in VPlan, replacing the legacy logic in
precomputeCost. We now compute the cost of branches in replicate regions
directly in VPRegionBlock::cost and VPBranchOnMaskRecipe::cost,
including the cost of the unconditional branches from the conditionally
execute block, as well between plain VPBBs (this is currently not used,
but in preparation for computing scalar costs + supporting conditional
blocks in plans).

The cost changes in tests are because we previously
* missed replicate regions (e.g. tail-folding in a loop without any
branches),
* overcounted conditional branches (e.g. because replicate regions could
be merged in VPlan, chains of conditional branches resulting in a single
replicate region)

PR: https://github.com/llvm/llvm-project/pull/234377
DeltaFile
+80-22llvm/test/Transforms/LoopVectorize/SystemZ/pr47665.ll
+74-12llvm/test/Transforms/LoopVectorize/AArch64/blend-costs.ll
+78-4llvm/test/Transforms/LoopVectorize/X86/predicate-switch.ll
+5-73llvm/test/Transforms/LoopVectorize/AArch64/conditional-branches-cost.ll
+52-1llvm/test/Transforms/LoopVectorize/AArch64/invalid-costs.ll
+23-23llvm/test/Transforms/LoopVectorize/RISCV/zvl1024b-crash.ll
+312-1358 files not shown
+450-21114 files

LLVM/project 3c71a83 — llvm/utils/sanitizers ubsan_ignorelist.txt

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+33-21llvm/utils/sanitizers/ubsan_ignorelist.txt
+33-211 files

LLVM/project 73a1ae0 — llvm/lib/Transforms/Utils ScalarEvolutionExpander.cpp, llvm/test/Transforms/SLPVectorizer/X86 runtime-alias-checks.ll

[SCEV]Keep argument casts above the insertion point (#237093)

Fixes #234975.

Assisted-by: Cursor
DeltaFile
+94-0llvm/test/Transforms/SLPVectorizer/X86/runtime-alias-checks.ll
+2-13llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
+96-132 files

LLVM/project 998c506 — llvm/lib/Transforms/Utils ControlFlowUtils.cpp, llvm/test/Transforms/FixIrreducible undef-phis.ll

[ControlFlowHub] Do not replace undef with poison in reconnectPhis (#237407)

When every value moved from a PHI into the new PHI in the first guard
block is undef or poison, reconnectPhis uses a constant instead of
creating the PHI. Since #103013 that constant has always been poison,
which is wrong when some of the values are undef: the program becomes
less defined. For example, "and i32 %p, 0" is 0 for an undef %p but
poison for a poison %p.

Use poison only if all the moved values are poison, and undef otherwise,
as before #103013.

This affects both FixIrreducible and UnifyLoopExits. The second test in
FixIrreducible/undef-phis.ll is not affected by this change yet, but
guards against fixing the self-loop handling in reconnectPhis (#232399)
without this fix: that would make all of %p's moved values undef and
replace them with poison.

Fixes #235378.

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+123-0llvm/test/Transforms/UnifyLoopExits/undef-phis.ll
+120-0llvm/test/Transforms/FixIrreducible/undef-phis.ll
+7-1llvm/lib/Transforms/Utils/ControlFlowUtils.cpp
+250-13 files

LLVM/project 9903542 — llvm/lib/Transforms/IPO AttributorAttributes.cpp

[NFC][Attributor] Reach fixpoint in call site AACallEdges for direct calls

A direct call whose callee has no callback metadata only calls its callee, so
its call site AACallEdges cannot change after initialization. Add the edge in
initialize and reach a fixpoint there, instead of updating the attribute twice
to find out. AACallEdgesFunction already skips the call site attribute for such
calls since #232616; both now share getOnlyCallee().

Other attributes still create call site AACallEdges for direct calls, e.g.,
AAInterFnReachability and the AMDGPU attributor. On a generated module with
2,001 functions and 15,986 calls, this removes all updates of call site
AACallEdges. The total number of updates goes from 304,263 to 272,291 with
-passes=attributor, from 207,815 to 175,843 with -passes=attributor-light, and
from 35,977 to 16,005 with -passes=amdgpu-attributor. The wall time does not
change measurably on that module, because these updates are cheap.

This PR was assisted by AI but I reviewed all the changes.
DeltaFile
+20-2llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+20-21 files