[all-commits] [llvm/llvm-project] fd7df1: [GVN] Preserve vectorization opportunities when PR...

Tomas Matheson via All-commits all-commits at lists.llvm.org
Mon Sep 28 10:48:43 PDT 2026


  Branch: refs/heads/users/tommat01/dereferenceable2
  Home:   https://github.com/llvm/llvm-project
  Commit: fd7df11fb45b29f7a737960e5330960de9082cd6
      https://github.com/llvm/llvm-project/commit/fd7df11fb45b29f7a737960e5330960de9082cd6
  Author: Tomas Matheson <tomas.matheson at arm.com>
  Date:   2026-09-28 (Mon, 28 Sep 2026)

  Changed paths:
    M llvm/lib/Transforms/Scalar/GVN.cpp
    A llvm/test/Transforms/GVN/PRE/loop-load-pre-vectorization.ll

  Log Message:
  -----------
  [GVN] Preserve vectorization opportunities when PREing loop loads

Loop load PRE can replace an invariant-address load with a loop-carried
PHI and conditional reload after a may-alias store. That scalar recurrence
can prevent vectorization even when runtime alias checks could disambiguate
the original accesses. Subsequent full unrolling then expands scalar code.

Conservatively preserve the header load in innermost loops whose clobber
is a conditional may-alias store through a varying pointer. Keep existing
PRE behavior for invariant-address clobbers, known aliasing, calls, ordered
memory operations, and loops with vectorization disabled or completed.
This is an opportunity heuristic, not a vectorization legality proof.



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