[PATCH] D99718: [LoopVectorize] Simplify scalar cost calculation in getInstructionCost

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 19 10:06:50 PDT 2021


ctetreau added a comment.

> I'm not sure I follow why the logic would be far too complicated for an assert? There are asserts that verify the whole dominator tree or the whole function, which seems much more complicated :) Also, IIUC the assert caught a case that was missing from the comment/explanation in the initial patch, so it seems like it was doing what it was supposed to be?

I agree. If you don't want a huge complicated expression inside of an assert, you could write a function that does the asserting, and guard it with NDEBUG so it is only included if asserts are enabled.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99718



More information about the llvm-commits mailing list