[PATCH] D76727: [VectorCombine] transform bitcasted shuffle to narrower elements

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 24 14:34:11 PDT 2020


spatel added a comment.

In D76727#1939961 <https://reviews.llvm.org/D76727#1939961>, @lebedev.ri wrote:

> Do we need to count the cost of bitcasts too?


Hmm...is there a scenario where the old bitcast is different in cost than the new bitcast? That op is effectively getting hoisted in the test cases shown here, so it would cancel out if we put it on both sides of the cost comparison.
The TTI API that I think we'd use for this is: TTI.getCastInstrCost(Instruction::BitCast, DestTy, SrcTy).


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

https://reviews.llvm.org/D76727





More information about the llvm-commits mailing list