Skip to content

Commit 0ef61ed

Browse files
committed
[RISCV] Move NodeExtensionHelper assert to getOrCreateExtendedOp. NFC
Move the narrow types assert from the ZERO_EXTEND/SIGN_EXTEND case in fillUpExtensionSupport to getOrCreateExtendedOp so we check the other nodes too.
1 parent d3ec8c2 commit 0ef61ed

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13490,6 +13490,7 @@ struct NodeExtensionHelper {
1349013490
MVT NarrowVT = getNarrowType(Root, *SupportsExt);
1349113491

1349213492
SDValue Source = getSource();
13493+
assert(Subtarget.getTargetLowering()->isTypeLegal(Source.getValueType()));
1349313494
if (Source.getValueType() == NarrowVT)
1349413495
return Source;
1349513496

@@ -13657,9 +13658,6 @@ struct NodeExtensionHelper {
1365713658
unsigned ScalarBits = VT.getScalarSizeInBits();
1365813659
unsigned NarrowScalarBits = NarrowVT.getScalarSizeInBits();
1365913660

13660-
assert(
13661-
Subtarget.getTargetLowering()->isTypeLegal(NarrowElt.getValueType()));
13662-
1366313661
// Ensure the extension's semantic is equivalent to rvv vzext or vsext.
1366413662
if (ScalarBits != NarrowScalarBits * 2)
1366513663
break;

0 commit comments

Comments
 (0)