[PATCH] D129476: [AArch64][SVE] Prefer SIMD&FP variant of clast[ab]

Cullen Rhodes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 06:59:14 PDT 2022


c-rhodes added a comment.

In D129476#3643382 <https://reviews.llvm.org/D129476#3643382>, @efriedma wrote:

> Are you saying that it's faster to use clasta targeting a float register, then move the result to an integer register, rather than use the integer form directly?  Or is the issue just that we want to split the operations in case we can simplify the resulting bitcast?

The former, for the most part. If clast[ab] is inside a loop and is a loop-carried dependency it's considerably faster. If it's a straight bitcast-to-fp + clast[ab] + bitcast-to-int then that costs a cycle or two more depending on the micro-architecture, but in slightly more complicated code from what I've observed the SIMD&FP with bitcasts is as fast as the integer variant, if not faster.

> Do we expect SelectionDAG to combine a clasta+bitcast to a single instruction?  Do we have test coverage for that?

No, there'll be a mov to an integer register.


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

https://reviews.llvm.org/D129476



More information about the llvm-commits mailing list