This repository has been archived by the owner on Apr 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[x64/ia32] Deal with the non-transitivity of InstructionSelector::Can…
…Cover() when folding loads into branches. Sequences like: 1: Load[kRepWord32|kTypeInt32](<address>, ...) 2: Word32And(1, <constant>) 3: Word32Equal(2, <another constant>) 4: Store[(kRepWord32 : NoWriteBarrier)](<address>, <value>) 5: Branch[None](3, ...) -> B1, B2 where #1 and #4 refer to the same memory location, are problematic because in VisitBranch we assume that 'InstructionSelector::CanCover()' is transitive. What happens is that CanCover(5, 3) is true (3 is a pure op), and so are CanCover(3, 2), CanCover(2, 1), but the effect level of 5 and 3 never gets checked because 3 is a pure op. Upon VisitBranch, we ended up materializing: mov [address], <value> test [address], <another constant> With this patch, it becomes: mov reg, [address] mov [address], <value> test reg, <another constant> BUG=chromium:611976 Review-Url: https://codereview.chromium.org/2008493002 Cr-Commit-Position: refs/heads/master@{#36482}
- Loading branch information
epertoso
authored and
Commit bot
committed
May 24, 2016
1 parent
075f5a4
commit 0d22e7e
Showing
4 changed files
with
57 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters