[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 11:48:18 PDT 2018
craig.topper added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:2607
+ if (Oper.getValueType().isVector())
+ Oper = GetWidenedVector(N->getOperand(i));
+
----------------
cameron.mcinally wrote:
> craig.topper wrote:
> > Add an assert here that the operand VT matches the destination VT when we call GetWidenedVector?
> That assert won't be valid for converts (yet to be added) and possibly other strict instructions.
Agreed, but the GetWidenedVector call isn't valid without that guarantee. You would need to check if the type is also supposed to be widened and if not you would have to do your own widening.
But the variable "VT" and its use in the EXTRACT_SUBVECTOR in the loop below are also wrong if the input type doesn't match the result type. Probably other things as well.
Repository:
rL LLVM
https://reviews.llvm.org/D49806
More information about the llvm-commits
mailing list