[PATCH] D106549: [AArch64][SVE] Combine bitcasts to predicate types with vector inserts of loads

Bradley Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 22 07:12:48 PDT 2021


bsmith created this revision.
bsmith added reviewers: paulwalker-arm, peterwaller-arm, eli.friedman, junparser.
Herald added subscribers: rogfer01, psnobl, hiraditya, kristof.beyls, tschuett.
Herald added a reviewer: efriedma.
bsmith requested review of this revision.
Herald added subscribers: llvm-commits, vkmr.
Herald added a project: LLVM.

An insert subvector that is inserting the result of a vector predicate
sized load into undef at index 0, whose result is casted to a predicate
type, can be combined into a direct predicate load.

The purpose of this optimization is to clean up cases that will be
introduced in a later patch where casts to/from predicate types from i8
types will use insert subvector, rather than going through memory early.

This optimization is done in SVEIntrinsicOpts rather than InstCombine to
re-introduce scalable loads as late as possible, to give other
optimizations the best chance possible to do a good job.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106549

Files:
  llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp
  llvm/test/CodeGen/AArch64/sve-insert-vector-to-predicate-load.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106549.360801.patch
Type: text/x-patch
Size: 9311 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210722/e72e6031/attachment.bin>


More information about the llvm-commits mailing list