[compiler] Fix inducing variable in LoopVariableOptimizer
In JSCallReducer::ReduceArrayPrototypeShift, when disable FLAG_turbo_loop_variable, typer cannot infer loop phi variable is in [1, kMaxCopyElements-1], and will break in representing kRepFloat64 (Range(1, inf)) to kRepWord64 when converting input for kLoadElement. So we need to add type guard for loop variable. And we need to use loop phi variable when using NumberLessThan to check terminate and updating phi loop variable, otherwise which will break inducing variables in LoopVariableOptimizer. Bug: v8:12632, chromium:1308241, chromium:1308029, chromium:1308087 Change-Id: I9f96e696f1103f39e633890b17b87bfb28b1dbc4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3546577Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/main@{#79695}
Showing
Please
register
or
sign in
to comment