[PATCH] D49806: [FPEnv] Widen illegal width StrictFP vector operations as needed

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 25 10:40:02 PDT 2018


craig.topper added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:2579
+  EVT VT = WidenVT;
+  unsigned NumElts =  VT.getVectorNumElements();
+  while (!TLI.isTypeLegal(VT) && NumElts != 1) {
----------------
There's an extra space after the equal sign.


================
Comment at: lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:2607
+    if (Oper.getValueType().isVector())
+      Oper = GetWidenedVector(N->getOperand(i));
+
----------------
Add an assert here that the operand VT matches the destination VT when we call GetWidenedVector?


================
Comment at: lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:2634
+      EVT OperVT[] = {VT, MVT::Other};
+      Oper = DAG.getNode(Opcode, dl, OperVT, EOps);
+      ConcatOps[ConcatEnd++] = Oper;
----------------
Declare Oper here instead of above.


================
Comment at: lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:2663
+        EVT WidenVT[] = {WidenEltVT, MVT::Other}; 
+        Oper = DAG.getNode(Opcode, dl, WidenVT, EOps);
+        ConcatOps[ConcatEnd++] = Oper;
----------------
Declare Oper here.


================
Comment at: lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:2679
+
+  // Check to see if we have a single operation with the widen type.
+  if (ConcatEnd == 1) {
----------------
Is the code from here an exact copy/paste from the other function? Can we add a shared helper function?


Repository:
  rL LLVM

https://reviews.llvm.org/D49806





More information about the llvm-commits mailing list