5#ifndef V8_COMPILER_TURBOSHAFT_INSTRUCTION_SELECTION_NORMALIZATION_REDUCER_H_
6#define V8_COMPILER_TURBOSHAFT_INSTRUCTION_SELECTION_NORMALIZATION_REDUCER_H_
29template <
typename Next>
39 std::swap(left, right);
41 std::swap(left, right);
48 if (
__ matcher().MatchPowerOfTwoWordConstant(right, &cst, rep) &&
49 cst < rep.bit_width()) {
54 return Next::ReduceWordBinop(left, right,
kind, rep);
62 std::swap(left, right);
64 std::swap(left, right);
67 return Next::ReduceComparison(left, right,
kind, rep);
82 case Opcode::kConstant:
86 case Opcode::kTaggedBitcast:
88 case Opcode::kTryChange:
#define REDUCE(operation)
bool IsSimpleConstant(V< Any > index)
V< Word > REDUCE WordBinop(V< Word > left, V< Word > right, WordBinopOp::Kind kind, WordRepresentation rep)
bool IsComplexConstant(V< Any > index)
V< Word32 > REDUCE Comparison(V< Any > left, V< Any > right, ComparisonOp::Kind kind, RegisterRepresentation rep)
#define TURBOSHAFT_REDUCER_BOILERPLATE(Name)
constexpr int WhichPowerOfTwo(T value)
V8_INLINE const Operation & Get(const Graph &graph, OpIndex index)
bool Is(IndirectHandle< U > value)
static bool IsCommutative(Kind kind)
underlying_operation_t< Op > & Cast()
bool IsCommutative() const