[PATCH] D106860: [clang][AArch64][SVE] Avoid going through memory for fixed/scalable predicate casts

Bradley Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 28 05:18:10 PDT 2021


bsmith added inline comments.


================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2110-2129
     // Perform VLAT <-> VLST bitcast through memory.
     // TODO: since the llvm.experimental.vector.{insert,extract} intrinsics
     //       require the element types of the vectors to be the same, we
     //       need to keep this around for casting between predicates, or more
     //       generally for bitcasts between VLAT <-> VLST where the element
     //       types of the vectors are not the same, until we figure out a better
     //       way of doing these casts.
----------------
c-rhodes wrote:
> With the predicate casting now using the intrinsics I don't think this is needed any longer. Perhaps we should add an unreachable above if the element type doesn't match?
Don't we still need this for casting between vectors with different element types, or are these guaranteed to not hit this code path?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106860



More information about the cfe-commits mailing list