Bug 152367
Summary: | BitXor(Comparison, 1) where canBeInternal(Comparison) should be generated as an inverted comparison | ||
---|---|---|---|
Product: | WebKit | Reporter: | Filip Pizlo <fpizlo> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | ||
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 154319 |
Filip Pizlo
This is relevant for float comparisons. Some of them will start as something like:
Equal(EqualOrUnordered(left, right), 0)
Then we will canonicalize this to:
BitXor(EqualOrUnordered(left, right), 1)
But then the code generator will emit the BitXor separately, so we'll have some nasty code to perform the comparison followed by a xor. That's goofy.
Note that this problem goes away if we also do branch fusion. For example both of these are fine:
Branch(BitXor(EqualOrUnordered(left, right), 1))
Check(BitXor(EqualOrUnordered(left, right), 1))
We won't see the Branch case because of strength reduction, but we will see the Check case, and that's OK - we'll chew through the BitXor.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |