[PATCH] D126957: [SVE] Fix incorrect code generation for bitcasts of unpacked vector types.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 3 10:58:14 PDT 2022


efriedma added a comment.

The "correct" expansion isn't too tricky. First, compute "packed" types for the source and destination. Then just insert_subvector into the packed source, bitcast to the packed destination, then extract_subvector.  Should optimize to one or two instructions once we lower the insert_subvector/extract_subvector into shuffles.  Not that I'm really against the current version, but if we're going to end up rewriting this code anyway, might as well do it now.

Should we add an assertion to getSVESafeBitCast() that we aren't performing a bitcast like this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126957



More information about the llvm-commits mailing list