[PATCH] D48809: [FPEnv] Split double width StrictFP vector operations as needed

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 2 08:47:30 PDT 2018


cameron.mcinally marked 2 inline comments as done.
cameron.mcinally added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:1082
+
+  EVT ValueVTs[] = {OpsLo[1].getValueType(), MVT::Other};
+  Lo = DAG.getNode(N->getOpcode(), dl, ValueVTs, OpsLo);
----------------
craig.topper wrote:
> craig.topper wrote:
> > You can use DAG.GetSplitDestVTs(N->getValueType(0)) to get the high and lo VTs. That's the correct way to do this.
> Though if we don't want to assume the VT of operand 1 matches the destination VT, then its also wrong to call GetSplitVector on the input operands. You would need to call getTypeAction on that VT and ensure that it's also TypeSplitVector and if its not call DAG.SplitVector instead.
Thanks, Craig. That was what I was looking for.

Good catch on the input vector types that aren't the same as the result vector type. We don't currently have any StrictFP operations that will exercise this code, but I imagine we will when the converts are added.


Repository:
  rL LLVM

https://reviews.llvm.org/D48809





More information about the llvm-commits mailing list