[PATCH] D42353: [Codegen] support of 'nof' flag lowering on X86 target

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 29 10:51:42 PST 2018


craig.topper added inline comments.


================
Comment at: CodeGen/SelectionDAG/LegalizeVectorOps.cpp:755
+  if (!TLI.isOperationLegalOrCustom(ISD::FDIV, DstVT)) {
+    EVT HalfVT = EVT::getVectorVT(*DAG.getContext(), EltVT, NumElts / 2);
+    DstVT = EVT::getVectorVT(*DAG.getContext(), FloatVT, NumElts);
----------------
magabari wrote:
> craig.topper wrote:
> > What guarantees HalfVT is a legal type for the target?
> In fact I did this only because as you may notice that i use wider FP types (i32 goes to f64), I assume that when we get to this function the original integer vector type is legal, so if I enlarge the FP type it may be not legal anymore. because of that i did the split.
> but in any case i think that Type legalizer should take care of that if HalfVT still not legal.
There is another type legalizer run after vector ops legalization, but it shouldn't be legalizing vector types. It's intended to legalize scalar types created by unrolling.


Repository:
  rL LLVM

https://reviews.llvm.org/D42353





More information about the llvm-commits mailing list