From 7a532a73db9bc90a58544eba3bce6ed363535450 Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Thu, 18 May 2023 12:05:56 -0700 Subject: [PATCH] Remove call to morph on hoisted trees (#86450) It is unnecessary (this causes no diffs). And theoretically if it did cause diffs, the morphed tree would then not match the tree being hoisted, meaning CSE wouldn't "find" it and consider it a CSE. --- src/coreclr/jit/optimizer.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/coreclr/jit/optimizer.cpp b/src/coreclr/jit/optimizer.cpp index 59a0cc8..d425f55e 100644 --- a/src/coreclr/jit/optimizer.cpp +++ b/src/coreclr/jit/optimizer.cpp @@ -6511,11 +6511,6 @@ void Compiler::optPerformHoistExpr(GenTree* origExpr, BasicBlock* exprBb, unsign BasicBlock* preHead = optLoopTable[lnum].lpHead; - // fgMorphTree requires that compCurBB be the block that contains - // (or in this case, will contain) the expression. - compCurBB = preHead; - hoist = fgMorphTree(hoist); - // Scan the tree for any new SSA uses. // optRecordSsaUses(hoist, preHead); -- 2.7.4