0380d3a90e
When inserting Unbox instructions in SelectRepresentations pass, their speculative mode depends on the instruction which uses corresponding value. Phi instructions were using default kGuardInputs mode, which may cause insertion of speculative Unbox instructions in AOT mode. Such Unbox instructions may need deoptimization if type of an argument changes during optimizations. Generating code for such Unbox instructions causes assertion failure (in debug mode), or crash in release mode. The fix is to change speculative mode of Phi instructions in AOT, so they won't cause speculative Unbox instructions. Fixes https://github.com/dart-lang/sdk/issues/39747 Change-Id: Ic9c9957875fd775fe1c02f3666829f26dad64937 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130063 Reviewed-by: Samir Jindel <sjindel@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>