[all-commits] [llvm/llvm-project] 8b8c59: [Loads] Check if Ptr can be freed between Assume a...

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Oct 7 02:15:47 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8b8c59c31f41e0a9dad4ca85fdea0f7249c251ee
      https://github.com/llvm/llvm-project/commit/8b8c59c31f41e0a9dad4ca85fdea0f7249c251ee
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2025-10-07 (Tue, 07 Oct 2025)

  Changed paths:
    M llvm/lib/Analysis/Loads.cpp
    M llvm/test/Transforms/LoopVectorize/dereferenceable-info-from-assumption-constant-size.ll
    M llvm/test/Transforms/LoopVectorize/single-early-exit-deref-assumptions.ll

  Log Message:
  -----------
  [Loads] Check if Ptr can be freed between Assume and CtxI. (#161255)

When using information from dereferenceable assumptions, we need to make
sure that the memory is not freed between the assume and the specified
context instruction. Instead of just checking canBeFreed, check if there
any calls that may free between the assume and the context instruction.

Note that this also adjusts the context instruction to be the terminator
in the loop predecessor, if there is one and it is a branch (to avoid
things like invoke).

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



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