[PATCH] D87700: [SVE] Replace / operator in TypeSize/ElementCount with coefficientDiv

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 09:25:49 PDT 2020


ctetreau added a comment.

I'm not in love with the `halve` function. I count 8 places where it's used in real code in this patch, which really isn't that much. I think having it in there will establish a precedent and encourage people to add a million "common case" helpers (why not double? quarter/quadruple? next/prev power of 2?) for constructing different sized ElementCounts.

Really, `EC.halve()` isn't that much less verbose than `EC.coefficientDiv(2)`, and I suspect it will usually appear on its own line as an assignment since VectorType already has `getHalfElementsVectorType`.


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

https://reviews.llvm.org/D87700



More information about the llvm-commits mailing list