Commit bc00836e authored by Tobias Tebbi's avatar Tobias Tebbi Committed by V8 LUCI CQ

[turbofan] fold repeated essentially-pure operations

This improves a pattern that appears in the SunSpider
base64 benchmark.

Change-Id: I1b5f4535d24d8a39cc480508d1e11c8e92e0135c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3654098Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80629}
parent b5d6997a
......@@ -35,6 +35,14 @@ Reduction RedundancyElimination::Reduce(Node* node) {
case IrOpcode::kCheckSmi:
case IrOpcode::kCheckString:
case IrOpcode::kCheckSymbol:
// These are not really check nodes, but behave the same in that they can be
// folded together if repeated with identical inputs.
case IrOpcode::kBigIntAdd:
case IrOpcode::kBigIntSubtract:
case IrOpcode::kStringCharCodeAt:
case IrOpcode::kStringCodePointAt:
case IrOpcode::kStringFromCodePointAt:
case IrOpcode::kStringSubstring:
#define SIMPLIFIED_CHECKED_OP(Opcode) case IrOpcode::k##Opcode:
SIMPLIFIED_CHECKED_OP_LIST(SIMPLIFIED_CHECKED_OP)
#undef SIMPLIFIED_CHECKED_OP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment