Skip to content

Commit 8d3f553

Browse files
Only prevent SVE ptrue reuse when the temp would be live across a call
1 parent 7cd8254 commit 8d3f553

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎src/coreclr/jit/constantreuse.cpp‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,10 +466,9 @@ bool ReuseConstantMaskCandidates(Compiler* compiler, BasicBlock* block)
466466
}
467467

468468
// Reusing all-true masks can introduce a live predicate temp. Avoid
469-
// short live ranges and live ranges that cross calls, as these are
470-
// likely to spill and are generally worse than rematerializing ptrue.
471-
if (IsAllTrueMaskCandidate(group.candidate) &&
472-
((group.count < 3) || group.crossesCall || (block->HasFlag(BBF_BACKWARD_JUMP) && (group.count < 6))))
469+
// live ranges that cross calls, as these are likely to spill and are
470+
// generally worse than rematerializing ptrue.
471+
if (IsAllTrueMaskCandidate(group.candidate) && group.crossesCall)
473472
{
474473
continue;
475474
}

0 commit comments

Comments
 (0)