Skip to content

Commit 3b3d0d1

Browse files
committed
Code changes based on review:
1. deleted irrelevant comments. Move the contain check up to cover more cases.
1 parent 6fb6e48 commit 3b3d0d1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/coreclr/jit/instr.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -765,9 +765,7 @@ void CodeGen::inst_RV_SH(
765765
// logic for determining what "kind" of operand "op" is.
766766
//
767767
// Arguments:
768-
// op - The operand node for which to obtain the descriptor
769-
// instOptions - The optional parameter to track if embedded broadcast is enabled
770-
// simdBaseType - The base data type of the emitting instruction.
768+
// op - The operand node for which to obtain the descriptor.
771769
//
772770
// Return Value:
773771
// The operand descriptor for "op".
@@ -857,12 +855,12 @@ CodeGen::OperandDesc CodeGen::genOperandDesc(GenTree* op)
857855
// In the codes below, we specially handle the `Broadcast -> CNS_INT` form and
858856
// handle other cases recursively.
859857
GenTree* hwintrinsicChild = hwintrinsic->Op(1);
858+
assert(hwintrinsicChild->isContained());
860859
if (hwintrinsicChild->OperIs(GT_CNS_INT))
861860
{
862861
// a special case is when the operand of CreateScalarUnsafe is in integer type,
863862
// CreateScalarUnsafe node will be fold, so we directly match a pattern of
864863
// broadcast -> LCL_VAR(TYP_(U)INT)
865-
assert(hwintrinsicChild->isContained());
866864
ssize_t scalarValue = hwintrinsicChild->AsIntCon()->IconValue();
867865
UNATIVE_OFFSET cnum = emit->emitDataConst(&scalarValue, genTypeSize(simdBaseType),
868866
genTypeSize(simdBaseType), simdBaseType);

0 commit comments

Comments
 (0)