[all-commits] [llvm/llvm-project] 92e9bd: [LoopRotate] Drop loop dispositions when rotating ...

Max Kazantsev via All-commits all-commits at lists.llvm.org
Mon Sep 19 04:01:28 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 92e9bddc49b6c7bf6c5d59d7dad4ec8255d01c20
      https://github.com/llvm/llvm-project/commit/92e9bddc49b6c7bf6c5d59d7dad4ec8255d01c20
  Author: Max Kazantsev <mkazantsev at azul.com>
  Date:   2022-09-19 (Mon, 19 Sep 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
    A llvm/test/Transforms/LoopRotate/pr56260.ll

  Log Message:
  -----------
  [LoopRotate] Drop loop dispositions when rotating loops. PR56260

This is required because if there is a pure loop-invariant instruction, Loop Rotation
may decide to not clone it and just hoist it instead. If SCEV has previously cached
that it was loop-variant (not being smart enough to prove invariance), we may end
up with inconsistent cache state (which may later trigger false-negative assertion
failures checking that something was invariant).

This is a conservative fix that unconditionally drops the dispositions. We could
only drop it if the hoisting has actually happened, but it should take some time
understanding whether it's safe with all other things this function does.

Differential Revision: https://reviews.llvm.org/D134167
Reviewed By: fhahn




More information about the All-commits mailing list