[vm/compiler] Use unboxed constants when folding away unboxed ops.

Before this change we would replace unboxed definitions (those with
representation not equal to kTagged) which is too loose and causes issues
in subsequent passes, which assume that replacements have normalised
representation.

After this change we make sure that replacement has a matching
representation.

Closes https://github.com/dart-lang/sdk/issues/35371
Fixes https://github.com/dart-lang/sdk/issues/41971

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try
Change-Id: I48543893562acf4f8516651196eba7c0c0769a22
Fixed: 35371,41971
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103139
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>

https://dart.googlesource.com/sdk/+/6ab62add0d4b6b76e214134db883e84ef4a18edd
1 file changed
tree: 115c88e808d93334ca82f67365c7aedf39de92d8
  1. commits.json