[PATCH] D77033: [Legalizer] Workaround for scalarizing unary strict-fp ops

Qiu Chaofan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 04:18:47 PDT 2020


qiucf added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:229
+                         DAG.getVectorIdxConstant(0, dl));
+    }
+    Opers[1] = Oper;
----------------
craig.topper wrote:
> qiucf wrote:
> > cameron.mcinally wrote:
> > > Can this if-else be rolled into the generic loop below? Or is there a reason that's not ok?
> > That's because every strict-fp operation will have extra operand at first position for chain. While `ScalarizeVecRes_UnaryOp` just takes the first operand.
> The generic loop below skips the first operand so we should just be able to put this getTypeAction and EXTRACT_VECTOR_ELT handling into that loop.
Thanks for reminder! I misunderstood the comment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77033





More information about the llvm-commits mailing list