[PATCH] D102116: [LoopIdiom] 'logical right-shift until zero' ('count active bits') "on steroids" idiom recognition.

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 23 23:26:48 PDT 2021


uabelho added a comment.

Hi,

THere seems to be something problematic with this patch.
With

  opt -enable-new-pm=0 -o /dev/null bbi-56362_2.ll -loop-idiom

I get

  Instruction does not dominate all uses!
    %1 = load i16, i16* getelementptr inbounds ({ i16, i16 }, { i16, i16 }* @v_92, i32 0, i32 0), align 1
    %.numleadingzeros = call i16 @llvm.ctlz.i16(i16 %1, i1 false)
  in function main

and with

  opt -enable-new-pm=1 -o /dev/null bbi-56362_2.ll -loop-idiom

I get

  opt: ../lib/Transforms/Scalar/LoopPassManager.cpp:253: auto llvm::FunctionToLoopPassAdaptor::run(llvm::Function &, llvm::FunctionAnalysisManager &)::(anonymous class)::operator()(llvm::StringRef, llvm::Any) const: Assertion `L->isRecursivelyLCSSAForm(LAR.DT, LI) && "Loops must remain in LCSSA form!"' failed.

F17004376: bbi-56362_2.ll <https://reviews.llvm.org/F17004376>


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102116/new/

https://reviews.llvm.org/D102116



More information about the llvm-commits mailing list