Fix for Bug 2652 [JitStress=2] JIT/Directed/Arrays/Complex2/Complex2.exe fails
Fix for Bug 2652 [JitStress=2] JIT/Directed/Arrays/Complex2/Complex2.exe fails

The bug is caused by calling fgMorph in optPerformHoistExpr:

Before
 N043 ( 1, 1) [000806] ------------ /--* lclVar int V04 loc3 u:7 $380
 N044 ( 3, 3) [000805] ------------ /--* + int $348
 N042 ( 1, 1) [000807] ------------ | --* lclVar int V05 loc4 u:7 $381
 N045 ( 5, 5) [000804] ------------ /--* + int $349
 N041 ( 1, 1) [000808] ------------ | --* lclVar int V06 loc5 u:7 $382
 N046 ( 7, 7) [000803] ------------ /--* + int $34a
 N040 ( 1, 1) [000809] ------------ | --* lclVar int V07 loc6 u:7 $383
 N047 ( 9, 9) [000802] ------------ /--* + int $34b
 N039 ( 1, 1) [000810] ------------ | --* lclVar int V08 loc7 u:7 $384
 N048 ( 11, 11) [000801] ------------ * + int $34c
 N038 ( 1, 1) [000811] ------------ --* lclVar int V09 loc8 u:7 $385

After
 ( 1, 1) [001747] -------H---- | /--* lclVar int V04 loc3 u:7 $380
 ( 11, 11) [001737] -------H---- --* + int $34c
 ( 1, 1) [001746] -------H---- | /--* lclVar int V05 loc4 u:7 $381
 ( 9, 9) [001739] ------------ --* + int $34b
 ( 1, 1) [001744] -------H---- | /--* lclVar int V06 loc5 u:7 $382
 ( 7, 7) [001741] ------------ --* + int $34a
 ( 1, 1) [001742] -------H---- | /--* lclVar int V07 loc6 u:7 $383
 ( 5, 5) [001743] ------------ --* + int $349
 ( 1, 1) [001740] -------H---- | /--* lclVar int V08 loc7 u:7 $384
 ( 3, 3) [001745] ------------ --* + int $348
 ( 1, 1) [001738] -------H---- --* lclVar int V09 loc8 u:7 $385

See the value number $34b doesn't reflect the same expressions before and after.

When fgMorph is called after value numbering, we have to ensure that a correct or a new value number is assigned to the resulting tree.

