[dart-lang/sdk] f1fcec: Improve optimization of `int & 0xFFFFFFFF`.

0 views
Skip to first unread message

Lasse R.H. Nielsen

unread,
9:11 AM (6 hours ago) 9:11 AM
to com...@dartlang.org
Branch: refs/heads/main
Home: https://github.com/dart-lang/sdk
Commit: f1fcecc81de36295b4379cd22ddb16a6634ef428
https://github.com/dart-lang/sdk/commit/f1fcecc81de36295b4379cd22ddb16a6634ef428
Author: Lasse R.H. Nielsen <l...@google.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)

Changed paths:
M pkg/compiler/lib/src/ssa/optimize.dart
A pkg/compiler/test/codegen/data/bitand.dart

Log Message:
-----------
Improve optimization of `int & 0xFFFFFFFF`.

Recognize a second operand if its `ToUint32` is `0xFFFFFFFF`,
not just the exact value. This includes fx `& -1`, which is output
by `toUnsigned(32)`.

Change-Id: Ieccb42591efd72b4aae62a7c6e678f05510abdc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510960
Reviewed-by: Stephen Adams <s...@google.com>
Commit-Queue: Lasse Nielsen <l...@google.com>



To unsubscribe from these emails, change your notification settings at https://github.com/dart-lang/sdk/settings/notifications
Reply all
Reply to author
Forward
0 new messages