[PATCH] D82474: [VectorCombine] try to form vector compare and binop to eliminate scalar ops

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 28 09:43:50 PDT 2020


spatel marked an inline comment as done.
spatel added a subscriber: ctetreau.
spatel added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VectorCombine.cpp:561
+                                                    : Instruction::ICmp;
+  auto *VecTy = cast<VectorType>(X->getType());
+  int OldCost = TTI.getVectorInstrCost(Ext0->getOpcode(), VecTy, Index0);
----------------
RKSimon wrote:
> cast<FixedVectorType> (maybe a dyn_cast<>) ?
Yes, I think dyn_cast with early return here - D82056 is trying to clean this up in similar existing code. cc @ctetreau  


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

https://reviews.llvm.org/D82474





More information about the llvm-commits mailing list