[llvm] [RISCV] Handle scalable ops with < EEW / 2 narrow types in combineBinOp_VLToVWBinOp_VL (PR #84158)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 11 03:19:05 PDT 2024
================
@@ -13646,20 +13646,6 @@ struct NodeExtensionHelper {
if (!VT.isVector())
break;
- SDValue NarrowElt = OrigOperand.getOperand(0);
- MVT NarrowVT = NarrowElt.getSimpleValueType();
-
- unsigned ScalarBits = VT.getScalarSizeInBits();
- unsigned NarrowScalarBits = NarrowVT.getScalarSizeInBits();
-
- // Ensure the narrowing element type is legal
- if (!Subtarget.getTargetLowering()->isTypeLegal(NarrowElt.getValueType()))
- break;
-
- // Ensure the extension's semantic is equivalent to rvv vzext or vsext.
- if (ScalarBits != NarrowScalarBits * 2)
----------------
lukel97 wrote:
> Note that you should also be asserting that both narrow and wide are legal types.
I've moved the narrow type assert in 0ef61ed54dca2e974928c55b2144b57d4c4ff621 so that we now check the narrow type for all extend node types, and we have an assert that the wide type is legal here:
https://github.com/llvm/llvm-project/blob/74ea8fe4c16490c41d60521323c38e4f0b9c0c15/llvm/lib/Target/RISCV/RISCVISelLowering.cpp#L13755
https://github.com/llvm/llvm-project/pull/84158
More information about the llvm-commits
mailing list