Godin/coreclr,sejongoh/coreclr,parjong/coreclr,dpodder/coreclr,roncain/coreclr,Dmitry-Me/coreclr,jamesqo/coreclr,andschwa/coreclr,qiudesong/coreclr,cmckinsey/coreclr,cmckinsey/coreclr,wateret/coreclr,parjong/coreclr,shahid-pk/coreclr,russellhadley/coreclr,KrzysztofCwalina/coreclr,sperling/coreclr,James-Ko/coreclr,JosephTremoulet/coreclr,wkchoy74/coreclr,krk/coreclr,krytarowski/coreclr,naamunds/coreclr,josteink/coreclr,gkhanna79/coreclr,James-Ko/coreclr,dpodder/coreclr,schellap/coreclr,sjsinju/coreclr,stormleoxia/coreclr,bartdesmet/coreclr,rartemev/coreclr,yeaicc/coreclr,LLITCHEV/coreclr,mskvortsov/coreclr,JonHanna/coreclr,vinnyrom/coreclr,jhendrixMSFT/coreclr,Lucrecious/coreclr,ragmani/coreclr,tijoytom/coreclr,yizhang82/coreclr,wtgodbe/coreclr,mocsy/coreclr,mmitche/coreclr,alexperovich/coreclr,gkhanna79/coreclr,mocsy/coreclr,KrzysztofCwalina/coreclr,wtgodbe/coreclr,LLITCHEV/coreclr,chuck-mitchell/coreclr,martinwoodward/coreclr,josteink/coreclr,martinwoodward/coreclr,LLITCHEV/coreclr,hseok-oh/coreclr,Lucrecious/coreclr,pgavlin/coreclr,Godin/coreclr,swgillespie/coreclr,yeaicc/coreclr,martinwoodward/coreclr,qiudesong/coreclr,cmckinsey/coreclr,russellhadley/coreclr,poizan42/coreclr,vinnyrom/coreclr,sjsinju/coreclr,shahid-pk/coreclr,sejongoh/coreclr,krytarowski/coreclr,krytarowski/coreclr,swgillespie/coreclr,mocsy/coreclr,cydhaselton/coreclr,wkchoy74/coreclr,LLITCHEV/coreclr,wtgodbe/coreclr,neurospeech/coreclr,ragmani/coreclr,benpye/coreclr,ramarag/coreclr,wateret/coreclr,hseok-oh/coreclr,AlexGhiondea/coreclr,schellap/coreclr,parjong/coreclr,josteink/coreclr,neurospeech/coreclr,cshung/coreclr,rartemev/coreclr,AlexGhiondea/coreclr,cmckinsey/coreclr,mocsy/coreclr,botaberg/coreclr,martinwoodward/coreclr,swgillespie/coreclr,ZhichengZhu/coreclr,kyulee1/coreclr,stormleoxia/coreclr,martinwoodward/coreclr,kyulee1/coreclr,naamunds/coreclr,ruben-ayrapetyan/coreclr,AlexGhiondea/coreclr,dasMulli/coreclr,pgavlin/coreclr,alexperovich/coreclr,jamesqo/coreclr,mmitche/coreclr,naamunds/coreclr,manu-silicon/coreclr,tijoytom/coreclr,mmitche/coreclr,wateret/coreclr,sagood/coreclr,sagood/coreclr,wkchoy74/coreclr,Lucrecious/coreclr,poizan42/coreclr,hseok-oh/coreclr,dasMulli/coreclr,qiudesong/coreclr,martinwoodward/coreclr,SlavaRa/coreclr,andschwa/coreclr,ruben-ayrapetyan/coreclr,KrzysztofCwalina/coreclr,JonHanna/coreclr,neurospeech/coreclr,schellap/coreclr,poizan42/coreclr,dasMulli/coreclr,ramarag/coreclr,kyulee1/coreclr,russellhadley/coreclr,manu-silicon/coreclr,jhendrixMSFT/coreclr,swgillespie/coreclr,mokchhya/coreclr,roncain/coreclr,botaberg/coreclr,YongseopKim/coreclr,krytarowski/coreclr,qiudesong/coreclr,hseok-oh/coreclr,alexperovich/coreclr,gkhanna79/coreclr,manu-silicon/coreclr,Dmitry-Me/coreclr,rartemev/coreclr,shahid-pk/coreclr,josteink/coreclr,yeaicc/coreclr,KrzysztofCwalina/coreclr,benpye/coreclr,andschwa/coreclr,ZhichengZhu/coreclr,YongseopKim/coreclr,ramarag/coreclr,cydhaselton/coreclr,wkchoy74/coreclr,AlexGhiondea/coreclr,gkhanna79/coreclr,cshung/coreclr,cydhaselton/coreclr,SlavaRa/coreclr,naamunds/coreclr,bartdesmet/coreclr,AlexGhiondea/coreclr,roncain/coreclr,kyulee1/coreclr,dasMulli/coreclr,JosephTremoulet/coreclr,yeaicc/coreclr,dasMulli/coreclr,JonHanna/coreclr,jhendrixMSFT/coreclr,mskvortsov/coreclr,josteink/coreclr,neurospeech/coreclr,krk/coreclr,Godin/coreclr,wateret/coreclr,jhendrixMSFT/coreclr,wkchoy74/coreclr,schellap/coreclr,wateret/coreclr,dasMulli/coreclr,swgillespie/coreclr,gkhanna79/coreclr,sperling/coreclr,mmitche/coreclr,stormleoxia/coreclr,poizan42/coreclr,kyulee1/coreclr,hseok-oh/coreclr,botaberg/coreclr,YongseopKim/coreclr,josteink/coreclr,andschwa/coreclr,bartonjs/coreclr,neurospeech/coreclr,jhendrixMSFT/coreclr,roncain/coreclr,sperling/coreclr,josteink/coreclr,KrzysztofCwalina/coreclr,LLITCHEV/coreclr,botaberg/coreclr,swgillespie/coreclr,JosephTremoulet/coreclr,AlexGhiondea/coreclr,mmitche/coreclr,benpye/coreclr,krytarowski/coreclr,mskvortsov/coreclr,stormleoxia/coreclr,Lucrecious/coreclr,cmckinsey/coreclr,stormleoxia/coreclr,wateret/coreclr,ramarag/coreclr,krk/coreclr,jamesqo/coreclr,chuck-mitchell/coreclr,Lucrecious/coreclr,sejongoh/coreclr,SlavaRa/coreclr,yeaicc/coreclr,bartdesmet/coreclr,Godin/coreclr,ruben-ayrapetyan/coreclr,dasMulli/coreclr,sperling/coreclr,sejongoh/coreclr,kyulee1/coreclr,vinnyrom/coreclr,SlavaRa/coreclr,Lucrecious/coreclr,sjsinju/coreclr,KrzysztofCwalina/coreclr,KrzysztofCwalina/coreclr,mokchhya/coreclr,LLITCHEV/coreclr,cydhaselton/coreclr,schellap/coreclr,bartdesmet/coreclr,cshung/coreclr,ruben-ayrapetyan/coreclr,wkchoy74/coreclr,James-Ko/coreclr,vinnyrom/coreclr,ZhichengZhu/coreclr,ramarag/coreclr,mskvortsov/coreclr,jhendrixMSFT/coreclr,tijoytom/coreclr,Dmitry-Me/coreclr,mokchhya/coreclr,sjsinju/coreclr,mocsy/coreclr,jamesqo/coreclr,schellap/coreclr,ruben-ayrapetyan/coreclr,krytarowski/coreclr,benpye/coreclr,parjong/coreclr,Dmitry-Me/coreclr,swgillespie/coreclr,Godin/coreclr,roncain/coreclr,dpodder/coreclr,schellap/coreclr,yizhang82/coreclr,wtgodbe/coreclr,gkhanna79/coreclr,vinnyrom/coreclr,botaberg/coreclr,jamesqo/coreclr,mokchhya/coreclr,rartemev/coreclr,sejongoh/coreclr,chuck-mitchell/coreclr,mskvortsov/coreclr,chuck-mitchell/coreclr,shahid-pk/coreclr,sejongoh/coreclr,cmckinsey/coreclr,cydhaselton/coreclr,ragmani/coreclr,SlavaRa/coreclr,ZhichengZhu/coreclr,ruben-ayrapetyan/coreclr,sperling/coreclr,wkchoy74/coreclr,cmckinsey/coreclr,naamunds/coreclr,russellhadley/coreclr,manu-silicon/coreclr,ZhichengZhu/coreclr,pgavlin/coreclr,mokchhya/coreclr,andschwa/coreclr,dpodder/coreclr,tijoytom/coreclr,naamunds/coreclr,YongseopKim/coreclr,cydhaselton/coreclr,sagood/coreclr,vinnyrom/coreclr,sagood/coreclr,mmitche/coreclr,krk/coreclr,Godin/coreclr,James-Ko/coreclr,mokchhya/coreclr,rartemev/coreclr,dpodder/coreclr,mocsy/coreclr,bartonjs/coreclr,ramarag/coreclr,JosephTremoulet/coreclr,yeaicc/coreclr,pgavlin/coreclr,sagood/coreclr,bartonjs/coreclr,qiudesong/coreclr,poizan42/coreclr,mocsy/coreclr,poizan42/coreclr,pgavlin/coreclr,bartonjs/coreclr,ZhichengZhu/coreclr,bartdesmet/coreclr,YongseopKim/coreclr,Dmitry-Me/coreclr,tijoytom/coreclr,mokchhya/coreclr,rartemev/coreclr,jamesqo/coreclr,jhendrixMSFT/coreclr,JosephTremoulet/coreclr,sperling/coreclr,bartonjs/coreclr,parjong/coreclr,chuck-mitchell/coreclr,martinwoodward/coreclr,Dmitry-Me/coreclr,shahid-pk/coreclr,krk/coreclr,ramarag/coreclr,James-Ko/coreclr,sjsinju/coreclr,roncain/coreclr,qiudesong/coreclr,parjong/coreclr,benpye/coreclr,Dmitry-Me/coreclr,chuck-mitchell/coreclr,krk/coreclr,ragmani/coreclr,sagood/coreclr,naamunds/coreclr,andschwa/coreclr,manu-silicon/coreclr,alexperovich/coreclr,roncain/coreclr,cshung/coreclr,pgavlin/coreclr,Lucrecious/coreclr,stormleoxia/coreclr,bartonjs/coreclr,ZhichengZhu/coreclr,russellhadley/coreclr,alexperovich/coreclr,tijoytom/coreclr,mskvortsov/coreclr,JonHanna/coreclr,shahid-pk/coreclr,JonHanna/coreclr,yizhang82/coreclr,sejongoh/coreclr,manu-silicon/coreclr,shahid-pk/coreclr,dpodder/coreclr,yeaicc/coreclr,Godin/coreclr,benpye/coreclr,andschwa/coreclr,bartdesmet/coreclr,ragmani/coreclr,neurospeech/coreclr,chuck-mitchell/coreclr,yizhang82/coreclr,alexperovich/coreclr,LLITCHEV/coreclr,YongseopKim/coreclr,botaberg/coreclr,bartonjs/coreclr,JosephTremoulet/coreclr,benpye/coreclr,vinnyrom/coreclr,manu-silicon/coreclr,cshung/coreclr,wtgodbe/coreclr,ragmani/coreclr,JonHanna/coreclr,SlavaRa/coreclr,yizhang82/coreclr,russellhadley/coreclr,yizhang82/coreclr,wtgodbe/coreclr,cshung/coreclr,hseok-oh/coreclr,sjsinju/coreclr,sperling/coreclr,stormleoxia/coreclr,bartdesmet/coreclr,James-Ko/coreclr