[all-commits] [llvm/llvm-project] 2dcf85: [LAA] Use SCEVPtrToAddr in tryToCreateDiffChecks. ...

Florian Hahn via All-commits all-commits at lists.llvm.org
Wed Feb 11 03:52:13 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2dcf858ba0db3227a186c1322be052a163fca51a
      https://github.com/llvm/llvm-project/commit/2dcf858ba0db3227a186c1322be052a163fca51a
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2026-02-11 (Wed, 11 Feb 2026)

  Changed paths:
    M llvm/lib/Analysis/LoopAccessAnalysis.cpp
    M llvm/lib/Transforms/Utils/LoopUtils.cpp
    M llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
    M llvm/test/Transforms/LoopVectorize/AArch64/conditional-branches-cost.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/epilog-vectorization-factors.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/fminimumnum.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/induction-costs-sve.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/interleaving-load-store.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/scalable-struct-return.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/sve-fixed-width-inorder-core.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/sve-fneg.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/sve-multiexit.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/sve-runtime-check-size-based-threshold.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/sve-vector-reverse.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/sve2-histcnt.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/vector-reverse.ll
    M llvm/test/Transforms/LoopVectorize/ARM/mve-multiexit.ll
    M llvm/test/Transforms/LoopVectorize/ARM/mve-qabs.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/fminimumnum.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/riscv-vector-reverse.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/strided-accesses.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-bin-unary-ops-args.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-call-intrinsics.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-cast-intrinsics.ll
    M llvm/test/Transforms/LoopVectorize/X86/fminimumnum.ll
    M llvm/test/Transforms/LoopVectorize/X86/masked_load_store.ll
    M llvm/test/Transforms/LoopVectorize/forked-pointers.ll
    M llvm/test/Transforms/LoopVectorize/fpsat.ll
    M llvm/test/Transforms/LoopVectorize/hoist-and-sink-mem-ops-with-invariant-pointers.ll
    M llvm/test/Transforms/LoopVectorize/hoist-predicated-loads.ll
    M llvm/test/Transforms/LoopVectorize/no_outside_user.ll
    M llvm/test/Transforms/LoopVectorize/pointer-select-runtime-checks.ll
    M llvm/test/Transforms/LoopVectorize/preserve-dbg-loc-and-loop-metadata.ll
    M llvm/test/Transforms/LoopVectorize/reuse-lcssa-phi-scev-expansion.ll
    M llvm/test/Transforms/LoopVectorize/runtime-check-readonly.ll
    M llvm/test/Transforms/LoopVectorize/runtime-check-small-clamped-bounds.ll
    M llvm/test/Transforms/LoopVectorize/runtime-check.ll
    M llvm/test/Transforms/LoopVectorize/runtime-checks-difference-simplifications.ll
    M llvm/test/Transforms/LoopVectorize/runtime-checks-difference.ll
    M llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll
    M llvm/test/Transforms/LoopVectorize/scalable-first-order-recurrence.ll
    M llvm/test/Transforms/LoopVectorize/scev-predicate-reasoning.ll
    M llvm/test/Transforms/LoopVectorize/struct-return.ll
    M llvm/test/Transforms/PhaseOrdering/AArch64/hoisting-sinking-required-for-vectorization.ll
    M llvm/test/Transforms/PhaseOrdering/X86/vdiv.ll

  Log Message:
  -----------
  [LAA] Use SCEVPtrToAddr in tryToCreateDiffChecks. (#178861)

The checks created by LAA only compute a pointer difference and do not
need to capture provenance. Use SCEVPtrToAddr instead of SCEVPtrToInt
for computations.

To avoid regressions while parts of SCEV are migrated to use PtrToAddr
this adds logic to rewrite all PtrToInt to PtrToAddr if possible in the
created expressions. This is needed to avoid regressions.

Similarly, if in the original IR we have a PtrToInt, SCEVExpander tries
to re-use it if possible when expanding PtrToAddr.

Depends on https://github.com/llvm/llvm-project/pull/178727.

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

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



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list