[PATCH] D126439: [LegalizeTypes][VP] Add widen and split support for vp.fptrunc and vp.fpext
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 1 00:10:49 PDT 2022
frasercrmck accepted this revision.
frasercrmck added a comment.
This revision is now accepted and ready to land.
LGTM. As pointed out I think `WidenVecRes_Convert` needs some extra attention to cover the missing cases for VP nodes, but we're already using it for `VP_TRUNCATE` so that could be done as a follow-up.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:3781
case ISD::ANY_EXTEND:
+ case ISD::VP_FP_EXTEND:
case ISD::FP_EXTEND:
----------------
This is really nitpicky but why is VP_FP_EXTEND before FP_EXTEND but VP_FP_FOUND is after FP_FOUND?
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:3793
case ISD::ZERO_EXTEND:
Res = WidenVecRes_Convert(N);
break;
----------------
Looking at `WidenVecRes_Convert` it seems like it's possible VP operations to silently fall through some cracks we haven't covered. Should we add a few asserts to the cases we haven't handled? I'm thinking the scalar unroll code, which would silently drop the mask/evl (I think) and the case above it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126439/new/
https://reviews.llvm.org/D126439
More information about the llvm-commits
mailing list