From f377332dfd3ebe0b36631d37c1e555eece1bc9bb Mon Sep 17 00:00:00 2001 From: Jakob Botsch Nielsen Date: Tue, 10 Dec 2024 17:42:46 +0100 Subject: [PATCH] JIT: Avoid comparing regnums in `GenTreeHWIntrinsic::Equals` (#110535) Register numbers are not part of the syntax of JIT IR, so it does not need to be compared for the purpose of this function. At the same time we can hit asserts for nodes that aren't multi-reg nodes. Fix #110316 --- src/coreclr/jit/gentree.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp index 2a3762aa3898c..d8d5752a5f644 100644 --- a/src/coreclr/jit/gentree.cpp +++ b/src/coreclr/jit/gentree.cpp @@ -27624,8 +27624,7 @@ void GenTreeHWIntrinsic::SetHWIntrinsicId(NamedIntrinsic intrinsicId) { return (op1->TypeGet() == op2->TypeGet()) && (op1->GetHWIntrinsicId() == op2->GetHWIntrinsicId()) && (op1->GetSimdBaseType() == op2->GetSimdBaseType()) && (op1->GetSimdSize() == op2->GetSimdSize()) && - (op1->GetAuxiliaryType() == op2->GetAuxiliaryType()) && (op1->GetRegByIndex(1) == op2->GetRegByIndex(1)) && - OperandsAreEqual(op1, op2); + (op1->GetAuxiliaryType() == op2->GetAuxiliaryType()) && OperandsAreEqual(op1, op2); } void GenTreeHWIntrinsic::Initialize(NamedIntrinsic intrinsicId)