Bug 1745388: Compute dependency info for shape guard removal r=jandem

If LICM and GVN are both disabled, `ins->dependency()` is never set and we dereference a null pointer.

Differential Revision: https://phabricator.services.mozilla.com/D133562
This commit is contained in:
Iain Ireland 2021-12-14 17:17:26 +00:00
Родитель c02e87d268
Коммит cf93acf6bd
2 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -0,0 +1,3 @@
// |jit-test| --ion-gvn=off; --ion-licm=off
for (var k = 0; k < 100; k++) {}

Просмотреть файл

@ -1143,9 +1143,11 @@ bool OptimizeMIR(MIRGenerator* mir) {
ValueNumberer gvn(mir, graph);
// Alias analysis is required for LICM and GVN so that we don't move
// loads across stores.
// loads across stores. We also use alias information when removing
// redundant shapeguards.
if (mir->optimizationInfo().licmEnabled() ||
mir->optimizationInfo().gvnEnabled()) {
mir->optimizationInfo().gvnEnabled() ||
mir->optimizationInfo().eliminateRedundantShapeGuardsEnabled()) {
{
AutoTraceLog log(logger, TraceLogger_AliasAnalysis);