Commit 7e7c1b10 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[cleanup] Add operator parameter accessor for S8x16Shuffle

Bug: v8:7517, v8:9183
Change-Id: Ic9beade6893b81aaa77f9c634cbeb7444260907b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/973375
Auto-Submit: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62177}
parent 1de4631e
...@@ -2965,7 +2965,7 @@ void InstructionSelector::CanonicalizeShuffle(bool inputs_equal, ...@@ -2965,7 +2965,7 @@ void InstructionSelector::CanonicalizeShuffle(bool inputs_equal,
void InstructionSelector::CanonicalizeShuffle(Node* node, uint8_t* shuffle, void InstructionSelector::CanonicalizeShuffle(Node* node, uint8_t* shuffle,
bool* is_swizzle) { bool* is_swizzle) {
// Get raw shuffle indices. // Get raw shuffle indices.
memcpy(shuffle, OpParameter<uint8_t*>(node->op()), kSimd128Size); memcpy(shuffle, S8x16ShuffleOf(node->op()), kSimd128Size);
bool needs_swap; bool needs_swap;
bool inputs_equal = GetVirtualRegister(node->InputAt(0)) == bool inputs_equal = GetVirtualRegister(node->InputAt(0)) ==
GetVirtualRegister(node->InputAt(1)); GetVirtualRegister(node->InputAt(1));
......
...@@ -1302,6 +1302,11 @@ const Operator* MachineOperatorBuilder::S8x16Shuffle( ...@@ -1302,6 +1302,11 @@ const Operator* MachineOperatorBuilder::S8x16Shuffle(
2, 0, 0, 1, 0, 0, array); 2, 0, 0, 1, 0, 0, array);
} }
const uint8_t* S8x16ShuffleOf(Operator const* op) {
DCHECK_EQ(IrOpcode::kS8x16Shuffle, op->opcode());
return OpParameter<const uint8_t*>(op);
}
#undef PURE_BINARY_OP_LIST_32 #undef PURE_BINARY_OP_LIST_32
#undef PURE_BINARY_OP_LIST_64 #undef PURE_BINARY_OP_LIST_64
#undef MACHINE_PURE_OP_LIST #undef MACHINE_PURE_OP_LIST
......
...@@ -112,6 +112,9 @@ MachineRepresentation AtomicStoreRepresentationOf(Operator const* op) ...@@ -112,6 +112,9 @@ MachineRepresentation AtomicStoreRepresentationOf(Operator const* op)
MachineType AtomicOpType(Operator const* op) V8_WARN_UNUSED_RESULT; MachineType AtomicOpType(Operator const* op) V8_WARN_UNUSED_RESULT;
V8_EXPORT_PRIVATE const uint8_t* S8x16ShuffleOf(Operator const* op)
V8_WARN_UNUSED_RESULT;
// Interface for building machine-level operators. These operators are // Interface for building machine-level operators. These operators are
// machine-level but machine-independent and thus define a language suitable // machine-level but machine-independent and thus define a language suitable
// for generating code to run on architectures such as ia32, x64, arm, etc. // for generating code to run on architectures such as ia32, x64, arm, etc.
......
...@@ -1347,7 +1347,7 @@ void SimdScalarLowering::LowerNode(Node* node) { ...@@ -1347,7 +1347,7 @@ void SimdScalarLowering::LowerNode(Node* node) {
} }
case IrOpcode::kS8x16Shuffle: { case IrOpcode::kS8x16Shuffle: {
DCHECK_EQ(2, node->InputCount()); DCHECK_EQ(2, node->InputCount());
const uint8_t* shuffle = OpParameter<uint8_t*>(node->op()); const uint8_t* shuffle = S8x16ShuffleOf(node->op());
Node** rep_left = GetReplacementsWithType(node->InputAt(0), rep_type); Node** rep_left = GetReplacementsWithType(node->InputAt(0), rep_type);
Node** rep_right = GetReplacementsWithType(node->InputAt(1), rep_type); Node** rep_right = GetReplacementsWithType(node->InputAt(1), rep_type);
Node** rep_node = zone()->NewArray<Node*>(16); Node** rep_node = zone()->NewArray<Node*>(16);
......
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