Skip to content

Commit

Permalink
Code changes based on review:
Browse files Browse the repository at this point in the history
1. deleted irrelevant comments.

Move the contain check up to cover more cases.
  • Loading branch information
Ruihan-Yin committed May 24, 2023
1 parent 6fb6e48 commit 3b3d0d1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/coreclr/jit/instr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -765,9 +765,7 @@ void CodeGen::inst_RV_SH(
// logic for determining what "kind" of operand "op" is.
//
// Arguments:
// op - The operand node for which to obtain the descriptor
// instOptions - The optional parameter to track if embedded broadcast is enabled
// simdBaseType - The base data type of the emitting instruction.
// op - The operand node for which to obtain the descriptor.
//
// Return Value:
// The operand descriptor for "op".
Expand Down Expand Up @@ -857,12 +855,12 @@ CodeGen::OperandDesc CodeGen::genOperandDesc(GenTree* op)
// In the codes below, we specially handle the `Broadcast -> CNS_INT` form and
// handle other cases recursively.
GenTree* hwintrinsicChild = hwintrinsic->Op(1);
assert(hwintrinsicChild->isContained());
if (hwintrinsicChild->OperIs(GT_CNS_INT))
{
// a special case is when the operand of CreateScalarUnsafe is in integer type,
// CreateScalarUnsafe node will be fold, so we directly match a pattern of
// broadcast -> LCL_VAR(TYP_(U)INT)
assert(hwintrinsicChild->isContained());
ssize_t scalarValue = hwintrinsicChild->AsIntCon()->IconValue();
UNATIVE_OFFSET cnum = emit->emitDataConst(&scalarValue, genTypeSize(simdBaseType),
genTypeSize(simdBaseType), simdBaseType);
Expand Down

0 comments on commit 3b3d0d1

Please sign in to comment.