Skip to content

Commit

Permalink
Ensure that GenTreeJitIntrinsic explicitly zeroes out certain nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
tannergooding committed Apr 26, 2021
1 parent 598a7fd commit 0e12823
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/coreclr/jit/gentree.h
Original file line number Diff line number Diff line change
Expand Up @@ -4847,7 +4847,7 @@ struct GenTreeIntrinsic : public GenTreeOp
struct GenTreeJitIntrinsic : public GenTreeOp
{
private:
ClassLayout* m_layout;
ClassLayout* gtLayout;

unsigned char gtAuxiliaryJitType; // For intrinsics than need another type (e.g. Avx2.Gather* or SIMD (by element))
regNumberSmall gtOtherReg; // For intrinsics that return 2 registers
Expand All @@ -4867,13 +4867,13 @@ struct GenTreeJitIntrinsic : public GenTreeOp

ClassLayout* GetLayout() const
{
return m_layout;
return gtLayout;
}

void SetLayout(ClassLayout* layout)
{
assert(layout != nullptr);
m_layout = layout;
gtLayout = layout;
}

regNumber GetOtherReg() const
Expand Down Expand Up @@ -4927,6 +4927,9 @@ struct GenTreeJitIntrinsic : public GenTreeOp
GenTreeJitIntrinsic(
genTreeOps oper, var_types type, GenTree* op1, GenTree* op2, CorInfoType simdBaseJitType, unsigned simdSize)
: GenTreeOp(oper, type, op1, op2)
, gtLayout(nullptr)
, gtAuxiliaryJitType(CORINFO_TYPE_UNDEF)
, gtOtherReg(REG_NA)
, gtSimdBaseJitType((unsigned char)simdBaseJitType)
, gtSimdSize((unsigned char)simdSize)
, gtHWIntrinsicId(NI_Illegal)
Expand Down

0 comments on commit 0e12823

Please sign in to comment.