RESOLVED FIXED 150958
B3::reduceStrength should canonicalize integer comparisons
https://bugs.webkit.org/show_bug.cgi?id=150958
Summary B3::reduceStrength should canonicalize integer comparisons
Filip Pizlo
Reported 2015-11-05 15:06:51 PST
Integer comparisons are not necessarily commutative, but you can swap the operands if you also flip the comparison - for example you can turn LessThan(const, var) into GreaterThan(var, const). We should use this property to "sort" the operands the same way we do for commutative operations. This will let us get rid of a lot of cases in the B3::lowerToAir() pattern matching.
Attachments
Patch (10.88 KB, patch)
2018-03-10 12:10 PST, Yusuke Suzuki
no flags
Patch (10.80 KB, patch)
2018-03-10 12:11 PST, Yusuke Suzuki
no flags
Yusuke Suzuki
Comment 1 2018-03-10 12:10:17 PST
Yusuke Suzuki
Comment 2 2018-03-10 12:11:34 PST
Yusuke Suzuki
Comment 3 2018-03-10 22:50:29 PST
Comment on attachment 335518 [details] Patch Thanks!
WebKit Commit Bot
Comment 4 2018-03-10 23:16:20 PST
Comment on attachment 335518 [details] Patch Clearing flags on attachment: 335518 Committed r229513: <https://trac.webkit.org/changeset/229513>
WebKit Commit Bot
Comment 5 2018-03-10 23:16:21 PST
All reviewed patches have been landed. Closing bug.
Yusuke Suzuki
Comment 6 2018-03-11 09:51:04 PDT
Oops, this patch may create an orphan value which is not allowed by B3Validate. It is also fixed in bug 183543.
Radar WebKit Bug Importer
Comment 7 2018-03-12 17:24:21 PDT
Note You need to log in before you can comment on or make changes to this bug.