[turbofan] Strength reduction for inline comparisons.
authorbmeurer <bmeurer@chromium.org>
Tue, 24 Feb 2015 12:26:16 +0000 (04:26 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 24 Feb 2015 12:26:29 +0000 (12:26 +0000)
commitdcf193f18cb76e60bf3fb978093eed93442d0430
tree13f5a7a93d5c485205429449fd78722aaf4761e7
parentb33f552f348f445848b3b5e95f42d2af0956638b
[turbofan] Strength reduction for inline comparisons.

Perform strength reduction on machine operators with inline comparisons:

  CMP & 1 => CMP
  1 & CMP => CMP
  CMP << 31 >> 31 => CMP

Also strength reduce the following constructs:

  x + (0 - y) => x - y
  (0 - y) + x => x - y

R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/951903003

Cr-Commit-Position: refs/heads/master@{#26817}
BUILD.gn
src/compiler/machine-operator-reducer.cc
src/compiler/machine-operator-reducer.h
src/compiler/node-matchers.cc [new file with mode: 0644]
src/compiler/node-matchers.h
src/compiler/opcodes.h
test/unittests/compiler/machine-operator-reducer-unittest.cc
test/unittests/compiler/opcodes-unittest.cc
tools/gyp/v8.gyp