[PATCH] D49806: [FPEnv] Widen illegal width StrictFP vector operations as needed
Cameron McInally via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 25 10:14:20 PDT 2018
cameron.mcinally added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:2716
+ // Vector type, create a CONCAT_VECTORS of type NextVT
+ SDValue undefVec = DAG.getUNDEF(VT);
+ unsigned OpsToConcat = NextSize/VT.getVectorNumElements();
----------------
craig.topper wrote:
> Is widening with undef safe for a strict instruction?
No, it's not safe to insert undef values into a strict instruction, but I don't think that's what this code is doing.
Maybe I'm misunderstanding this code, but I believe this is performing the original operation at a smaller legal width(s) and then concat'ing the result of the operation(s) with undef values to the next largest legal vector type. That should be fine since it won't introduce a trap that did not exist in the user's code.
Repository:
rL LLVM
https://reviews.llvm.org/D49806
More information about the llvm-commits
mailing list