[PATCH] D58419: [GISel]: Allow G_EXTRACT_VEC_ELT's result to be larger the source element type
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 20 07:09:59 PST 2019
arsenm added a comment.
I always thought this behavior in SelectionDAG was error prone. I think I broke this on every combine I ever wrote for extract_vector_elt. Should there be a separate extending opcode instead? Although that would probably make some combines more painful. In GlobalISel we already have an explicit G_BUILD_VECTOR_TRUNC instead of the old ISD::BUILD_VECTOR truncate behavior, so that would match. However I don't think G_BUILD_VECTOR_TRUNC is well developed enough to declare that was definitely a good decision yet.
================
Comment at: lib/CodeGen/MachineVerifier.cpp:1276
+ report("Generic G_EXTRACT_VECTOR_ELT's dst should be scalar/pointer", MI);
+ if (DstTy.isPointer() && DstTy != SrcTy.getElementType())
+ report("Generic G_EXTRACT_VECTOR_ELT's dst and src should match when "
----------------
braces
================
Comment at: lib/CodeGen/MachineVerifier.cpp:1281
+ if (DstTy.isScalar() && SrcTy.isVector() &&
+ DstTy.getSizeInBits() < SrcTy.getElementType().getSizeInBits())
+ report("Generic G_EXTRACT_VECTOR_ELT's dst can't be smaller than src "
----------------
braces
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58419/new/
https://reviews.llvm.org/D58419
More information about the llvm-commits
mailing list