Closed Bug 839217 Opened 12 years ago Closed 12 years ago

ion: |a && false| is incompletely optimized

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 669796

People

(Reporter: nmatsakis, Unassigned)

Details

There is now a pass to strip dead or unreachable blocks, but it fails with code like: if (foo() && false) { ... } This is because the |foo() && false| is first stored into a variable, and at the time the pass runs the constants have not been fully propagated. This situation arises in self-hosted code for ParallelArray, where inlined functions are often evaluated to true or false to select different control flow in sequential or parallel mode. Probably the best fix would be to integrate the stripping of unreachable blocks with GVN as proposed in Bug 669796.
actually I decided to just call this a dup of bug 669796 and add my comments there.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.