[all-commits] [llvm/llvm-project] bec718: [SCEVExpander] Don't use recursive expansion for p...

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Feb 7 02:31:13 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bec7181d5b9d1828129d78d440fd9e02d5cb63e8
      https://github.com/llvm/llvm-project/commit/bec7181d5b9d1828129d78d440fd9e02d5cb63e8
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-02-07 (Wed, 07 Feb 2024)

  Changed paths:
    M llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
    A llvm/test/Transforms/LoopIdiom/pr80954.ll

  Log Message:
  -----------
  [SCEVExpander] Don't use recursive expansion for ptr IV inc

Similar to the non-ptr case, directly create the getelementptr
instruction. Going through expandAddToGEP() no longer makes sense
with opaque pointers, where generating the necessary instruction
is trivial.

This avoids recursive expansion of (the SCEV of) StepV while the
IR is in an inconsistent state, in particular with an incomplete
IV phi node, which utilities may not be prepared to deal with.

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




More information about the All-commits mailing list