[all-commits] [llvm/llvm-project] aa3dac: [LoopIdiom] 'logical right shift until zero': the ...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Mon May 24 02:15:54 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aa3dac95edbfb892b6236341b431b222f7bd0926
      https://github.com/llvm/llvm-project/commit/aa3dac95edbfb892b6236341b431b222f7bd0926
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-05-24 (Mon, 24 May 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
    M llvm/test/Transforms/LoopIdiom/X86/logical-right-shift-until-zero.ll

  Log Message:
  -----------
  [LoopIdiom] 'logical right shift until zero': the value must be loop-invariant

As per the reproducer provided by Mikael Holmén in post-commit review.


  Commit: 32bee42719ad8f0d8e15b55dd5b2a7563a817e34
      https://github.com/llvm/llvm-project/commit/32bee42719ad8f0d8e15b55dd5b2a7563a817e34
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-05-24 (Mon, 24 May 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp

  Log Message:
  -----------
  [NFCI][LoopIdiom] 'left-shift until bittest': assert that BaseX is loop-invariant

Given that BaseX is an incoming value when coming from the preheader,
it *should* be loop-invariant, but let's just document this assumption.


Compare: https://github.com/llvm/llvm-project/compare/0f140ce33d64...32bee42719ad


More information about the All-commits mailing list