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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 1 10:07:20 PDT 2020


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:229
+                         DAG.getVectorIdxConstant(0, dl));
+    }
+    Opers[1] = Oper;
----------------
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.


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