mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1039667 - IonMonkey: Clear the Guard flag when folding away MBoundsCheck instructions r=jandem
This commit is contained in:
parent
cd119e9fd0
commit
2d63854c6a
@ -3225,8 +3225,12 @@ MBoundsCheck::foldsTo(TempAllocator &alloc)
|
||||
if (index()->isConstant() && length()->isConstant()) {
|
||||
uint32_t len = length()->toConstant()->value().toInt32();
|
||||
uint32_t idx = index()->toConstant()->value().toInt32();
|
||||
if (idx + uint32_t(minimum()) < len && idx + uint32_t(maximum()) < len)
|
||||
if (idx + uint32_t(minimum()) < len && idx + uint32_t(maximum()) < len) {
|
||||
// This bounds check will never fail, so we can clear the Guard flag
|
||||
// and allow it to be deleted.
|
||||
setNotGuard();
|
||||
return index();
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
|
Loading…
Reference in New Issue
Block a user