From b142e4f84885e3983768d58cb1f1f12050bc9b8b Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Tue, 31 Jan 2023 19:26:03 +0100 Subject: [PATCH 01/34] 8298935: Superword: handle cyclic dependencies with offset larger than 1 --- src/hotspot/share/opto/superword.cpp | 148 +++++++++++++++++- src/hotspot/share/opto/superword.hpp | 7 +- .../superword/TestCyclicDependency.java | 114 ++++++++++++++ 3 files changed, 262 insertions(+), 7 deletions(-) create mode 100644 test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java diff --git a/src/hotspot/share/opto/superword.cpp b/src/hotspot/share/opto/superword.cpp index 4df7b4219e8d7..bac1fa7b67dff 100644 --- a/src/hotspot/share/opto/superword.cpp +++ b/src/hotspot/share/opto/superword.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -540,6 +540,8 @@ bool SuperWord::SLP_extract() { filter_packs(); + DEBUG_ONLY(verify_packs();) + schedule(); // Record eventual count of vector packs for checks in post loop vectorization @@ -1715,11 +1717,15 @@ void SuperWord::combine_packs() { for (int j = i + 1; j < _packset.length(); j++) { Node_List* p2 = _packset.at(j); if (p2 == NULL) continue; - if (i == j) continue; + assert(i != j, "sanity"); // TODO remove + if (i == j) continue; // TODO remove if (p1->at(p1->size()-1) == p2->at(0)) { - for (uint k = 1; k < p2->size(); k++) { - p1->push(p2->at(k)); + if (can_combine_packs(p1, p2)) { + for (uint k = 1; k < p2->size(); k++) { + p1->push(p2->at(k)); + } } + // remove p2, if it was combined or rejected _packset.at_put(j, NULL); changed = true; } @@ -1770,11 +1776,30 @@ void SuperWord::combine_packs() { } } +//----------------------------can_combine_packs--------------------------- +// Given p1.last == p2.first, check if we have a reduction, +// or all new nodes in p2 are independent with all from p1. +bool SuperWord::can_combine_packs(Node_List* p1, Node_List* p2) { + assert(p1 != nullptr && p2 != nullptr && p1 != p2, "must be two different packs"); + assert(p1->at(p1->size()-1) == p2->at(0), "must link: p1.last == p2.first"); + if (p1->at(0)->is_reduction()) { + return true; // reduction + } + // Check that all new nodes in p2 are independent to all nodes in p1 + for (uint k1 = 0; k1 < p1->size(); k1++) { + for (uint k2 = 1; k2 < p2->size(); k2++) { + if (!independent(p1->at(k1), p2->at(k2))) { + return false; // dependence found + } + } + } + return true; // no dependence found +} + //-----------------------------construct_my_pack_map-------------------------- // Construct the map from nodes to packs. Only valid after the // point where a node is only in one pack (after combine_packs). void SuperWord::construct_my_pack_map() { - Node_List* rslt = NULL; for (int i = 0; i < _packset.length(); i++) { Node_List* p = _packset.at(i); for (uint j = 0; j < p->size(); j++) { @@ -2204,6 +2229,113 @@ bool SuperWord::profitable(Node_List* p) { return true; } +#ifdef ASSERT +void SuperWord::verify_packs() { + if (TraceSuperWord) { + tty->print_cr("\nVerify packset with the dependence_graph."); + for (int i = 0; i < _packset.length(); i++) { + Node_List* p = _packset.at(i); + tty->print_cr("Pack: %d", i); + print_pack(p); // print all nodes in pack + for (uint j = 0; j < p->size(); j++) { + Node* n = p->at(j); + DepMem* d = _dg.dep(n); + if (d != nullptr) { + d->print(); // and the dependence_graph + } + } + } + } + + // Build a packset graph. + // Have edge (p, p') if any "def" \in p, "use" \in p': "def" \in use->DepPreds + // If these edges for a directed cycle, we have a failure and cannot schedule. + ResourceMark rm; + int m = _packset.length(); + GrowableArray> packset_in(m); // pack id -> input pack ids + GrowableArray> packset_out(m); // pack id -> output pack ids + for (int i_use = 0; i_use < _packset.length(); i_use++) { + packset_in.push(GrowableArray()); + packset_out.push(GrowableArray()); + } + + for (int i_use = 0; i_use < _packset.length(); i_use++) { + Node_List* p_use = _packset.at(i_use); + for (int i_def = 0; i_def < _packset.length(); i_def++) { + Node_List* p_def = _packset.at(i_def); + bool need_edge = false; + for (uint j_use = 0; j_use < p_use->size(); j_use++) { + Node* use = p_use->at(j_use); + for (DepPreds preds(use, _dg); !preds.done(); preds.next()) { + Node* pred = preds.current(); + if (!in_bb(pred)) { + continue; // outside block -> ignore + } + if (my_pack(pred) != p_def) { + continue; // not in a pack, or wrong pack -> ignorue + } + if (use->is_reduction() && pred->is_reduction() && i_use == i_def) { + if (TraceSuperWord) { + tty->print_cr("verify: reduction pack[%d], N%d -> N%d", + i_use, pred->_idx, use->_idx); + } + continue; // nodes in same pack, reduction -> self cycle allowed -> ignore + } + need_edge = true; + if (TraceSuperWord) { + tty->print_cr("verify: edge pack[%d] -> pack[%d], N%d -> N%d", + i_def, i_use, pred->_idx, use->_idx); + } + } + } + if (need_edge) { + packset_in.at(i_use).push(i_def); + packset_out.at(i_def).push(i_use); + } + } + } + + if (TraceSuperWord) { + tty->print_cr("Resulting packset graph:"); + for (int i_use = 0; i_use < packset_in.length(); i_use++) { + tty->print(" %d (", i_use); + for (int j = 0; j < packset_in.at(i_use).length(); j++) { + tty->print("%d ", packset_in.at(i_use).at(j)); + } + tty->print(") ["); + for (int j = 0; j < packset_out.at(i_use).length(); j++) { + tty->print("%d ", packset_out.at(i_use).at(j)); + } + tty->print_cr("]"); + } + } + + // Try to schedule the packs with topological sort, let's hope we find no cycles. + GrowableArray worklist; + // Directly schedule all packs that have no precedence. + for (int i = 0; i < packset_in.length(); i++) { + if (packset_in.at(i).is_empty()) { // no precedence + worklist.push(i); // schedule i + } + } + // Continue scheduling by removing the already scheduled nodes from the remaining graph. + for (int i = 0; i < worklist.length(); i++) { + int p = worklist.at(i); + if (TraceSuperWord) { + tty->print_cr("verify: schedule pack[%d]", p); + } + for (int j = 0; j < packset_out.at(p).length(); j++){ + int p_use = packset_out.at(p).at(j); + packset_in.at(p_use).remove(p); // p_use loses p as precedence + if (packset_in.at(p_use).is_empty()) { + worklist.push(p_use); // p_use just lost the last precedence (it was p) + } + } + } + assert(worklist.length() == _packset.length(), "no cycle in pack dependencies"); +} +#endif + //------------------------------schedule--------------------------- // Adjust the memory graph for the packed operations void SuperWord::schedule() { @@ -4022,7 +4154,11 @@ void SuperWord::print_packset() { for (int i = 0; i < _packset.length(); i++) { tty->print_cr("Pack: %d", i); Node_List* p = _packset.at(i); - print_pack(p); + if (p == nullptr) { + tty->print_cr(" nullptr"); + } else { + print_pack(p); + } } #endif } diff --git a/src/hotspot/share/opto/superword.hpp b/src/hotspot/share/opto/superword.hpp index 5da1d7b21c24e..f5b94ba204763 100644 --- a/src/hotspot/share/opto/superword.hpp +++ b/src/hotspot/share/opto/superword.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -536,12 +536,17 @@ class SuperWord : public ResourceObj { int unpack_cost(int ct); // Combine packs A and B with A.last == B.first into A.first..,A.last,B.second,..B.last void combine_packs(); + // Given p1.last == p2.first, check if we have a reduction, + // or all new nodes in p2 are independent with all from p1. + bool can_combine_packs(Node_List* p1, Node_List* p2); // Construct the map from nodes to packs. void construct_my_pack_map(); // Remove packs that are not implemented or not profitable. void filter_packs(); // Merge CMove into new vector-nodes void merge_packs_to_cmove(); + // Verify the consistency between dependence_graph and the PackSet (no cycle in PackSet) + DEBUG_ONLY(void verify_packs();) // Adjust the memory graph for the packed operations void schedule(); // Remove "current" from its current position in the memory graph and insert diff --git a/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java b/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java new file mode 100644 index 0000000000000..1d21c2911ac92 --- /dev/null +++ b/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * @test + * @bug 8298935 + * @summary Writing forward on array creates cyclic dependency + * which leads to wrong result, when ignored. + * @library /test/lib + * @run main/othervm -XX:-TieredCompilation -Xcomp + * -XX:CompileCommand=compileonly,TestCyclicDependency::test* + * TestCyclicDependency + */ + +import jdk.test.lib.Asserts; + +public class TestCyclicDependency { + static int N = 200; + static float fArr[] = new float[N]; + static int iArr[] = new int[N]; + + public static void main(String[] strArr) { + init(); + test3(); + Asserts.assertEQ(test_sum(), 16716); + + init(); + test2(); + Asserts.assertEQ(test_sum2(), 1080); + + init(); + test1(); + Asserts.assertEQ(test_sum(), 0); + + init(); + test0(); + Asserts.assertEQ(test_sum(), 0); + } + + static void test0() { + for (int i = 4; i < 100; i++) { + int v = iArr[i - 1]; + iArr[i + 1] = v; // forward writing at least 2 -> cyclic dependency + fArr[i] = v; // seems required + } + } + + static void test1() { + for (int i = 4; i < 100; i++) { + int v = iArr[i]; + iArr[i + 2] = v; // forward writing at least 2 -> cyclic dependency + fArr[i] = v; // seems required + } + } + + static void test2() { + for (int i = 4; i < 100; i++) { + int v = iArr[i]; + iArr[i] = v + 5; + fArr[i] = v; + } + } + + static void test3() { + for (int i = 0; i < N-1; ++i) { + iArr[i+1] = i; + iArr[i] -= 15; + } + } + + public static int test_sum() { + int sum = 0; + for (int j = 0; j < iArr.length; j++) { + sum += iArr[j]; + } + return sum; + } + + // reduction example - this self-cycle is allowed + public static int test_sum2() { + int sum = 0; + for (int j = 0; j < iArr.length; j++) { + sum += iArr[j]*2; + } + return sum; + } + + public static void init() { + for (int j = 0; j < iArr.length; j++) { + iArr[j] = (j >= 20 && j < 80) ? 1 : 0; + } + } +} From 5e01c9f5aa39c94bc70069df02e0043678fa69c7 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Thu, 2 Feb 2023 16:43:20 +0100 Subject: [PATCH 02/34] refactored verification code --- src/hotspot/share/opto/superword.cpp | 141 ++++++++++++++------------- 1 file changed, 73 insertions(+), 68 deletions(-) diff --git a/src/hotspot/share/opto/superword.cpp b/src/hotspot/share/opto/superword.cpp index bac1fa7b67dff..bfc32a51d6055 100644 --- a/src/hotspot/share/opto/superword.cpp +++ b/src/hotspot/share/opto/superword.cpp @@ -1717,8 +1717,6 @@ void SuperWord::combine_packs() { for (int j = i + 1; j < _packset.length(); j++) { Node_List* p2 = _packset.at(j); if (p2 == NULL) continue; - assert(i != j, "sanity"); // TODO remove - if (i == j) continue; // TODO remove if (p1->at(p1->size()-1) == p2->at(0)) { if (can_combine_packs(p1, p2)) { for (uint k = 1; k < p2->size(); k++) { @@ -2230,109 +2228,116 @@ bool SuperWord::profitable(Node_List* p) { } #ifdef ASSERT -void SuperWord::verify_packs() { - if (TraceSuperWord) { - tty->print_cr("\nVerify packset with the dependence_graph."); - for (int i = 0; i < _packset.length(); i++) { - Node_List* p = _packset.at(i); - tty->print_cr("Pack: %d", i); - print_pack(p); // print all nodes in pack - for (uint j = 0; j < p->size(); j++) { - Node* n = p->at(j); - DepMem* d = _dg.dep(n); - if (d != nullptr) { - d->print(); // and the dependence_graph +class Packset_Graph { + private: + int _size; + GrowableArray> _in_edges; + GrowableArray> _out_edges; + public: + Packset_Graph(int size) : _size(size), _in_edges(size), _out_edges(size) { + for (int i = 0; i < _size; i++) { + _in_edges.push(GrowableArray()); + _out_edges.push(GrowableArray()); + } + } + int size() { return _size; } + GrowableArray& in_edges(int idx) { return _in_edges.at(idx); } + GrowableArray& out_edges(int idx) { return _out_edges.at(idx); } + void print() { + tty->print_cr("Packset graph:"); + for (int i = 0; i < _size; i++) { + tty->print(" %d ( ", i); + for (int j = 0; j < _in_edges.at(i).length(); j++) { + tty->print("%d ", _in_edges.at(i).at(j)); + } + tty->print(") [ "); + for (int j = 0; j < _in_edges.at(i).length(); j++) { + tty->print("%d ", _in_edges.at(i).at(j)); + } + tty->print_cr("]"); + } + } + // Schedule the graph to worklist. Removes all packs from graph + // that are scheduled. Returns true iff all packs were scheduled. + // Implies: returns false iff we have a cyclic dependency. + // Implementation via topological sort. + bool schedule() { + GrowableArray worklist; + // Directly schedule all packs that have no precedence. + for (int i = 0; i < size(); i++) { + if (in_edges(i).is_empty()) { // no precedence + worklist.push(i); // schedule i + } + } + // Continue scheduling by removing the already scheduled nodes from the remaining graph. + for (int i = 0; i < worklist.length(); i++) { + int p = worklist.at(i); + if (TraceSuperWord) { + tty->print_cr("verify: schedule pack[%d]", p); + } + for (int j = 0; j < out_edges(p).length(); j++){ + int p_use = out_edges(p).at(j); + in_edges(p_use).remove(p); // p_use loses p as precedence + if (in_edges(p_use).is_empty()) { + worklist.push(p_use); // p_use just lost the last precedence (it was p) } } } + return worklist.length() == size(); // were all packs scheduled to worklist? } +}; +void SuperWord::verify_packs() { // Build a packset graph. // Have edge (p, p') if any "def" \in p, "use" \in p': "def" \in use->DepPreds // If these edges for a directed cycle, we have a failure and cannot schedule. ResourceMark rm; - int m = _packset.length(); - GrowableArray> packset_in(m); // pack id -> input pack ids - GrowableArray> packset_out(m); // pack id -> output pack ids - for (int i_use = 0; i_use < _packset.length(); i_use++) { - packset_in.push(GrowableArray()); - packset_out.push(GrowableArray()); - } + Packset_Graph graph(_packset.length()); for (int i_use = 0; i_use < _packset.length(); i_use++) { Node_List* p_use = _packset.at(i_use); for (int i_def = 0; i_def < _packset.length(); i_def++) { Node_List* p_def = _packset.at(i_def); + // For every "use" and "def", check if we need edge "def" -> "use" bool need_edge = false; for (uint j_use = 0; j_use < p_use->size(); j_use++) { - Node* use = p_use->at(j_use); + Node* use = p_use->at(j_use); // for every node in "use" pack for (DepPreds preds(use, _dg); !preds.done(); preds.next()) { - Node* pred = preds.current(); - if (!in_bb(pred)) { - continue; // outside block -> ignore - } + Node* pred = preds.current(); // find preds of "use" node if (my_pack(pred) != p_def) { - continue; // not in a pack, or wrong pack -> ignorue + continue; // not in a pack, or wrong pack -> ignore } - if (use->is_reduction() && pred->is_reduction() && i_use == i_def) { + if (i_use == i_def && use->is_reduction()) { if (TraceSuperWord) { - tty->print_cr("verify: reduction pack[%d], N%d -> N%d", - i_use, pred->_idx, use->_idx); + tty->print_cr("verify: reduction pack[%d], %d %s -> %d %s", + i_use, pred->_idx, pred->Name(), use->_idx, use->Name()); } continue; // nodes in same pack, reduction -> self cycle allowed -> ignore } need_edge = true; if (TraceSuperWord) { - tty->print_cr("verify: edge pack[%d] -> pack[%d], N%d -> N%d", - i_def, i_use, pred->_idx, use->_idx); + tty->print_cr("verify: edge pack[%d] -> pack[%d], %d %s -> %d %s", + i_def, i_use, pred->_idx, pred->Name(), use->_idx, use->Name()); } } } if (need_edge) { - packset_in.at(i_use).push(i_def); - packset_out.at(i_def).push(i_use); + graph.in_edges(i_use).push(i_def); + graph.out_edges(i_def).push(i_use); } } } if (TraceSuperWord) { - tty->print_cr("Resulting packset graph:"); - for (int i_use = 0; i_use < packset_in.length(); i_use++) { - tty->print(" %d (", i_use); - for (int j = 0; j < packset_in.at(i_use).length(); j++) { - tty->print("%d ", packset_in.at(i_use).at(j)); - } - tty->print(") ["); - for (int j = 0; j < packset_out.at(i_use).length(); j++) { - tty->print("%d ", packset_out.at(i_use).at(j)); - } - tty->print_cr("]"); - } + graph.print(); } - // Try to schedule the packs with topological sort, let's hope we find no cycles. - GrowableArray worklist; - // Directly schedule all packs that have no precedence. - for (int i = 0; i < packset_in.length(); i++) { - if (packset_in.at(i).is_empty()) { // no precedence - worklist.push(i); // schedule i - } - } - // Continue scheduling by removing the already scheduled nodes from the remaining graph. - for (int i = 0; i < worklist.length(); i++) { - int p = worklist.at(i); - if (TraceSuperWord) { - tty->print_cr("verify: schedule pack[%d]", p); - } - for (int j = 0; j < packset_out.at(p).length(); j++){ - int p_use = packset_out.at(p).at(j); - packset_in.at(p_use).remove(p); // p_use loses p as precedence - if (packset_in.at(p_use).is_empty()) { - worklist.push(p_use); // p_use just lost the last precedence (it was p) - } - } + if (!graph.schedule()) { + tty->print_cr("\nCycle detected in SuperWord packset. Printing remaining graph:"); + graph.print(); + print_packset(); + assert(false, "cycle detected in SuperWord packset"); } - assert(worklist.length() == _packset.length(), "no cycle in pack dependencies"); } #endif From 2def5f712e6e8a5b4ff9084f6bf3c5977e5c2aea Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Fri, 3 Feb 2023 13:01:49 +0100 Subject: [PATCH 03/34] Add IR test for compile option Vectorize --- .../compiler/lib/ir_framework/IRNode.java | 5 + .../vectorization/TestOptionVectorizeIR.java | 178 ++++++++++++++++++ 2 files changed, 183 insertions(+) create mode 100644 test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java b/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java index 8d23b0b52c4df..24dec87970443 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java @@ -699,6 +699,11 @@ public class IRNode { beforeMatchingNameRegex(MUL_VL, "MulVL"); } + public static final String MUL_VI = PREFIX + "MUL_VI" + POSTFIX; + static { + beforeMatchingNameRegex(MUL_VI, "MulVI"); + } + public static final String MUL_REDUCTION_VD = PREFIX + "MUL_REDUCTION_VD" + POSTFIX; static { superWordNodes(MUL_REDUCTION_VD, "MulReductionVD"); diff --git a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java new file mode 100644 index 0000000000000..6dabec2ecd7fc --- /dev/null +++ b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java @@ -0,0 +1,178 @@ +/* + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** +* @test +* @bug 8298935 +* @summary Test forced vectorization, and check IR for vector instructions +* @requires vm.compiler2.enabled +* @library /test/lib / +* @run driver compiler.vectorization.TestOptionVectorizeIR +*/ + +package compiler.vectorization; +import compiler.lib.ir_framework.*; + +public class TestOptionVectorizeIR { + static final int RANGE = 512; + static final int ITER = 100; + int[] gold1 = new int[RANGE]; + int[] gold2 = new int[RANGE]; + int[] gold3 = new int[RANGE]; + int[] gold4 = new int[RANGE]; + int[] gold5 = new int[RANGE]; + + public static void main(String args[]) { + TestFramework.runWithFlags("-XX:CompileCommand=option,compiler.vectorization.TestOptionVectorizeIR::test*,Vectorize"); + //TestFramework.run(TestOptionVectorizeIR.class); + } + + TestOptionVectorizeIR() { + // compute the gold standard in interpreter mode + // test1 + test1(gold1); + // test2 + test1(gold2); + test2(gold2); + // test3 + test1(gold3); + test3(gold3, 2, 3); + // test4 + test1(gold4); + test4(gold4); + // test5 + test1(gold5); + test5(gold5); + } + + @Run(test = "test1") + @Warmup(100) + public void runTest1() { + int[] data = new int[RANGE]; + test1(data); + verify("test1", data, gold1); + } + + @Run(test = "test2") + @Warmup(100) + public void runTest2() { + int[] data = new int[RANGE]; + test1(data); + test2(data); + verify("test2", data, gold2); + } + + @Run(test = "test3") + @Warmup(100) + public void runTest3() { + int[] data = new int[RANGE]; + test1(data); + test3(data, 2, 3); + verify("test3", data, gold3); + } + + @Run(test = "test4") + @Warmup(100) + public void runTest4() { + int[] data = new int[RANGE]; + test1(data); + test4(data); + verify("test4", data, gold4); + } + + @Run(test = "test5") + @Warmup(100) + public void runTest5() { + int[] data = new int[RANGE]; + test1(data); + test5(data); + verify("test5", data, gold5); + } + + @Test + @IR(counts = {IRNode.POPULATE_INDEX, "> 0"}) + @IR(counts = {IRNode.STORE_VECTOR, "> 0"}) + static void test1(int[] data) { + for (int j = 0; j < RANGE; j++) { + // Vectorizes even if it is not forced + data[j] = j; + } + } + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "> 0"}) + @IR(counts = {IRNode.ADD_VI, "> 0"}) + @IR(counts = {IRNode.STORE_VECTOR, "> 0"}) + static void test2(int[] data) { + for (int j = 0; j < RANGE - 1; j++) { + // Only vectorizes if forced, because of offset by 1 + data[j] = data[j] + data[j + 1]; + } + } + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "> 0"}) + @IR(counts = {IRNode.REPLICATE_I, "> 0"}) + @IR(counts = {IRNode.ADD_VI, "> 0"}) + @IR(counts = {IRNode.MUL_VI, "> 0"}) + @IR(counts = {IRNode.STORE_VECTOR, "> 0"}) + static void test3(int[] data, int A, int B) { + for (int j = 0; j < RANGE - 1; j++) { + // Only vectorizes if forced, because of offset by 1 + data[j] = A * data[j] + B * data[j + 1]; + } + } + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) + @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + static void test4(int[] data) { + for (int j = 0; j < RANGE - 1; j++) { + // write forward -> cyclic dependency -> cannot vectorize + // independent(s1, s2) for adjacent loads should detect this + data[j + 1] = data[j]; + } + } + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) + @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + static void test5(int[] data) { + for (int j = 0; j < RANGE - 3; j++) { + // write forward -> cyclic dependency -> cannot vectorize + // independent(s1, s2) for adjacent loads cannot detect this + // Checks with memory_alignment are disabled via compile option + // TODO: check why we are getting weird results distance 3 passes, distance 2 fails... what is happening here? + data[j + 2] = data[j]; + } + } + + static void verify(String name, int[] data, int[] gold) { + for (int i = 0; i < RANGE; i++) { + if (data[i] != gold[i]) { + throw new RuntimeException(" Invalid " + name + " result: data[" + i + "]: " + data[i] + " != " + gold[i]); + } + } + } + +} From 744dc2335361900c597baa511cdc74d71ecee522 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Fri, 3 Feb 2023 16:28:42 +0100 Subject: [PATCH 04/34] Extended TestForEachRem.java with distance 2 case that fails on master --- .../vectorization/TestForEachRem.java | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/test/hotspot/jtreg/compiler/vectorization/TestForEachRem.java b/test/hotspot/jtreg/compiler/vectorization/TestForEachRem.java index 12c5e5ba9adcd..5866f2c56e84a 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestForEachRem.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestForEachRem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,10 +27,11 @@ * @summary Test vectorization of Streams$RangeIntSpliterator::forEachRemaining * @requires vm.compiler2.enabled & vm.compMode != "Xint" * - * @run main compiler.vectorization.TestForEachRem test1 - * @run main compiler.vectorization.TestForEachRem test2 - * @run main compiler.vectorization.TestForEachRem test3 - * @run main compiler.vectorization.TestForEachRem test4 + * @run main/othervm -Xbatch compiler.vectorization.TestForEachRem test1 + * @run main/othervm -Xbatch compiler.vectorization.TestForEachRem test2 + * @run main/othervm -Xbatch compiler.vectorization.TestForEachRem test3 + * @run main/othervm -Xbatch compiler.vectorization.TestForEachRem test4 + * @run main/othervm -Xbatch compiler.vectorization.TestForEachRem test5 */ package compiler.vectorization; @@ -65,6 +66,12 @@ static void test4(int[] data) { }); } + static void test5(int[] data) { + IntStream.range(0, RANGE - 2).forEach(j -> { + data[j + 2] = data[j]; + }); + } + static void verify(String name, int[] data, int[] gold) { for (int i = 0; i < RANGE; i++) { if (data[i] != gold[i]) { @@ -78,7 +85,7 @@ public static void main(String[] args) { int[] gold = new int[RANGE]; if (args.length == 0) { - throw new RuntimeException(" Missing test name: test1, test2, test3, test4"); + throw new RuntimeException(" Missing test name: test1, test2, test3, test4, test5"); } if (args[0].equals("test1")) { @@ -126,5 +133,17 @@ public static void main(String[] args) { verify("test4", data, gold); System.out.println(" Finished test4."); } + + if (args[0].equals("test5")) { + System.out.println(" Run test5 ..."); + test1(gold); // reset + test5(gold); + for (int i = 0; i < ITER; i++) { + test1(data); // reset + test5(data); + } + verify("test5", data, gold); + System.out.println(" Finished test5."); + } } } From c668b5f6a77da60aa6c5e89f207e3b655407643f Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Mon, 6 Feb 2023 10:18:42 +0100 Subject: [PATCH 05/34] remove useless comment --- .../jtreg/compiler/vectorization/TestOptionVectorizeIR.java | 1 - 1 file changed, 1 deletion(-) diff --git a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java index 6dabec2ecd7fc..fbb2ff6498e63 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java @@ -44,7 +44,6 @@ public class TestOptionVectorizeIR { public static void main(String args[]) { TestFramework.runWithFlags("-XX:CompileCommand=option,compiler.vectorization.TestOptionVectorizeIR::test*,Vectorize"); - //TestFramework.run(TestOptionVectorizeIR.class); } TestOptionVectorizeIR() { From 830a05a3624b0ea30f0cdcfeea71e1f00dd6104b Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Mon, 6 Feb 2023 16:06:13 +0100 Subject: [PATCH 06/34] cyclic dependency test is now an IR test --- .../compiler/lib/ir_framework/IRNode.java | 10 + .../superword/TestCyclicDependency.java | 408 +++++++++++++++--- 2 files changed, 365 insertions(+), 53 deletions(-) diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java b/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java index 24dec87970443..53967855fea95 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java @@ -166,6 +166,11 @@ public class IRNode { beforeMatchingNameRegex(ADD_VI, "AddVI"); } + public static final String ADD_VF = PREFIX + "ADD_VF" + POSTFIX; + static { + beforeMatchingNameRegex(ADD_VF, "AddVF"); + } + public static final String ADD_REDUCTION_V = PREFIX + "ADD_REDUCTION_V" + POSTFIX; static { beforeMatchingNameRegex(ADD_REDUCTION_V, "AddReductionV(B|S|I|L|F|D)"); @@ -181,6 +186,11 @@ public class IRNode { superWordNodes(ADD_REDUCTION_VF, "AddReductionVF"); } + public static final String ADD_REDUCTION_VI = PREFIX + "ADD_REDUCTION_VI" + POSTFIX; + static { + superWordNodes(ADD_REDUCTION_VI, "AddReductionVI"); + } + public static final String ALLOC = PREFIX + "ALLOC" + POSTFIX; static { String optoRegex = "(.*precise .*\\R((.*(?i:mov|xorl|nop|spill).*|\\s*)\\R)*.*(?i:call,static).*wrapper for: _new_instance_Java" + END; diff --git a/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java b/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java index 1d21c2911ac92..65d65744318e7 100644 --- a/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java +++ b/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java @@ -27,88 +27,390 @@ * @bug 8298935 * @summary Writing forward on array creates cyclic dependency * which leads to wrong result, when ignored. - * @library /test/lib - * @run main/othervm -XX:-TieredCompilation -Xcomp - * -XX:CompileCommand=compileonly,TestCyclicDependency::test* - * TestCyclicDependency + * @library /test/lib / + * @run driver TestCyclicDependency */ import jdk.test.lib.Asserts; +import compiler.lib.ir_framework.*; + +// TODO: figure out if any of this is hardware dependent! public class TestCyclicDependency { - static int N = 200; - static float fArr[] = new float[N]; - static int iArr[] = new int[N]; + static final int RANGE = 512; + static final int ITER = 100; + int[] goldI0 = new int[RANGE]; + float[] goldF0 = new float[RANGE]; + int[] goldI1 = new int[RANGE]; + float[] goldF1 = new float[RANGE]; + int[] goldI2 = new int[RANGE]; + float[] goldF2 = new float[RANGE]; + int[] goldI3 = new int[RANGE]; + float[] goldF3 = new float[RANGE]; + int[] goldI4 = new int[RANGE]; + float[] goldF4 = new float[RANGE]; + int[] goldI5a = new int[RANGE]; + float[] goldF5a = new float[RANGE]; + int[] goldI5b = new int[RANGE]; + float[] goldF5b = new float[RANGE]; + int[] goldI6a = new int[RANGE]; + float[] goldF6a = new float[RANGE]; + int[] goldI6b = new int[RANGE]; + float[] goldF6b = new float[RANGE]; + int[] goldI7 = new int[RANGE]; + float[] goldF7 = new float[RANGE]; + int[] goldI8 = new int[RANGE]; + float[] goldF8 = new float[RANGE]; + int[] goldI9 = new int[RANGE]; + float[] goldF9 = new float[RANGE]; + + public static void main(String args[]) { + TestFramework.runWithFlags("-XX:CompileCommand=compileonly,TestCyclicDependency::test*"); + } + + TestCyclicDependency() { + // compute the gold standard in interpreter mode + // test0 + init(goldI0, goldF0); + test0(goldI0, goldF0); + // test1 + init(goldI1, goldF1); + test1(goldI1, goldF1); + // test2 + init(goldI2, goldF2); + test2(goldI2, goldF2); + // test3 + init(goldI3, goldF3); + test3(goldI3, goldF3); + // test4 + init(goldI4, goldF4); + test4(goldI4, goldF4); + // test5a + init(goldI5a, goldF5a); + test5a(goldI5a, goldF5a); + // test5b + init(goldI5b, goldF5b); + test5b(goldI5b, goldF5b); + // test6a + init(goldI6a, goldF6a); + test6a(goldI6a, goldF6a); + // test6b + init(goldI6b, goldF6b); + test6b(goldI6b, goldF6b); + // test7 + init(goldI7, goldF7); + test7(goldI7, goldF7); + // test8 + init(goldI8, goldF8); + test8(goldI8, goldF8); + // test9 + init(goldI9, goldF9); + test9(goldI9, goldF9); + } + + @Run(test = "test0") + @Warmup(100) + public void runTest0() { + int[] dataI = new int[RANGE]; + float[] dataF = new float[RANGE]; + init(dataI, dataF); + test0(dataI, dataF); + verifyI("test0", dataI, goldI0); + verifyF("test0", dataF, goldF0); + } + + @Run(test = "test1") + @Warmup(100) + public void runTest1() { + int[] dataI = new int[RANGE]; + float[] dataF = new float[RANGE]; + init(dataI, dataF); + test1(dataI, dataF); + verifyI("test1", dataI, goldI1); + verifyF("test1", dataF, goldF1); + } + + @Run(test = "test2") + @Warmup(100) + public void runTest2() { + int[] dataI = new int[RANGE]; + float[] dataF = new float[RANGE]; + init(dataI, dataF); + test2(dataI, dataF); + verifyI("test2", dataI, goldI2); + verifyF("test2", dataF, goldF2); + } + + @Run(test = "test3") + @Warmup(100) + public void runTest3() { + int[] dataI = new int[RANGE]; + float[] dataF = new float[RANGE]; + init(dataI, dataF); + test3(dataI, dataF); + verifyI("test3", dataI, goldI3); + verifyF("test3", dataF, goldF3); + } + + @Run(test = "test4") + @Warmup(100) + public void runTest4() { + int[] dataI = new int[RANGE]; + float[] dataF = new float[RANGE]; + init(dataI, dataF); + test4(dataI, dataF); + verifyI("test4", dataI, goldI4); + verifyF("test4", dataF, goldF4); + } + + @Run(test = "test5a") + @Warmup(100) + public void runTest5a() { + int[] dataI = new int[RANGE]; + float[] dataF = new float[RANGE]; + init(dataI, dataF); + test5a(dataI, dataF); + verifyI("test5a", dataI, goldI5a); + verifyF("test5a", dataF, goldF5a); + } + + @Run(test = "test5b") + @Warmup(100) + public void runTest5b() { + int[] dataI = new int[RANGE]; + float[] dataF = new float[RANGE]; + init(dataI, dataF); + test5b(dataI, dataF); + verifyI("test5b", dataI, goldI5b); + verifyF("test5b", dataF, goldF5b); + } + + @Run(test = "test6a") + @Warmup(100) + public void runTest6a() { + int[] dataI = new int[RANGE]; + float[] dataF = new float[RANGE]; + init(dataI, dataF); + test6a(dataI, dataF); + verifyI("test6a", dataI, goldI6a); + verifyF("test6a", dataF, goldF6a); + } + + @Run(test = "test6b") + @Warmup(100) + public void runTest6b() { + int[] dataI = new int[RANGE]; + float[] dataF = new float[RANGE]; + init(dataI, dataF); + test6b(dataI, dataF); + verifyI("test6b", dataI, goldI6b); + verifyF("test6b", dataF, goldF6b); + } + + @Run(test = "test7") + @Warmup(100) + public void runTest7() { + int[] dataI = new int[RANGE]; + float[] dataF = new float[RANGE]; + init(dataI, dataF); + test7(dataI, dataF); + verifyI("test7", dataI, goldI7); + verifyF("test7", dataF, goldF7); + } + + @Run(test = "test8") + @Warmup(100) + public void runTest8() { + int[] dataI = new int[RANGE]; + float[] dataF = new float[RANGE]; + init(dataI, dataF); + test8(dataI, dataF); + verifyI("test8", dataI, goldI8); + verifyF("test8", dataF, goldF8); + } + + @Run(test = "test9") + @Warmup(100) + public void runTest9() { + int[] dataI = new int[RANGE]; + float[] dataF = new float[RANGE]; + init(dataI, dataF); + test9(dataI, dataF); + verifyI("test9", dataI, goldI9); + verifyF("test9", dataF, goldF9); + } + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "> 0"}) + @IR(counts = {IRNode.ADD_VI, "> 0"}) + @IR(counts = {IRNode.STORE_VECTOR, "> 0"}) + static void test0(int[] dataI, float[] dataF) { + for (int i = 0; i < RANGE; i++) { + // All perfectly aligned, expect vectorization + int v = dataI[i]; + dataI[i] = v + 5; + } + } + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) + @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + static void test1(int[] dataI, float[] dataF) { + for (int i = 0; i < RANGE - 1; i++) { + // dataI has cyclid dependency of distance 1, cannot vectorize + int v = dataI[i]; + dataI[i + 1] = v; + dataF[i] = v; // let's not get confused by another type + } + } + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) + @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + static void test2(int[] dataI, float[] dataF) { + for (int i = 0; i < RANGE - 2; i++) { + // dataI has cyclid dependency of distance 2, cannot vectorize + int v = dataI[i]; + dataI[i + 2] = v; + dataF[i] = v; // let's not get confused by another type + } + } + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) + @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + static void test3(int[] dataI, float[] dataF) { + for (int i = 0; i < RANGE - 3; i++) { + // dataI has cyclid dependency of distance 3, cannot vectorize + int v = dataI[i]; + dataI[i + 3] = v; + dataF[i] = v; // let's not get confused by another type + } + } - public static void main(String[] strArr) { - init(); - test3(); - Asserts.assertEQ(test_sum(), 16716); + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) + @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + static void test4(int[] dataI, float[] dataF) { + for (int i = 1; i < RANGE - 1; i++) { + // dataI has cyclid dependency of distance 2, cannot vectorize + int v = dataI[i - 1]; + dataI[i + 1] = v; + dataF[i] = v; // let's not get confused by another type + } + } - init(); - test2(); - Asserts.assertEQ(test_sum2(), 1080); + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) + @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + static void test5a(int[] dataI, float[] dataF) { + for (int i = 2; i < RANGE; i++) { + // dataI has read / write distance 1, but no cyclic dependency + // test5a and test5b should either both vectorize, or both not + int v = dataI[i]; + dataI[i - 1] = v + 5; + } + } - init(); - test1(); - Asserts.assertEQ(test_sum(), 0); + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) + @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + static void test5b(int[] dataI, float[] dataF) { + for (int i = 1; i < RANGE; i++) { + // dataI has read / write distance 1, but no cyclic dependency + // test5a and test5b should either both vectorize, or both not + int v = dataI[i]; + dataI[i - 1] = v; + dataF[i] = v; // let's not get confused by another type + } + } - init(); - test0(); - Asserts.assertEQ(test_sum(), 0); + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) + @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + static void test6a(int[] dataI, float[] dataF) { + for (int i = 2; i < RANGE; i++) { + // dataI has read / write distance 2, but no cyclic dependency + // test6a and test6b should either both vectorize, or both not + int v = dataI[i]; + dataI[i - 2] = v + 5; + } } - static void test0() { - for (int i = 4; i < 100; i++) { - int v = iArr[i - 1]; - iArr[i + 1] = v; // forward writing at least 2 -> cyclic dependency - fArr[i] = v; // seems required + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) + @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + static void test6b(int[] dataI, float[] dataF) { + for (int i = 2; i < RANGE; i++) { + // dataI has read / write distance 2, but no cyclic dependency + // test6a and test6b should either both vectorize, or both not + int v = dataI[i]; + dataI[i - 2] = v; + dataF[i] = v; // let's not get confused by another type } } - static void test1() { - for (int i = 4; i < 100; i++) { - int v = iArr[i]; - iArr[i + 2] = v; // forward writing at least 2 -> cyclic dependency - fArr[i] = v; // seems required + @Test + @IR(counts = {IRNode.ADD_VI, "> 0"}) + @IR(counts = {IRNode.ADD_VF, "= 0"}) + static void test7(int[] dataI, float[] dataF) { + for (int i = 0; i < RANGE - 32; i++) { + // write forward 32 -> more than vector size -> can vectorize + // write forward 3 -> cannot vectorize + // separate types should make decision separately if they vectorize or not + int v = dataI[i]; + dataI[i + 32] = v + 5; + float f = dataF[i]; + dataF[i + 3] = f + 3.5f; } } - static void test2() { - for (int i = 4; i < 100; i++) { - int v = iArr[i]; - iArr[i] = v + 5; - fArr[i] = v; + @Test + @IR(counts = {IRNode.ADD_VI, "= 0"}) + @IR(counts = {IRNode.ADD_VF, "> 0"}) + static void test8(int[] dataI, float[] dataF) { + for (int i = 0; i < RANGE - 32; i++) { + // write forward 32 -> more than vector size -> can vectorize + // write forward 3 -> cannot vectorize + // separate types should make decision separately if they vectorize or not + int v = dataI[i]; + dataI[i + 3] = v + 5; + float f = dataF[i]; + dataF[i + 32] = f + 3.5f; } } - static void test3() { - for (int i = 0; i < N-1; ++i) { - iArr[i+1] = i; - iArr[i] -= 15; + @Test + @IR(counts = {IRNode.ADD_REDUCTION_VI, "> 0"}) + static void test9(int[] dataI, float[] dataF) { + int sI = 666; + for (int i = 0; i < RANGE; i++) { + // self-cycle allowed for reduction + sI += dataI[i] * 2; // factor necessary to make it profitable } + dataI[0] = sI; // write back } - public static int test_sum() { - int sum = 0; - for (int j = 0; j < iArr.length; j++) { - sum += iArr[j]; + public static void init(int[] dataI, float[] dataF) { + for (int j = 0; j < RANGE; j++) { + dataI[j] = j; + dataF[j] = j * 0.5f; } - return sum; } - // reduction example - this self-cycle is allowed - public static int test_sum2() { - int sum = 0; - for (int j = 0; j < iArr.length; j++) { - sum += iArr[j]*2; + static void verifyI(String name, int[] data, int[] gold) { + for (int i = 0; i < RANGE; i++) { + if (data[i] != gold[i]) { + throw new RuntimeException(" Invalid " + name + " result: dataI[" + i + "]: " + data[i] + " != " + gold[i]); + } } - return sum; } - public static void init() { - for (int j = 0; j < iArr.length; j++) { - iArr[j] = (j >= 20 && j < 80) ? 1 : 0; + static void verifyF(String name, float[] data, float[] gold) { + for (int i = 0; i < RANGE; i++) { + if (data[i] != gold[i]) { + throw new RuntimeException(" Invalid " + name + " result: dataF[" + i + "]: " + data[i] + " != " + gold[i]); + } } } } From b393693305ac1c695513ab5b4c7f9b71f39a710a Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Mon, 6 Feb 2023 17:59:56 +0100 Subject: [PATCH 07/34] Replace old verification code, and remove first fix --- src/hotspot/share/opto/superword.cpp | 183 ++++++++------------------- src/hotspot/share/opto/superword.hpp | 7 +- 2 files changed, 56 insertions(+), 134 deletions(-) diff --git a/src/hotspot/share/opto/superword.cpp b/src/hotspot/share/opto/superword.cpp index bfc32a51d6055..9374ab74fa10d 100644 --- a/src/hotspot/share/opto/superword.cpp +++ b/src/hotspot/share/opto/superword.cpp @@ -1329,6 +1329,44 @@ bool SuperWord::independent(Node* s1, Node* s2) { return independent_path(shallow, deep); } +//------------------------------find_dependence--------------------- +// Is any s1 in p dependent on any s2 in p? Yes: return such a s2. No: return nullptr. +// We could query independent(s1, s2) for all pairs, but that results +// in O(p.size * p.size) graph traversals. We can do it all in one BFS! +// Start the BFS traversal at all nodes from the pack. Traverse DepPreds +// recursively, for nodes that have at least depth min_d, which is the +// smallest depth of all nodes from the pack. Once we have traversed all +// those nodes, and have not found another node from the pack, we know +// that all nodes in the pack are independent. +Node* SuperWord::find_dependence(Node_List* p) { + if (p->at(0)->is_reduction()) { + return nullptr; // ignore reductions + } + ResourceMark rm; + Unique_Node_List worklist; // traversal queue + int min_d = depth(p->at(0)); + visited_clear(); + for (uint k = 0; k < p->size(); k++) { + Node* n = p->at(k); + min_d = MIN2(min_d, depth(n)); + worklist.push(n); // start traversal at all nodes in p + visited_set(n); // mark node + } + for (uint i = 0; i < worklist.size(); i++) { + Node* n = worklist.at(i); + for (DepPreds preds(n, _dg); !preds.done(); preds.next()) { + Node* pred = preds.current(); + if (in_bb(pred) && depth(pred) >= min_d) { + if (visited_test(pred)) { // marked as in p? + return pred; + } + worklist.push(pred); + } + } + } + return nullptr; +} + //--------------------------have_similar_inputs----------------------- // For a node pair (s1, s2) which is isomorphic and independent, // do s1 and s2 have similar input edges? @@ -1718,12 +1756,9 @@ void SuperWord::combine_packs() { Node_List* p2 = _packset.at(j); if (p2 == NULL) continue; if (p1->at(p1->size()-1) == p2->at(0)) { - if (can_combine_packs(p1, p2)) { - for (uint k = 1; k < p2->size(); k++) { - p1->push(p2->at(k)); - } + for (uint k = 1; k < p2->size(); k++) { + p1->push(p2->at(k)); } - // remove p2, if it was combined or rejected _packset.at_put(j, NULL); changed = true; } @@ -1774,26 +1809,6 @@ void SuperWord::combine_packs() { } } -//----------------------------can_combine_packs--------------------------- -// Given p1.last == p2.first, check if we have a reduction, -// or all new nodes in p2 are independent with all from p1. -bool SuperWord::can_combine_packs(Node_List* p1, Node_List* p2) { - assert(p1 != nullptr && p2 != nullptr && p1 != p2, "must be two different packs"); - assert(p1->at(p1->size()-1) == p2->at(0), "must link: p1.last == p2.first"); - if (p1->at(0)->is_reduction()) { - return true; // reduction - } - // Check that all new nodes in p2 are independent to all nodes in p1 - for (uint k1 = 0; k1 < p1->size(); k1++) { - for (uint k2 = 1; k2 < p2->size(); k2++) { - if (!independent(p1->at(k1), p2->at(k2))) { - return false; // dependence found - } - } - } - return true; // no dependence found -} - //-----------------------------construct_my_pack_map-------------------------- // Construct the map from nodes to packs. Only valid after the // point where a node is only in one pack (after combine_packs). @@ -2228,115 +2243,23 @@ bool SuperWord::profitable(Node_List* p) { } #ifdef ASSERT -class Packset_Graph { - private: - int _size; - GrowableArray> _in_edges; - GrowableArray> _out_edges; - public: - Packset_Graph(int size) : _size(size), _in_edges(size), _out_edges(size) { - for (int i = 0; i < _size; i++) { - _in_edges.push(GrowableArray()); - _out_edges.push(GrowableArray()); - } - } - int size() { return _size; } - GrowableArray& in_edges(int idx) { return _in_edges.at(idx); } - GrowableArray& out_edges(int idx) { return _out_edges.at(idx); } - void print() { - tty->print_cr("Packset graph:"); - for (int i = 0; i < _size; i++) { - tty->print(" %d ( ", i); - for (int j = 0; j < _in_edges.at(i).length(); j++) { - tty->print("%d ", _in_edges.at(i).at(j)); - } - tty->print(") [ "); - for (int j = 0; j < _in_edges.at(i).length(); j++) { - tty->print("%d ", _in_edges.at(i).at(j)); - } - tty->print_cr("]"); - } - } - // Schedule the graph to worklist. Removes all packs from graph - // that are scheduled. Returns true iff all packs were scheduled. - // Implies: returns false iff we have a cyclic dependency. - // Implementation via topological sort. - bool schedule() { - GrowableArray worklist; - // Directly schedule all packs that have no precedence. - for (int i = 0; i < size(); i++) { - if (in_edges(i).is_empty()) { // no precedence - worklist.push(i); // schedule i - } - } - // Continue scheduling by removing the already scheduled nodes from the remaining graph. - for (int i = 0; i < worklist.length(); i++) { - int p = worklist.at(i); - if (TraceSuperWord) { - tty->print_cr("verify: schedule pack[%d]", p); - } - for (int j = 0; j < out_edges(p).length(); j++){ - int p_use = out_edges(p).at(j); - in_edges(p_use).remove(p); // p_use loses p as precedence - if (in_edges(p_use).is_empty()) { - worklist.push(p_use); // p_use just lost the last precedence (it was p) - } - } - } - return worklist.length() == size(); // were all packs scheduled to worklist? - } -}; - void SuperWord::verify_packs() { - // Build a packset graph. - // Have edge (p, p') if any "def" \in p, "use" \in p': "def" \in use->DepPreds - // If these edges for a directed cycle, we have a failure and cannot schedule. - ResourceMark rm; - Packset_Graph graph(_packset.length()); - - for (int i_use = 0; i_use < _packset.length(); i_use++) { - Node_List* p_use = _packset.at(i_use); - for (int i_def = 0; i_def < _packset.length(); i_def++) { - Node_List* p_def = _packset.at(i_def); - // For every "use" and "def", check if we need edge "def" -> "use" - bool need_edge = false; - for (uint j_use = 0; j_use < p_use->size(); j_use++) { - Node* use = p_use->at(j_use); // for every node in "use" pack - for (DepPreds preds(use, _dg); !preds.done(); preds.next()) { - Node* pred = preds.current(); // find preds of "use" node - if (my_pack(pred) != p_def) { - continue; // not in a pack, or wrong pack -> ignore - } - if (i_use == i_def && use->is_reduction()) { - if (TraceSuperWord) { - tty->print_cr("verify: reduction pack[%d], %d %s -> %d %s", - i_use, pred->_idx, pred->Name(), use->_idx, use->Name()); - } - continue; // nodes in same pack, reduction -> self cycle allowed -> ignore - } - need_edge = true; - if (TraceSuperWord) { - tty->print_cr("verify: edge pack[%d] -> pack[%d], %d %s -> %d %s", - i_def, i_use, pred->_idx, pred->Name(), use->_idx, use->Name()); - } + for (int i = 0; i < _packset.length(); i++) { + Node_List* p = _packset.at(i); + Node* dependence = find_dependence(p); + if (dependence != nullptr) { + tty->print_cr("Other nodes in pack have dependence on:"); + dependence->dump(); + tty->print_cr("The following nodes are not independent:"); + for (uint k = 0; k < p->size(); k++) { + Node* n = p->at(k); + if (!independent(n, dependence)) { + n->dump(); } } - if (need_edge) { - graph.in_edges(i_use).push(i_def); - graph.out_edges(i_def).push(i_use); - } + print_pack(p); } - } - - if (TraceSuperWord) { - graph.print(); - } - - if (!graph.schedule()) { - tty->print_cr("\nCycle detected in SuperWord packset. Printing remaining graph:"); - graph.print(); - print_packset(); - assert(false, "cycle detected in SuperWord packset"); + assert(dependence == nullptr, "all nodes in pack must be mutually independent"); } } #endif diff --git a/src/hotspot/share/opto/superword.hpp b/src/hotspot/share/opto/superword.hpp index f5b94ba204763..121a1fe0d9035 100644 --- a/src/hotspot/share/opto/superword.hpp +++ b/src/hotspot/share/opto/superword.hpp @@ -511,6 +511,8 @@ class SuperWord : public ResourceObj { bool isomorphic(Node* s1, Node* s2); // Is there no data path from s1 to s2 or s2 to s1? bool independent(Node* s1, Node* s2); + // Is any s1 in p dependent on any s2 in p? Yes: return such a s2. No: return nullptr. + Node* find_dependence(Node_List* p); // For a node pair (s1, s2) which is isomorphic and independent, // do s1 and s2 have similar input edges? bool have_similar_inputs(Node* s1, Node* s2); @@ -536,16 +538,13 @@ class SuperWord : public ResourceObj { int unpack_cost(int ct); // Combine packs A and B with A.last == B.first into A.first..,A.last,B.second,..B.last void combine_packs(); - // Given p1.last == p2.first, check if we have a reduction, - // or all new nodes in p2 are independent with all from p1. - bool can_combine_packs(Node_List* p1, Node_List* p2); // Construct the map from nodes to packs. void construct_my_pack_map(); // Remove packs that are not implemented or not profitable. void filter_packs(); // Merge CMove into new vector-nodes void merge_packs_to_cmove(); - // Verify the consistency between dependence_graph and the PackSet (no cycle in PackSet) + // Verify that for every pack, all nodes are mutually independent DEBUG_ONLY(void verify_packs();) // Adjust the memory graph for the packed operations void schedule(); From ddb9dc54b92274af6d3e0c2e9731aaf184acd6a8 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Mon, 6 Feb 2023 18:26:23 +0100 Subject: [PATCH 08/34] Filter out dependent packs if we have _do_vector_loop --- src/hotspot/share/opto/superword.cpp | 27 +++++++++++++++++++ .../vectorization/TestOptionVectorizeIR.java | 26 +++++++++++++++++- 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/src/hotspot/share/opto/superword.cpp b/src/hotspot/share/opto/superword.cpp index 9374ab74fa10d..af43887f6a904 100644 --- a/src/hotspot/share/opto/superword.cpp +++ b/src/hotspot/share/opto/superword.cpp @@ -533,6 +533,8 @@ bool SuperWord::SLP_extract() { combine_packs(); + DEBUG_ONLY(verify_packs();) + construct_my_pack_map(); if (UseVectorCmov) { merge_packs_to_cmove(); @@ -1795,6 +1797,30 @@ void SuperWord::combine_packs() { } } + if (_do_vector_loop) { + // Since we did not enforce exact alignment of the packsets, we only know that there + // is no dependence with distance 1, because we have checked independent(s1, s2) for + // all adjacent memops. But there could be a dependence of a different distance. + // Hence: remove the pack if there is a dependence. + for (int i = 0; i < _packset.length(); i++) { + Node_List* p = _packset.at(i); + if (p != NULL) { + Node* dependence = find_dependence(p); + if (dependence != nullptr) { +#ifndef PRODUCT + if (TraceSuperWord) { + tty->print_cr("Cannot vectorize despite compile directive Vectorize. Found dependency."); + dependence->dump(); + tty->print_cr("In pack[%d]", i); + print_pack(p); + } +#endif + _packset.at_put(i, NULL); + } + } + } + } + // Compress list. for (int i = _packset.length() - 1; i >= 0; i--) { Node_List* p1 = _packset.at(i); @@ -2257,6 +2283,7 @@ void SuperWord::verify_packs() { n->dump(); } } + tty->print_cr("They are all from pack[%d]", i); print_pack(p); } assert(dependence == nullptr, "all nodes in pack must be mutually independent"); diff --git a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java index fbb2ff6498e63..480e6bf65b3f3 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java @@ -41,6 +41,7 @@ public class TestOptionVectorizeIR { int[] gold3 = new int[RANGE]; int[] gold4 = new int[RANGE]; int[] gold5 = new int[RANGE]; + int[] gold6 = new int[RANGE]; public static void main(String args[]) { TestFramework.runWithFlags("-XX:CompileCommand=option,compiler.vectorization.TestOptionVectorizeIR::test*,Vectorize"); @@ -62,6 +63,9 @@ public static void main(String args[]) { // test5 test1(gold5); test5(gold5); + // test6 + test1(gold6); + test6(gold6); } @Run(test = "test1") @@ -108,6 +112,15 @@ public void runTest5() { verify("test5", data, gold5); } + @Run(test = "test6") + @Warmup(100) + public void runTest6() { + int[] data = new int[RANGE]; + test1(data); + test6(data); + verify("test6", data, gold6); + } + @Test @IR(counts = {IRNode.POPULATE_INDEX, "> 0"}) @IR(counts = {IRNode.STORE_VECTOR, "> 0"}) @@ -161,11 +174,22 @@ static void test5(int[] data) { // write forward -> cyclic dependency -> cannot vectorize // independent(s1, s2) for adjacent loads cannot detect this // Checks with memory_alignment are disabled via compile option - // TODO: check why we are getting weird results distance 3 passes, distance 2 fails... what is happening here? data[j + 2] = data[j]; } } + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) + @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + static void test6(int[] data) { + for (int j = 0; j < RANGE - 3; j++) { + // write forward -> cyclic dependency -> cannot vectorize + // independent(s1, s2) for adjacent loads cannot detect this + // Checks with memory_alignment are disabled via compile option + data[j + 3] = data[j]; + } + } + static void verify(String name, int[] data, int[] gold) { for (int i = 0; i < RANGE; i++) { if (data[i] != gold[i]) { From d1f19baaedd0f84b97c5cc8dab429cde78ad766d Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Mon, 6 Feb 2023 18:31:51 +0100 Subject: [PATCH 09/34] small improvement for printing --- src/hotspot/share/opto/superword.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hotspot/share/opto/superword.cpp b/src/hotspot/share/opto/superword.cpp index af43887f6a904..453223ad104ab 100644 --- a/src/hotspot/share/opto/superword.cpp +++ b/src/hotspot/share/opto/superword.cpp @@ -1809,7 +1809,9 @@ void SuperWord::combine_packs() { if (dependence != nullptr) { #ifndef PRODUCT if (TraceSuperWord) { - tty->print_cr("Cannot vectorize despite compile directive Vectorize. Found dependency."); + tty->cr(); + tty->print_cr("WARNING: Found dependency."); + tty->print_cr("Cannot vectorize despite compile directive Vectorize."); dependence->dump(); tty->print_cr("In pack[%d]", i); print_pack(p); From b633a3a59cb88898f808e7c0f15fe0794406429f Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Tue, 7 Feb 2023 12:59:04 +0100 Subject: [PATCH 10/34] Implement fix --- src/hotspot/share/opto/superword.cpp | 135 +++++++++++++++++---------- src/hotspot/share/opto/superword.hpp | 9 ++ 2 files changed, 96 insertions(+), 48 deletions(-) diff --git a/src/hotspot/share/opto/superword.cpp b/src/hotspot/share/opto/superword.cpp index 453223ad104ab..a1cc155c50f85 100644 --- a/src/hotspot/share/opto/superword.cpp +++ b/src/hotspot/share/opto/superword.cpp @@ -647,51 +647,9 @@ void SuperWord::find_adjacent_refs() { // Create initial pack pairs of memory operations for which // alignment is set and vectors will be aligned. - bool create_pack = true; - if (memory_alignment(mem_ref, best_iv_adjustment) == 0 || _do_vector_loop) { - if (vectors_should_be_aligned()) { - int vw = vector_width(mem_ref); - int vw_best = vector_width(best_align_to_mem_ref); - if (vw > vw_best) { - // Do not vectorize a memory access with more elements per vector - // if unaligned memory access is not allowed because number of - // iterations in pre-loop will be not enough to align it. - create_pack = false; - } else { - SWPointer p2(best_align_to_mem_ref, this, NULL, false); - if (!align_to_ref_p.invar_equals(p2)) { - // Do not vectorize memory accesses with different invariants - // if unaligned memory accesses are not allowed. - create_pack = false; - } - } - } - } else { - if (same_velt_type(mem_ref, best_align_to_mem_ref)) { - // Can't allow vectorization of unaligned memory accesses with the - // same type since it could be overlapped accesses to the same array. - create_pack = false; - } else { - // Allow independent (different type) unaligned memory operations - // if HW supports them. - if (vectors_should_be_aligned()) { - create_pack = false; - } else { - // Check if packs of the same memory type but - // with a different alignment were created before. - for (uint i = 0; i < align_to_refs.size(); i++) { - MemNode* mr = align_to_refs.at(i)->as_Mem(); - if (mr == mem_ref) { - // Skip when we are looking at same memory operation. - continue; - } - if (same_velt_type(mr, mem_ref) && - memory_alignment(mr, iv_adjustment) != 0) - create_pack = false; - } - } - } - } + bool create_pack = is_mem_ref_alignment_ok(mem_ref, iv_adjustment, align_to_ref_p, + best_align_to_mem_ref, best_iv_adjustment, + align_to_refs); if (create_pack) { for (uint i = 0; i < memops.size(); i++) { Node* s1 = memops.at(i); @@ -799,6 +757,79 @@ void SuperWord::find_adjacent_refs_trace_1(Node* best_align_to_mem_ref, int best } #endif +// Check if alignment of mem_ref permissible on hardware, and if it is consistent with +// the other packs of same velt type. +bool SuperWord::is_mem_ref_alignment_ok(MemNode* mem_ref, int iv_adjustment, SWPointer &align_to_ref_p, + MemNode* best_align_to_mem_ref, int best_iv_adjustment, + Node_List &align_to_refs) { + if (memory_alignment(mem_ref, best_iv_adjustment) == 0 || _do_vector_loop) { + if (vectors_should_be_aligned()) { + if (!is_mem_ref_alignment_ok_for_hardware(mem_ref, align_to_ref_p, best_align_to_mem_ref)) { + return false; + } + } + if (!_do_vector_loop && !same_velt_type(mem_ref, best_align_to_mem_ref)) { + // The mem_ref may perfectly align with best_align_to_mem_ref, but + // we must check consistency with the other packs we already have. + return is_mem_ref_alignment_consistent_with_align_to_refs(mem_ref, iv_adjustment, align_to_refs); + } + } else { + if (same_velt_type(mem_ref, best_align_to_mem_ref)) { + // Can't allow vectorization of unaligned memory accesses with the + // same type since it could be overlapped accesses to the same array. + return false; + } else { + // Allow independent (different type) unaligned memory operations + // if HW supports them. + if (vectors_should_be_aligned()) { + return false; + } else { + return is_mem_ref_alignment_consistent_with_align_to_refs(mem_ref, iv_adjustment, align_to_refs); + } + } + } + return true; +} + +// Check if alignment of mem_ref permissible on hardware. +bool SuperWord::is_mem_ref_alignment_ok_for_hardware(MemNode* mem_ref, SWPointer &align_to_ref_p, + MemNode* best_align_to_mem_ref) { + assert(vectors_should_be_aligned(), "only query this if alignment required"); + int vw = vector_width(mem_ref); + int vw_best = vector_width(best_align_to_mem_ref); + if (vw > vw_best) { + // Do not vectorize a memory access with more elements per vector + // if unaligned memory access is not allowed because number of + // iterations in pre-loop will be not enough to align it. + return false; + } else { + SWPointer p2(best_align_to_mem_ref, this, NULL, false); + if (!align_to_ref_p.invar_equals(p2)) { + // Do not vectorize memory accesses with different invariants + // if unaligned memory accesses are not allowed. + return false; + } + } + return true; +} + +// Check if alignment of mem_ref is consistent with the other packs of same velt type. +bool SuperWord::is_mem_ref_alignment_consistent_with_align_to_refs(MemNode* mem_ref, int iv_adjustment, + Node_List &align_to_refs) { + for (uint i = 0; i < align_to_refs.size(); i++) { + MemNode* mr = align_to_refs.at(i)->as_Mem(); + if (mr == mem_ref) { + // Skip when we are looking at same memory operation. + continue; + } + if (same_velt_type(mr, mem_ref) && + memory_alignment(mr, iv_adjustment) != 0) { + return false; // misaligned with mr + } + } + return true; // no misalignment found +} + //------------------------------find_align_to_ref--------------------------- // Find a memory reference to align the loop induction variable to. // Looks first at stores then at loads, looking for a memory reference @@ -1526,8 +1557,10 @@ bool SuperWord::follow_use_defs(Node_List* p) { int align = alignment(s1); Node* t1 = s1->in(j); Node* t2 = s2->in(j); - if (!in_bb(t1) || !in_bb(t2)) + if (!in_bb(t1) || !in_bb(t2) || t1->is_Mem() || t2->is_Mem()) { + // Only follow non-memory nodes in block - we do not want to resurrect misaligned packs. continue; + } align = adjust_alignment_for_type_conversion(s1, t1, align); if (stmts_can_pack(t1, t2, align)) { if (est_savings(t1, t2) >= 0) { @@ -1565,10 +1598,16 @@ bool SuperWord::follow_def_uses(Node_List* p) { for (DUIterator_Fast imax, i = s1->fast_outs(imax); i < imax; i++) { Node* t1 = s1->fast_out(i); num_s1_uses++; - if (!in_bb(t1)) continue; + if (!in_bb(t1) || t1->is_Mem()) { + // Only follow non-memory nodes in block - we do not want to resurrect misaligned packs. + continue; + } for (DUIterator_Fast jmax, j = s2->fast_outs(jmax); j < jmax; j++) { Node* t2 = s2->fast_out(j); - if (!in_bb(t2)) continue; + if (!in_bb(t2) || t2->is_Mem()) { + // Only follow non-memory nodes in block - we do not want to resurrect misaligned packs. + continue; + } if (t2->Opcode() == Op_AddI && t2 == _lp->as_CountedLoop()->incr()) continue; // don't mess with the iv if (!opnd_positions_match(s1, t1, s2, t2)) continue; diff --git a/src/hotspot/share/opto/superword.hpp b/src/hotspot/share/opto/superword.hpp index 121a1fe0d9035..86f8dbb3026a8 100644 --- a/src/hotspot/share/opto/superword.hpp +++ b/src/hotspot/share/opto/superword.hpp @@ -475,6 +475,15 @@ class SuperWord : public ResourceObj { void find_adjacent_refs_trace_1(Node* best_align_to_mem_ref, int best_iv_adjustment); void print_loop(bool whole); #endif + // Check if alignment of mem_ref permissible on hardware, and if it is consistent with the other packs of same velt type. + bool is_mem_ref_alignment_ok(MemNode* mem_ref, int iv_adjustment, SWPointer &align_to_ref_p, + MemNode* best_align_to_mem_ref, int best_iv_adjustment, + Node_List &align_to_refs); + // Check if alignment of mem_ref permissible on hardware. + bool is_mem_ref_alignment_ok_for_hardware(MemNode* mem_ref, SWPointer &align_to_ref_p, + MemNode* best_align_to_mem_ref); + // Check if alignment of mem_ref is consistent with the other packs of same velt type. + bool is_mem_ref_alignment_consistent_with_align_to_refs(MemNode* mem_ref, int iv_adjustment, Node_List &align_to_refs); // Find a memory reference to align the loop induction variable to. MemNode* find_align_to_ref(Node_List &memops, int &idx); // Calculate loop's iv adjustment for this memory ops. From bf4befa0ac703ae246a8fb2cbd574d84dc1ec605 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Tue, 7 Feb 2023 15:55:48 +0100 Subject: [PATCH 11/34] refactoring to improve readability --- src/hotspot/share/opto/superword.cpp | 91 ++++++++++++++-------------- src/hotspot/share/opto/superword.hpp | 2 +- 2 files changed, 46 insertions(+), 47 deletions(-) diff --git a/src/hotspot/share/opto/superword.cpp b/src/hotspot/share/opto/superword.cpp index a1cc155c50f85..f7dc3347f2518 100644 --- a/src/hotspot/share/opto/superword.cpp +++ b/src/hotspot/share/opto/superword.cpp @@ -762,72 +762,71 @@ void SuperWord::find_adjacent_refs_trace_1(Node* best_align_to_mem_ref, int best bool SuperWord::is_mem_ref_alignment_ok(MemNode* mem_ref, int iv_adjustment, SWPointer &align_to_ref_p, MemNode* best_align_to_mem_ref, int best_iv_adjustment, Node_List &align_to_refs) { - if (memory_alignment(mem_ref, best_iv_adjustment) == 0 || _do_vector_loop) { - if (vectors_should_be_aligned()) { - if (!is_mem_ref_alignment_ok_for_hardware(mem_ref, align_to_ref_p, best_align_to_mem_ref)) { - return false; - } - } - if (!_do_vector_loop && !same_velt_type(mem_ref, best_align_to_mem_ref)) { - // The mem_ref may perfectly align with best_align_to_mem_ref, but - // we must check consistency with the other packs we already have. - return is_mem_ref_alignment_consistent_with_align_to_refs(mem_ref, iv_adjustment, align_to_refs); - } - } else { - if (same_velt_type(mem_ref, best_align_to_mem_ref)) { - // Can't allow vectorization of unaligned memory accesses with the - // same type since it could be overlapped accesses to the same array. + bool is_aligned_with_best = memory_alignment(mem_ref, best_iv_adjustment) == 0; + + // Check if alignment ok for hardware + if (is_aligned_with_best || _do_vector_loop) { + if (!is_mem_ref_alignment_ok_for_hardware(mem_ref, align_to_ref_p, best_align_to_mem_ref)) { return false; - } else { - // Allow independent (different type) unaligned memory operations - // if HW supports them. - if (vectors_should_be_aligned()) { - return false; - } else { - return is_mem_ref_alignment_consistent_with_align_to_refs(mem_ref, iv_adjustment, align_to_refs); - } } } - return true; + + // We have a compiler hint, so do not check alignment with other packs. + if (_do_vector_loop) { + return true; + } + + // If hardware does not permit independent unaligned memory operations, + // then all mem_ref must align with best (no matter the velt type). + if (vectors_should_be_aligned() && !is_aligned_with_best) { + return false; + } + + // Check if the alignment of mem_ref is consistent with other packs of the same velt type. + if (same_velt_type(mem_ref, best_align_to_mem_ref)) { + return is_aligned_with_best; + } else { + return is_mem_ref_aligned_with_same_velt_type(mem_ref, iv_adjustment, align_to_refs); + } } // Check if alignment of mem_ref permissible on hardware. bool SuperWord::is_mem_ref_alignment_ok_for_hardware(MemNode* mem_ref, SWPointer &align_to_ref_p, MemNode* best_align_to_mem_ref) { - assert(vectors_should_be_aligned(), "only query this if alignment required"); - int vw = vector_width(mem_ref); - int vw_best = vector_width(best_align_to_mem_ref); - if (vw > vw_best) { - // Do not vectorize a memory access with more elements per vector - // if unaligned memory access is not allowed because number of - // iterations in pre-loop will be not enough to align it. - return false; - } else { - SWPointer p2(best_align_to_mem_ref, this, NULL, false); - if (!align_to_ref_p.invar_equals(p2)) { - // Do not vectorize memory accesses with different invariants - // if unaligned memory accesses are not allowed. + if (vectors_should_be_aligned()) { + int vw = vector_width(mem_ref); + int vw_best = vector_width(best_align_to_mem_ref); + if (vw > vw_best) { + // Do not vectorize a memory access with more elements per vector + // if unaligned memory access is not allowed because number of + // iterations in pre-loop will be not enough to align it. return false; + } else { + SWPointer p2(best_align_to_mem_ref, this, NULL, false); + if (!align_to_ref_p.invar_equals(p2)) { + // Do not vectorize memory accesses with different invariants + // if unaligned memory accesses are not allowed. + return false; + } } } return true; } // Check if alignment of mem_ref is consistent with the other packs of same velt type. -bool SuperWord::is_mem_ref_alignment_consistent_with_align_to_refs(MemNode* mem_ref, int iv_adjustment, - Node_List &align_to_refs) { +bool SuperWord::is_mem_ref_aligned_with_same_velt_type(MemNode* mem_ref, int iv_adjustment, + Node_List &align_to_refs) { for (uint i = 0; i < align_to_refs.size(); i++) { MemNode* mr = align_to_refs.at(i)->as_Mem(); - if (mr == mem_ref) { - // Skip when we are looking at same memory operation. - continue; - } - if (same_velt_type(mr, mem_ref) && + if (mr != mem_ref && + same_velt_type(mr, mem_ref) && memory_alignment(mr, iv_adjustment) != 0) { - return false; // misaligned with mr + // mem_ref is misaligned with mr, another ref of the same velt type. + return false; } } - return true; // no misalignment found + // No misalignment found. + return true; } //------------------------------find_align_to_ref--------------------------- diff --git a/src/hotspot/share/opto/superword.hpp b/src/hotspot/share/opto/superword.hpp index 86f8dbb3026a8..521534847cdee 100644 --- a/src/hotspot/share/opto/superword.hpp +++ b/src/hotspot/share/opto/superword.hpp @@ -483,7 +483,7 @@ class SuperWord : public ResourceObj { bool is_mem_ref_alignment_ok_for_hardware(MemNode* mem_ref, SWPointer &align_to_ref_p, MemNode* best_align_to_mem_ref); // Check if alignment of mem_ref is consistent with the other packs of same velt type. - bool is_mem_ref_alignment_consistent_with_align_to_refs(MemNode* mem_ref, int iv_adjustment, Node_List &align_to_refs); + bool is_mem_ref_aligned_with_same_velt_type(MemNode* mem_ref, int iv_adjustment, Node_List &align_to_refs); // Find a memory reference to align the loop induction variable to. MemNode* find_align_to_ref(Node_List &memops, int &idx); // Calculate loop's iv adjustment for this memory ops. From d170f5493b661c8bbf6d5ca0c31a00cb2d3c1a18 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Tue, 7 Feb 2023 16:16:48 +0100 Subject: [PATCH 12/34] remove duplicate verification --- src/hotspot/share/opto/superword.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/hotspot/share/opto/superword.cpp b/src/hotspot/share/opto/superword.cpp index f7dc3347f2518..31a241c4b6b5c 100644 --- a/src/hotspot/share/opto/superword.cpp +++ b/src/hotspot/share/opto/superword.cpp @@ -533,8 +533,6 @@ bool SuperWord::SLP_extract() { combine_packs(); - DEBUG_ONLY(verify_packs();) - construct_my_pack_map(); if (UseVectorCmov) { merge_packs_to_cmove(); From 32df5de50c2ae37fcc6dcd3fd9a81f8a234841d7 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Wed, 8 Feb 2023 09:31:15 +0100 Subject: [PATCH 13/34] refactoring again, better comments, _do_vector_loop only if vector alignment not required --- src/hotspot/share/opto/superword.cpp | 76 +++++++++++++++------------- src/hotspot/share/opto/superword.hpp | 3 -- 2 files changed, 41 insertions(+), 38 deletions(-) diff --git a/src/hotspot/share/opto/superword.cpp b/src/hotspot/share/opto/superword.cpp index 31a241c4b6b5c..9dce2fe96fbff 100644 --- a/src/hotspot/share/opto/superword.cpp +++ b/src/hotspot/share/opto/superword.cpp @@ -762,36 +762,16 @@ bool SuperWord::is_mem_ref_alignment_ok(MemNode* mem_ref, int iv_adjustment, SWP Node_List &align_to_refs) { bool is_aligned_with_best = memory_alignment(mem_ref, best_iv_adjustment) == 0; - // Check if alignment ok for hardware - if (is_aligned_with_best || _do_vector_loop) { - if (!is_mem_ref_alignment_ok_for_hardware(mem_ref, align_to_ref_p, best_align_to_mem_ref)) { + if (vectors_should_be_aligned()) { + // All vectors need to be vector length aligned. We use best_align_to_mem_ref to adjust + // the pre-loop limit such that all vector memory accesses are vector aligned. Hence, we + // must ensure that all mem_refs that we vectorize are aligned with best_align_to_mem_ref. + // These 3 conditions must be fulfilled: + // (1) All packs are aligned with best_align_to_mem_ref. + if (!is_aligned_with_best) { return false; } - } - - // We have a compiler hint, so do not check alignment with other packs. - if (_do_vector_loop) { - return true; - } - - // If hardware does not permit independent unaligned memory operations, - // then all mem_ref must align with best (no matter the velt type). - if (vectors_should_be_aligned() && !is_aligned_with_best) { - return false; - } - - // Check if the alignment of mem_ref is consistent with other packs of the same velt type. - if (same_velt_type(mem_ref, best_align_to_mem_ref)) { - return is_aligned_with_best; - } else { - return is_mem_ref_aligned_with_same_velt_type(mem_ref, iv_adjustment, align_to_refs); - } -} - -// Check if alignment of mem_ref permissible on hardware. -bool SuperWord::is_mem_ref_alignment_ok_for_hardware(MemNode* mem_ref, SWPointer &align_to_ref_p, - MemNode* best_align_to_mem_ref) { - if (vectors_should_be_aligned()) { + // (2) All other vectors have vector_size less or equal to that of best_align_to_mem_ref. int vw = vector_width(mem_ref); int vw_best = vector_width(best_align_to_mem_ref); if (vw > vw_best) { @@ -799,16 +779,42 @@ bool SuperWord::is_mem_ref_alignment_ok_for_hardware(MemNode* mem_ref, SWPointer // if unaligned memory access is not allowed because number of // iterations in pre-loop will be not enough to align it. return false; + } + // (3) Ensure that all vectors have the same invariant. We model memory accesses like this + // address = base + k*iv + constant [+ invar] + // memory_alignment ignores the invariant. + SWPointer p2(best_align_to_mem_ref, this, NULL, false); + if (!align_to_ref_p.invar_equals(p2)) { + // Do not vectorize memory accesses with different invariants + // if unaligned memory accesses are not allowed. + return false; + } + return true; + } else { + // Alignment is not required by the hardware. However, we still have to make sure that + // the memory accesses do not form a cyclic dependency. + + // We have a compiler hint, so do not check alignment with other packs. For now we trust + // the hint. We may create cyclic dependencies (packs that are not independent). Later + // we will filter out packs that are not internally independent. + // This allows us to vectorize cases like this (forward read): + // for (int i ...) { v[i] = v[i + 1] + 5; } + // And the filtering still removes non-vectorizable cases like this (forward write): + // for (int i ...) { v[i + 1] = v[i] + 5; } + if (_do_vector_loop) { + return true; + } + + // An easy way to prevent cyclic dependencies is to require all mem_refs of the same type + // to be exactly aligned. This allows us to vectorize these cases: + // for (int i ...) { v[i] = v[i] + 5; } // same alignment + // for (int i ...) { v[i] = v[i + 32] + 5; } // alignment modulo vector size + if (same_velt_type(mem_ref, best_align_to_mem_ref)) { + return is_aligned_with_best; } else { - SWPointer p2(best_align_to_mem_ref, this, NULL, false); - if (!align_to_ref_p.invar_equals(p2)) { - // Do not vectorize memory accesses with different invariants - // if unaligned memory accesses are not allowed. - return false; - } + return is_mem_ref_aligned_with_same_velt_type(mem_ref, iv_adjustment, align_to_refs); } } - return true; } // Check if alignment of mem_ref is consistent with the other packs of same velt type. diff --git a/src/hotspot/share/opto/superword.hpp b/src/hotspot/share/opto/superword.hpp index 521534847cdee..1bd79264c3661 100644 --- a/src/hotspot/share/opto/superword.hpp +++ b/src/hotspot/share/opto/superword.hpp @@ -479,9 +479,6 @@ class SuperWord : public ResourceObj { bool is_mem_ref_alignment_ok(MemNode* mem_ref, int iv_adjustment, SWPointer &align_to_ref_p, MemNode* best_align_to_mem_ref, int best_iv_adjustment, Node_List &align_to_refs); - // Check if alignment of mem_ref permissible on hardware. - bool is_mem_ref_alignment_ok_for_hardware(MemNode* mem_ref, SWPointer &align_to_ref_p, - MemNode* best_align_to_mem_ref); // Check if alignment of mem_ref is consistent with the other packs of same velt type. bool is_mem_ref_aligned_with_same_velt_type(MemNode* mem_ref, int iv_adjustment, Node_List &align_to_refs); // Find a memory reference to align the loop induction variable to. From 3fa535bc6b8b6dae711f1a74f75d7b6e6b371be2 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Wed, 8 Feb 2023 11:01:17 +0100 Subject: [PATCH 14/34] require avx and sve --- .../superword/TestCyclicDependency.java | 4 ++-- .../vectorization/TestOptionVectorizeIR.java | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java b/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java index 65d65744318e7..a7c84510d8716 100644 --- a/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java +++ b/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java @@ -27,6 +27,8 @@ * @bug 8298935 * @summary Writing forward on array creates cyclic dependency * which leads to wrong result, when ignored. + * @requires vm.compiler2.enabled + * @requires vm.cpu.features ~= ".*avx.*" | vm.cpu.features ~= ".*sve.*" * @library /test/lib / * @run driver TestCyclicDependency */ @@ -34,8 +36,6 @@ import jdk.test.lib.Asserts; import compiler.lib.ir_framework.*; -// TODO: figure out if any of this is hardware dependent! - public class TestCyclicDependency { static final int RANGE = 512; static final int ITER = 100; diff --git a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java index 480e6bf65b3f3..a0cd24c75ed2f 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java @@ -21,14 +21,15 @@ * questions. */ -/** -* @test -* @bug 8298935 -* @summary Test forced vectorization, and check IR for vector instructions -* @requires vm.compiler2.enabled -* @library /test/lib / -* @run driver compiler.vectorization.TestOptionVectorizeIR -*/ +/* + * @test + * @bug 8298935 + * @summary Test forced vectorization, and check IR for vector instructions + * @requires vm.compiler2.enabled + * @requires vm.cpu.features ~= ".*avx.*" | vm.cpu.features ~= ".*sve.*" + * @library /test/lib / + * @run driver compiler.vectorization.TestOptionVectorizeIR + */ package compiler.vectorization; import compiler.lib.ir_framework.*; @@ -197,5 +198,4 @@ static void verify(String name, int[] data, int[] gold) { } } } - } From 0a834cd991a2f94b784ee4abde06825486fcb97f Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Wed, 8 Feb 2023 11:51:12 +0100 Subject: [PATCH 15/34] apply a IR verification only for cpu feature --- .../jtreg/compiler/vectorization/TestOptionVectorizeIR.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java index a0cd24c75ed2f..21443d0efc452 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java @@ -123,8 +123,8 @@ public void runTest6() { } @Test - @IR(counts = {IRNode.POPULATE_INDEX, "> 0"}) - @IR(counts = {IRNode.STORE_VECTOR, "> 0"}) + @IR(applyIfCPUFeatureOr = {"avx2", "true", "sve", "true"}, counts = {IRNode.POPULATE_INDEX, "> 0"}) + @IR(applyIfCPUFeatureOr = {"avx2", "true", "sve", "true"}, counts = {IRNode.STORE_VECTOR, "> 0"}) static void test1(int[] data) { for (int j = 0; j < RANGE; j++) { // Vectorizes even if it is not forced From a7e88e19bc85592664d3d6895b7c7f38ecda8260 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Fri, 17 Feb 2023 12:14:35 +0100 Subject: [PATCH 16/34] typos --- src/hotspot/share/opto/superword.cpp | 6 +++--- .../compiler/loopopts/superword/TestCyclicDependency.java | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/hotspot/share/opto/superword.cpp b/src/hotspot/share/opto/superword.cpp index 9dce2fe96fbff..fa284c64302cb 100644 --- a/src/hotspot/share/opto/superword.cpp +++ b/src/hotspot/share/opto/superword.cpp @@ -783,7 +783,7 @@ bool SuperWord::is_mem_ref_alignment_ok(MemNode* mem_ref, int iv_adjustment, SWP // (3) Ensure that all vectors have the same invariant. We model memory accesses like this // address = base + k*iv + constant [+ invar] // memory_alignment ignores the invariant. - SWPointer p2(best_align_to_mem_ref, this, NULL, false); + SWPointer p2(best_align_to_mem_ref, this, nullptr, false); if (!align_to_ref_p.invar_equals(p2)) { // Do not vectorize memory accesses with different invariants // if unaligned memory accesses are not allowed. @@ -1846,7 +1846,7 @@ void SuperWord::combine_packs() { // Hence: remove the pack if there is a dependence. for (int i = 0; i < _packset.length(); i++) { Node_List* p = _packset.at(i); - if (p != NULL) { + if (p != nullptr) { Node* dependence = find_dependence(p); if (dependence != nullptr) { #ifndef PRODUCT @@ -1859,7 +1859,7 @@ void SuperWord::combine_packs() { print_pack(p); } #endif - _packset.at_put(i, NULL); + _packset.at_put(i, nullptr); } } } diff --git a/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java b/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java index a7c84510d8716..30193e530c2df 100644 --- a/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java +++ b/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java @@ -257,7 +257,7 @@ static void test0(int[] dataI, float[] dataF) { @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) static void test1(int[] dataI, float[] dataF) { for (int i = 0; i < RANGE - 1; i++) { - // dataI has cyclid dependency of distance 1, cannot vectorize + // dataI has cyclic dependency of distance 1, cannot vectorize int v = dataI[i]; dataI[i + 1] = v; dataF[i] = v; // let's not get confused by another type @@ -269,7 +269,7 @@ static void test1(int[] dataI, float[] dataF) { @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) static void test2(int[] dataI, float[] dataF) { for (int i = 0; i < RANGE - 2; i++) { - // dataI has cyclid dependency of distance 2, cannot vectorize + // dataI has cyclic dependency of distance 2, cannot vectorize int v = dataI[i]; dataI[i + 2] = v; dataF[i] = v; // let's not get confused by another type @@ -281,7 +281,7 @@ static void test2(int[] dataI, float[] dataF) { @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) static void test3(int[] dataI, float[] dataF) { for (int i = 0; i < RANGE - 3; i++) { - // dataI has cyclid dependency of distance 3, cannot vectorize + // dataI has cyclic dependency of distance 3, cannot vectorize int v = dataI[i]; dataI[i + 3] = v; dataF[i] = v; // let's not get confused by another type @@ -293,7 +293,7 @@ static void test3(int[] dataI, float[] dataF) { @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) static void test4(int[] dataI, float[] dataF) { for (int i = 1; i < RANGE - 1; i++) { - // dataI has cyclid dependency of distance 2, cannot vectorize + // dataI has cyclic dependency of distance 2, cannot vectorize int v = dataI[i - 1]; dataI[i + 1] = v; dataF[i] = v; // let's not get confused by another type From b3d4d29ab8578ab87e836a2b9f30a4f2993f7ccf Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Fri, 17 Feb 2023 12:51:08 +0100 Subject: [PATCH 17/34] improve IR annotation for TestCyclicDependency.java, allow running it on other platforms --- .../superword/TestCyclicDependency.java | 41 ++++++++----------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java b/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java index 30193e530c2df..6e302f4db0a61 100644 --- a/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java +++ b/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java @@ -28,7 +28,6 @@ * @summary Writing forward on array creates cyclic dependency * which leads to wrong result, when ignored. * @requires vm.compiler2.enabled - * @requires vm.cpu.features ~= ".*avx.*" | vm.cpu.features ~= ".*sve.*" * @library /test/lib / * @run driver TestCyclicDependency */ @@ -241,9 +240,8 @@ public void runTest9() { } @Test - @IR(counts = {IRNode.LOAD_VECTOR, "> 0"}) - @IR(counts = {IRNode.ADD_VI, "> 0"}) - @IR(counts = {IRNode.STORE_VECTOR, "> 0"}) + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_VI, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test0(int[] dataI, float[] dataF) { for (int i = 0; i < RANGE; i++) { // All perfectly aligned, expect vectorization @@ -253,8 +251,7 @@ static void test0(int[] dataI, float[] dataF) { } @Test - @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) - @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test1(int[] dataI, float[] dataF) { for (int i = 0; i < RANGE - 1; i++) { // dataI has cyclic dependency of distance 1, cannot vectorize @@ -265,8 +262,7 @@ static void test1(int[] dataI, float[] dataF) { } @Test - @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) - @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test2(int[] dataI, float[] dataF) { for (int i = 0; i < RANGE - 2; i++) { // dataI has cyclic dependency of distance 2, cannot vectorize @@ -277,8 +273,7 @@ static void test2(int[] dataI, float[] dataF) { } @Test - @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) - @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test3(int[] dataI, float[] dataF) { for (int i = 0; i < RANGE - 3; i++) { // dataI has cyclic dependency of distance 3, cannot vectorize @@ -289,8 +284,7 @@ static void test3(int[] dataI, float[] dataF) { } @Test - @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) - @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test4(int[] dataI, float[] dataF) { for (int i = 1; i < RANGE - 1; i++) { // dataI has cyclic dependency of distance 2, cannot vectorize @@ -301,8 +295,7 @@ static void test4(int[] dataI, float[] dataF) { } @Test - @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) - @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test5a(int[] dataI, float[] dataF) { for (int i = 2; i < RANGE; i++) { // dataI has read / write distance 1, but no cyclic dependency @@ -313,8 +306,7 @@ static void test5a(int[] dataI, float[] dataF) { } @Test - @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) - @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test5b(int[] dataI, float[] dataF) { for (int i = 1; i < RANGE; i++) { // dataI has read / write distance 1, but no cyclic dependency @@ -326,8 +318,7 @@ static void test5b(int[] dataI, float[] dataF) { } @Test - @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) - @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test6a(int[] dataI, float[] dataF) { for (int i = 2; i < RANGE; i++) { // dataI has read / write distance 2, but no cyclic dependency @@ -338,8 +329,7 @@ static void test6a(int[] dataI, float[] dataF) { } @Test - @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) - @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test6b(int[] dataI, float[] dataF) { for (int i = 2; i < RANGE; i++) { // dataI has read / write distance 2, but no cyclic dependency @@ -351,8 +341,8 @@ static void test6b(int[] dataI, float[] dataF) { } @Test - @IR(counts = {IRNode.ADD_VI, "> 0"}) - @IR(counts = {IRNode.ADD_VF, "= 0"}) + @IR(counts = {IRNode.ADD_VI, "> 0", IRNode.ADD_VF, "= 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test7(int[] dataI, float[] dataF) { for (int i = 0; i < RANGE - 32; i++) { // write forward 32 -> more than vector size -> can vectorize @@ -366,8 +356,8 @@ static void test7(int[] dataI, float[] dataF) { } @Test - @IR(counts = {IRNode.ADD_VI, "= 0"}) - @IR(counts = {IRNode.ADD_VF, "> 0"}) + @IR(counts = {IRNode.ADD_VI, "= 0", IRNode.ADD_VF, "> 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test8(int[] dataI, float[] dataF) { for (int i = 0; i < RANGE - 32; i++) { // write forward 32 -> more than vector size -> can vectorize @@ -381,7 +371,8 @@ static void test8(int[] dataI, float[] dataF) { } @Test - @IR(counts = {IRNode.ADD_REDUCTION_VI, "> 0"}) + @IR(counts = {IRNode.ADD_REDUCTION_VI, "> 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test9(int[] dataI, float[] dataF) { int sI = 666; for (int i = 0; i < RANGE; i++) { From f02433bff0a798851d4ab6bccf2dd0f4f26e15a3 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Fri, 17 Feb 2023 14:44:40 +0100 Subject: [PATCH 18/34] Improved IR test TestOptionVectorizeIR.java --- .../vectorization/TestOptionVectorizeIR.java | 641 +++++++++++++++++- 1 file changed, 624 insertions(+), 17 deletions(-) diff --git a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java index 21443d0efc452..a2e6cbf0347d3 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java @@ -26,7 +26,6 @@ * @bug 8298935 * @summary Test forced vectorization, and check IR for vector instructions * @requires vm.compiler2.enabled - * @requires vm.cpu.features ~= ".*avx.*" | vm.cpu.features ~= ".*sve.*" * @library /test/lib / * @run driver compiler.vectorization.TestOptionVectorizeIR */ @@ -44,6 +43,36 @@ public class TestOptionVectorizeIR { int[] gold5 = new int[RANGE]; int[] gold6 = new int[RANGE]; + long[] gold10 = new long[RANGE]; + long[] gold11 = new long[RANGE]; + long[] gold12 = new long[RANGE]; + long[] gold13 = new long[RANGE]; + + short[] gold20 = new short[RANGE]; + short[] gold21 = new short[RANGE]; + short[] gold22 = new short[RANGE]; + short[] gold23 = new short[RANGE]; + + byte[] gold30 = new byte[RANGE]; + byte[] gold31 = new byte[RANGE]; + byte[] gold32 = new byte[RANGE]; + byte[] gold33 = new byte[RANGE]; + + char[] gold40 = new char[RANGE]; + char[] gold41 = new char[RANGE]; + char[] gold42 = new char[RANGE]; + char[] gold43 = new char[RANGE]; + + float[] gold50 = new float[RANGE]; + float[] gold51 = new float[RANGE]; + float[] gold52 = new float[RANGE]; + float[] gold53 = new float[RANGE]; + + double[] gold60 = new double[RANGE]; + double[] gold61 = new double[RANGE]; + double[] gold62 = new double[RANGE]; + double[] gold63 = new double[RANGE]; + public static void main(String args[]) { TestFramework.runWithFlags("-XX:CompileCommand=option,compiler.vectorization.TestOptionVectorizeIR::test*,Vectorize"); } @@ -67,6 +96,66 @@ public static void main(String args[]) { // test6 test1(gold6); test6(gold6); + + // long + init(gold10); + test10(gold10); + init(gold11); + test11(gold11); + init(gold12); + test12(gold12); + init(gold13); + test13(gold13); + + // short + init(gold20); + test20(gold20); + init(gold21); + test21(gold21); + init(gold22); + test22(gold22); + init(gold23); + test23(gold23); + + // byte + init(gold30); + test30(gold30); + init(gold31); + test31(gold31); + init(gold32); + test32(gold32); + init(gold33); + test33(gold33); + + // char + init(gold40); + test40(gold40); + init(gold41); + test41(gold41); + init(gold42); + test42(gold42); + init(gold43); + test43(gold43); + + // float + init(gold50); + test50(gold50); + init(gold51); + test51(gold51); + init(gold52); + test52(gold52); + init(gold53); + test53(gold53); + + // double + init(gold60); + test60(gold60); + init(gold61); + test61(gold61); + init(gold62); + test62(gold62); + init(gold63); + test63(gold63); } @Run(test = "test1") @@ -123,8 +212,8 @@ public void runTest6() { } @Test - @IR(applyIfCPUFeatureOr = {"avx2", "true", "sve", "true"}, counts = {IRNode.POPULATE_INDEX, "> 0"}) - @IR(applyIfCPUFeatureOr = {"avx2", "true", "sve", "true"}, counts = {IRNode.STORE_VECTOR, "> 0"}) + @IR(counts = {IRNode.POPULATE_INDEX, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfCPUFeatureOr = {"avx2", "true", "asimd", "true"}) static void test1(int[] data) { for (int j = 0; j < RANGE; j++) { // Vectorizes even if it is not forced @@ -133,9 +222,8 @@ static void test1(int[] data) { } @Test - @IR(counts = {IRNode.LOAD_VECTOR, "> 0"}) - @IR(counts = {IRNode.ADD_VI, "> 0"}) - @IR(counts = {IRNode.STORE_VECTOR, "> 0"}) + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_VI, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test2(int[] data) { for (int j = 0; j < RANGE - 1; j++) { // Only vectorizes if forced, because of offset by 1 @@ -144,11 +232,8 @@ static void test2(int[] data) { } @Test - @IR(counts = {IRNode.LOAD_VECTOR, "> 0"}) - @IR(counts = {IRNode.REPLICATE_I, "> 0"}) - @IR(counts = {IRNode.ADD_VI, "> 0"}) - @IR(counts = {IRNode.MUL_VI, "> 0"}) - @IR(counts = {IRNode.STORE_VECTOR, "> 0"}) + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.REPLICATE_I, "> 0", IRNode.ADD_VI, "> 0", IRNode.MUL_VI, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test3(int[] data, int A, int B) { for (int j = 0; j < RANGE - 1; j++) { // Only vectorizes if forced, because of offset by 1 @@ -157,8 +242,7 @@ static void test3(int[] data, int A, int B) { } @Test - @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) - @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test4(int[] data) { for (int j = 0; j < RANGE - 1; j++) { // write forward -> cyclic dependency -> cannot vectorize @@ -168,8 +252,7 @@ static void test4(int[] data) { } @Test - @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) - @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test5(int[] data) { for (int j = 0; j < RANGE - 3; j++) { // write forward -> cyclic dependency -> cannot vectorize @@ -180,8 +263,7 @@ static void test5(int[] data) { } @Test - @IR(counts = {IRNode.LOAD_VECTOR, "= 0"}) - @IR(counts = {IRNode.STORE_VECTOR, "= 0"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test6(int[] data) { for (int j = 0; j < RANGE - 3; j++) { // write forward -> cyclic dependency -> cannot vectorize @@ -191,6 +273,483 @@ static void test6(int[] data) { } } + // ------------------------- Long ----------------------------- + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) + static void test10(long[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j + 2]; + } + } + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) + static void test11(long[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j + 1]; + } + } + + @Test + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) + static void test12(long[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j - 1]; + } + } + + @Test + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}, + applyIfCPUFeatureOr = {"sse4.1", "false", "avx2", "true", "asimd", "true"}) + static void test13(long[] data) { + // 128-bit vectors -> can vectorize because only 2 elements + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j - 2]; + } + } + + @Run(test = "test10") + @Warmup(100) + public void runTest10() { + long[] data = new long[RANGE]; + init(data); + test10(data); + verify("test10", data, gold10); + } + + @Run(test = "test11") + @Warmup(100) + public void runTest11() { + long[] data = new long[RANGE]; + init(data); + test11(data); + verify("test11", data, gold11); + } + + @Run(test = "test12") + @Warmup(100) + public void runTest12() { + long[] data = new long[RANGE]; + init(data); + test12(data); + verify("test12", data, gold12); + } + + @Run(test = "test13") + @Warmup(100) + public void runTest13() { + long[] data = new long[RANGE]; + init(data); + test13(data); + verify("test13", data, gold13); + } + + + // ------------------------- Short ----------------------------- + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) + static void test20(short[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j + 2]; + } + } + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) + static void test21(short[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j + 1]; + } + } + + @Test + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) + static void test22(short[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j - 1]; + } + } + + @Test + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) + static void test23(short[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j - 2]; + } + } + + @Run(test = "test20") + @Warmup(100) + public void runTest20() { + short[] data = new short[RANGE]; + init(data); + test20(data); + verify("test20", data, gold20); + } + + @Run(test = "test21") + @Warmup(100) + public void runTest21() { + short[] data = new short[RANGE]; + init(data); + test21(data); + verify("test21", data, gold21); + } + + @Run(test = "test22") + @Warmup(100) + public void runTest22() { + short[] data = new short[RANGE]; + init(data); + test22(data); + verify("test22", data, gold22); + } + + @Run(test = "test23") + @Warmup(100) + public void runTest23() { + short[] data = new short[RANGE]; + init(data); + test23(data); + verify("test23", data, gold23); + } + + + // ------------------------- Byte ----------------------------- + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) + static void test30(byte[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j + 2]; + } + } + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) + static void test31(byte[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j + 1]; + } + } + + @Test + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) + static void test32(byte[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j - 1]; + } + } + + @Test + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) + static void test33(byte[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j - 2]; + } + } + + @Run(test = "test30") + @Warmup(100) + public void runTest30() { + byte[] data = new byte[RANGE]; + init(data); + test30(data); + verify("test30", data, gold30); + } + + @Run(test = "test31") + @Warmup(100) + public void runTest31() { + byte[] data = new byte[RANGE]; + init(data); + test31(data); + verify("test31", data, gold31); + } + + @Run(test = "test32") + @Warmup(100) + public void runTest32() { + byte[] data = new byte[RANGE]; + init(data); + test32(data); + verify("test32", data, gold32); + } + + @Run(test = "test33") + @Warmup(100) + public void runTest33() { + byte[] data = new byte[RANGE]; + init(data); + test33(data); + verify("test33", data, gold33); + } + + + // ------------------------- Char ----------------------------- + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) + static void test40(char[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j + 2]; + } + } + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) + static void test41(char[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j + 1]; + } + } + + @Test + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) + static void test42(char[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j - 1]; + } + } + + @Test + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) + static void test43(char[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j - 2]; + } + } + + @Run(test = "test40") + @Warmup(100) + public void runTest40() { + char[] data = new char[RANGE]; + init(data); + test40(data); + verify("test40", data, gold40); + } + + @Run(test = "test41") + @Warmup(100) + public void runTest41() { + char[] data = new char[RANGE]; + init(data); + test41(data); + verify("test41", data, gold41); + } + + @Run(test = "test42") + @Warmup(100) + public void runTest42() { + char[] data = new char[RANGE]; + init(data); + test42(data); + verify("test42", data, gold42); + } + + @Run(test = "test43") + @Warmup(100) + public void runTest43() { + char[] data = new char[RANGE]; + init(data); + test43(data); + verify("test43", data, gold43); + } + + // ------------------------- Float ----------------------------- + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) + static void test50(float[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j + 2]; + } + } + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) + static void test51(float[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j + 1]; + } + } + + @Test + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) + static void test52(float[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j - 1]; + } + } + + @Test + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) + static void test53(float[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j - 2]; + } + } + + @Run(test = "test50") + @Warmup(100) + public void runTest50() { + float[] data = new float[RANGE]; + init(data); + test50(data); + verify("test50", data, gold50); + } + + @Run(test = "test51") + @Warmup(100) + public void runTest51() { + float[] data = new float[RANGE]; + init(data); + test51(data); + verify("test51", data, gold51); + } + + @Run(test = "test52") + @Warmup(100) + public void runTest52() { + float[] data = new float[RANGE]; + init(data); + test52(data); + verify("test52", data, gold52); + } + + @Run(test = "test53") + @Warmup(100) + public void runTest53() { + float[] data = new float[RANGE]; + init(data); + test53(data); + verify("test53", data, gold53); + } + + // ------------------------- Double ----------------------------- + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) + static void test60(double[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j + 2]; + } + } + + @Test + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) + static void test61(double[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j + 1]; + } + } + + @Test + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) + static void test62(double[] data) { + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j - 1]; + } + } + + @Test + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}, + applyIfCPUFeatureOr = {"sse4.1", "false", "avx2", "true", "asimd", "true"}) + static void test63(double[] data) { + // 128-bit vectors -> can vectorize because only 2 elements + for (int j = 2; j < RANGE - 2; j++) { + data[j] += data[j - 2]; + } + } + + @Run(test = "test60") + @Warmup(100) + public void runTest60() { + double[] data = new double[RANGE]; + init(data); + test60(data); + verify("test60", data, gold60); + } + + @Run(test = "test61") + @Warmup(100) + public void runTest61() { + double[] data = new double[RANGE]; + init(data); + test61(data); + verify("test61", data, gold61); + } + + @Run(test = "test62") + @Warmup(100) + public void runTest62() { + double[] data = new double[RANGE]; + init(data); + test62(data); + verify("test62", data, gold62); + } + + @Run(test = "test63") + @Warmup(100) + public void runTest63() { + double[] data = new double[RANGE]; + init(data); + test63(data); + verify("test63", data, gold63); + } + + static void init(long[] data) { + for (int j = 0; j < RANGE; j++) { + data[j] = j; + } + } + + static void init(short[] data) { + for (int j = 0; j < RANGE; j++) { + data[j] = (short)j; + } + } + + static void init(byte[] data) { + for (int j = 0; j < RANGE; j++) { + data[j] = (byte)j; + } + } + + static void init(char[] data) { + for (int j = 0; j < RANGE; j++) { + data[j] = (char)j; + } + } + + + static void init(float[] data) { + for (int j = 0; j < RANGE; j++) { + data[j] = j; + } + } + + + static void init(double[] data) { + for (int j = 0; j < RANGE; j++) { + data[j] = j; + } + } + static void verify(String name, int[] data, int[] gold) { for (int i = 0; i < RANGE; i++) { if (data[i] != gold[i]) { @@ -198,4 +757,52 @@ static void verify(String name, int[] data, int[] gold) { } } } + + static void verify(String name, long[] data, long[] gold) { + for (int i = 0; i < RANGE; i++) { + if (data[i] != gold[i]) { + throw new RuntimeException(" Invalid " + name + " result: data[" + i + "]: " + data[i] + " != " + gold[i]); + } + } + } + + static void verify(String name, short[] data, short[] gold) { + for (int i = 0; i < RANGE; i++) { + if (data[i] != gold[i]) { + throw new RuntimeException(" Invalid " + name + " result: data[" + i + "]: " + data[i] + " != " + gold[i]); + } + } + } + + static void verify(String name, byte[] data, byte[] gold) { + for (int i = 0; i < RANGE; i++) { + if (data[i] != gold[i]) { + throw new RuntimeException(" Invalid " + name + " result: data[" + i + "]: " + data[i] + " != " + gold[i]); + } + } + } + + static void verify(String name, char[] data, char[] gold) { + for (int i = 0; i < RANGE; i++) { + if (data[i] != gold[i]) { + throw new RuntimeException(" Invalid " + name + " result: data[" + i + "]: " + data[i] + " != " + gold[i]); + } + } + } + + static void verify(String name, float[] data, float[] gold) { + for (int i = 0; i < RANGE; i++) { + if (data[i] != gold[i]) { + throw new RuntimeException(" Invalid " + name + " result: data[" + i + "]: " + data[i] + " != " + gold[i]); + } + } + } + + static void verify(String name, double[] data, double[] gold) { + for (int i = 0; i < RANGE; i++) { + if (data[i] != gold[i]) { + throw new RuntimeException(" Invalid " + name + " result: data[" + i + "]: " + data[i] + " != " + gold[i]); + } + } + } } From 796eb3fe04ce367aaa8811f0262823af19bae4a2 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Fri, 17 Feb 2023 15:56:01 +0100 Subject: [PATCH 19/34] fixed a few IR cpuFeature requirements --- .../jtreg/compiler/vectorization/TestOptionVectorizeIR.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java index a2e6cbf0347d3..290b8957e525b 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java @@ -213,7 +213,7 @@ public void runTest6() { @Test @IR(counts = {IRNode.POPULATE_INDEX, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfCPUFeatureOr = {"avx2", "true", "asimd", "true"}) + applyIfCPUFeatureOr = {"avx2", "true", "sve", "true"}) static void test1(int[] data) { for (int j = 0; j < RANGE; j++) { // Vectorizes even if it is not forced @@ -303,7 +303,7 @@ static void test12(long[] data) { @Test @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}, - applyIfCPUFeatureOr = {"sse4.1", "false", "avx2", "true", "asimd", "true"}) + applyIfCPUFeatureOr = {"avx2", "true", "asimd", "true"}) static void test13(long[] data) { // 128-bit vectors -> can vectorize because only 2 elements for (int j = 2; j < RANGE - 2; j++) { @@ -668,7 +668,7 @@ static void test62(double[] data) { @Test @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}, - applyIfCPUFeatureOr = {"sse4.1", "false", "avx2", "true", "asimd", "true"}) + applyIfCPUFeatureOr = {"avx2", "true", "asimd", "true"}) static void test63(double[] data) { // 128-bit vectors -> can vectorize because only 2 elements for (int j = 2; j < RANGE - 2; j++) { From 4ebfa80e927b726e9cf1185cca22ce90a950d5f8 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Fri, 17 Feb 2023 16:30:17 +0100 Subject: [PATCH 20/34] fixed another IR cpuFeature issue for aarch64 asimd vs sve --- .../jtreg/compiler/vectorization/TestOptionVectorizeIR.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java index 290b8957e525b..5c4a8fe49b463 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java @@ -303,7 +303,7 @@ static void test12(long[] data) { @Test @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}, - applyIfCPUFeatureOr = {"avx2", "true", "asimd", "true"}) + applyIfCPUFeatureOr = {"avx2", "true", "sve", "true"}) static void test13(long[] data) { // 128-bit vectors -> can vectorize because only 2 elements for (int j = 2; j < RANGE - 2; j++) { @@ -668,7 +668,7 @@ static void test62(double[] data) { @Test @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}, - applyIfCPUFeatureOr = {"avx2", "true", "asimd", "true"}) + applyIfCPUFeatureOr = {"avx2", "true", "sve", "true"}) static void test63(double[] data) { // 128-bit vectors -> can vectorize because only 2 elements for (int j = 2; j < RANGE - 2; j++) { From 08cccf42bd2c5054b7bf838294a616ba75425898 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Tue, 21 Feb 2023 08:55:45 +0100 Subject: [PATCH 21/34] Regression test for Test.java byte case that crashed on arm --- .../vectorization/TestForEachRem.java | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/test/hotspot/jtreg/compiler/vectorization/TestForEachRem.java b/test/hotspot/jtreg/compiler/vectorization/TestForEachRem.java index 5866f2c56e84a..368b0ae654a00 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestForEachRem.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestForEachRem.java @@ -32,6 +32,7 @@ * @run main/othervm -Xbatch compiler.vectorization.TestForEachRem test3 * @run main/othervm -Xbatch compiler.vectorization.TestForEachRem test4 * @run main/othervm -Xbatch compiler.vectorization.TestForEachRem test5 + * @run main/othervm -Xbatch compiler.vectorization.TestForEachRem test6 */ package compiler.vectorization; @@ -72,6 +73,19 @@ static void test5(int[] data) { }); } + static void initByte(byte[] data) { + IntStream.range(0, RANGE).parallel().forEach(j -> { + data[j] = (byte)j; + }); + } + + static void test6(byte[] data) { + // 2-byte offset -> can only vectorize if alignment not required by hardware + IntStream.range(0, RANGE - 2).forEach(j -> { + data[j] = data[j + 2]; + }); + } + static void verify(String name, int[] data, int[] gold) { for (int i = 0; i < RANGE; i++) { if (data[i] != gold[i]) { @@ -80,9 +94,19 @@ static void verify(String name, int[] data, int[] gold) { } } + static void verify(String name, byte[] data, byte[] gold) { + for (int i = 0; i < RANGE; i++) { + if (data[i] != gold[i]) { + throw new RuntimeException(" Invalid " + name + " result: data[" + i + "]: " + data[i] + " != " + gold[i]); + } + } + } + public static void main(String[] args) { int[] data = new int[RANGE]; int[] gold = new int[RANGE]; + byte[] dataB = new byte[RANGE]; + byte[] goldB = new byte[RANGE]; if (args.length == 0) { throw new RuntimeException(" Missing test name: test1, test2, test3, test4, test5"); @@ -145,5 +169,18 @@ public static void main(String[] args) { verify("test5", data, gold); System.out.println(" Finished test5."); } + + if (args[0].equals("test6")) { + System.out.println(" Run test6 ..."); + initByte(goldB); // reset + test6(goldB); + for (int i = 0; i < ITER; i++) { + initByte(dataB); // reset + test6(dataB); + } + verify("test6", dataB, goldB); + System.out.println(" Finished test6."); + } + } } From 7033a873d7116977abddfae7c238ee654ced2bd5 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Tue, 28 Feb 2023 11:19:23 +0100 Subject: [PATCH 22/34] Version 1 of script-generated offset dependency test --- .../superword/TestDependencyOffsets.java | 11205 ++++++++++++++++ 1 file changed, 11205 insertions(+) create mode 100644 test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java diff --git a/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java b/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java new file mode 100644 index 0000000000000..206b351525c05 --- /dev/null +++ b/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java @@ -0,0 +1,11205 @@ +/* + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8298935 + * @summary Test SuperWord vectorization with different access offsets + * and various SuperWordMaxVectorSize values, and +- AlignVector. + * Note: CompileCommand Option Vectorize is enabled. + * @requires vm.compiler2.enabled + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets + */ + +package compiler.loopopts.superword; +import compiler.lib.ir_framework.*; + +/* + * Note: this test is auto-generated. Please modify / generate with script: + * https://bugs.openjdk.org/browse/JDK-8298935 + * + * Types: int, long, short, char, byte, float, double + * Offsets: 0, -1, 1, -2, 2, -3, 3, -4, 4, -7, 7, -8, 8, -15, 15, -16, 16, -31, 31, -32, 32, -63, 63, -64, 64, -65, 65, -128, 128, -129, 129, -192, 192 + * + * Checking if we should vectorize is a bit complicated. It depends on + * Matcher::vector_width_in_bytes, of the respective platforms (eg. x86.ad) + * This vector_width can be further constrained by SuperWordMaxVectorSize. + * + * Generally, we vectorize if: + * - Vectors have at least 4 bytes: vector_width >= 4 + * - Vectors hold at least 2 elements: vector_width >= 2 * sizeofop(velt_type) + * - No cyclic dependency: + * - Access: data[i + offset] = data[i] * fac; + * - byte_offset = offset * sizeofop(type) + * - Cyclic dependency if: 0 < byte_offset < vector_width + * + * Note: sizeofop(type) = sizeof(type), except sizeofop(char) = 2 + * + * Different types can lead to different vector_width. This depends on + * the CPU-features. Thus, we have a positive and negative IR rule per + * CPU-feature for each test. +*/ + +public class TestDependencyOffsets { + static final int RANGE = 512; + + static int[] goldIntP0 = new int[RANGE]; + static int[] goldIntM1 = new int[RANGE]; + static int[] goldIntP1 = new int[RANGE]; + static int[] goldIntM2 = new int[RANGE]; + static int[] goldIntP2 = new int[RANGE]; + static int[] goldIntM3 = new int[RANGE]; + static int[] goldIntP3 = new int[RANGE]; + static int[] goldIntM4 = new int[RANGE]; + static int[] goldIntP4 = new int[RANGE]; + static int[] goldIntM7 = new int[RANGE]; + static int[] goldIntP7 = new int[RANGE]; + static int[] goldIntM8 = new int[RANGE]; + static int[] goldIntP8 = new int[RANGE]; + static int[] goldIntM15 = new int[RANGE]; + static int[] goldIntP15 = new int[RANGE]; + static int[] goldIntM16 = new int[RANGE]; + static int[] goldIntP16 = new int[RANGE]; + static int[] goldIntM31 = new int[RANGE]; + static int[] goldIntP31 = new int[RANGE]; + static int[] goldIntM32 = new int[RANGE]; + static int[] goldIntP32 = new int[RANGE]; + static int[] goldIntM63 = new int[RANGE]; + static int[] goldIntP63 = new int[RANGE]; + static int[] goldIntM64 = new int[RANGE]; + static int[] goldIntP64 = new int[RANGE]; + static int[] goldIntM65 = new int[RANGE]; + static int[] goldIntP65 = new int[RANGE]; + static int[] goldIntM128 = new int[RANGE]; + static int[] goldIntP128 = new int[RANGE]; + static int[] goldIntM129 = new int[RANGE]; + static int[] goldIntP129 = new int[RANGE]; + static int[] goldIntM192 = new int[RANGE]; + static int[] goldIntP192 = new int[RANGE]; + static long[] goldLongP0 = new long[RANGE]; + static long[] goldLongM1 = new long[RANGE]; + static long[] goldLongP1 = new long[RANGE]; + static long[] goldLongM2 = new long[RANGE]; + static long[] goldLongP2 = new long[RANGE]; + static long[] goldLongM3 = new long[RANGE]; + static long[] goldLongP3 = new long[RANGE]; + static long[] goldLongM4 = new long[RANGE]; + static long[] goldLongP4 = new long[RANGE]; + static long[] goldLongM7 = new long[RANGE]; + static long[] goldLongP7 = new long[RANGE]; + static long[] goldLongM8 = new long[RANGE]; + static long[] goldLongP8 = new long[RANGE]; + static long[] goldLongM15 = new long[RANGE]; + static long[] goldLongP15 = new long[RANGE]; + static long[] goldLongM16 = new long[RANGE]; + static long[] goldLongP16 = new long[RANGE]; + static long[] goldLongM31 = new long[RANGE]; + static long[] goldLongP31 = new long[RANGE]; + static long[] goldLongM32 = new long[RANGE]; + static long[] goldLongP32 = new long[RANGE]; + static long[] goldLongM63 = new long[RANGE]; + static long[] goldLongP63 = new long[RANGE]; + static long[] goldLongM64 = new long[RANGE]; + static long[] goldLongP64 = new long[RANGE]; + static long[] goldLongM65 = new long[RANGE]; + static long[] goldLongP65 = new long[RANGE]; + static long[] goldLongM128 = new long[RANGE]; + static long[] goldLongP128 = new long[RANGE]; + static long[] goldLongM129 = new long[RANGE]; + static long[] goldLongP129 = new long[RANGE]; + static long[] goldLongM192 = new long[RANGE]; + static long[] goldLongP192 = new long[RANGE]; + static short[] goldShortP0 = new short[RANGE]; + static short[] goldShortM1 = new short[RANGE]; + static short[] goldShortP1 = new short[RANGE]; + static short[] goldShortM2 = new short[RANGE]; + static short[] goldShortP2 = new short[RANGE]; + static short[] goldShortM3 = new short[RANGE]; + static short[] goldShortP3 = new short[RANGE]; + static short[] goldShortM4 = new short[RANGE]; + static short[] goldShortP4 = new short[RANGE]; + static short[] goldShortM7 = new short[RANGE]; + static short[] goldShortP7 = new short[RANGE]; + static short[] goldShortM8 = new short[RANGE]; + static short[] goldShortP8 = new short[RANGE]; + static short[] goldShortM15 = new short[RANGE]; + static short[] goldShortP15 = new short[RANGE]; + static short[] goldShortM16 = new short[RANGE]; + static short[] goldShortP16 = new short[RANGE]; + static short[] goldShortM31 = new short[RANGE]; + static short[] goldShortP31 = new short[RANGE]; + static short[] goldShortM32 = new short[RANGE]; + static short[] goldShortP32 = new short[RANGE]; + static short[] goldShortM63 = new short[RANGE]; + static short[] goldShortP63 = new short[RANGE]; + static short[] goldShortM64 = new short[RANGE]; + static short[] goldShortP64 = new short[RANGE]; + static short[] goldShortM65 = new short[RANGE]; + static short[] goldShortP65 = new short[RANGE]; + static short[] goldShortM128 = new short[RANGE]; + static short[] goldShortP128 = new short[RANGE]; + static short[] goldShortM129 = new short[RANGE]; + static short[] goldShortP129 = new short[RANGE]; + static short[] goldShortM192 = new short[RANGE]; + static short[] goldShortP192 = new short[RANGE]; + static char[] goldCharP0 = new char[RANGE]; + static char[] goldCharM1 = new char[RANGE]; + static char[] goldCharP1 = new char[RANGE]; + static char[] goldCharM2 = new char[RANGE]; + static char[] goldCharP2 = new char[RANGE]; + static char[] goldCharM3 = new char[RANGE]; + static char[] goldCharP3 = new char[RANGE]; + static char[] goldCharM4 = new char[RANGE]; + static char[] goldCharP4 = new char[RANGE]; + static char[] goldCharM7 = new char[RANGE]; + static char[] goldCharP7 = new char[RANGE]; + static char[] goldCharM8 = new char[RANGE]; + static char[] goldCharP8 = new char[RANGE]; + static char[] goldCharM15 = new char[RANGE]; + static char[] goldCharP15 = new char[RANGE]; + static char[] goldCharM16 = new char[RANGE]; + static char[] goldCharP16 = new char[RANGE]; + static char[] goldCharM31 = new char[RANGE]; + static char[] goldCharP31 = new char[RANGE]; + static char[] goldCharM32 = new char[RANGE]; + static char[] goldCharP32 = new char[RANGE]; + static char[] goldCharM63 = new char[RANGE]; + static char[] goldCharP63 = new char[RANGE]; + static char[] goldCharM64 = new char[RANGE]; + static char[] goldCharP64 = new char[RANGE]; + static char[] goldCharM65 = new char[RANGE]; + static char[] goldCharP65 = new char[RANGE]; + static char[] goldCharM128 = new char[RANGE]; + static char[] goldCharP128 = new char[RANGE]; + static char[] goldCharM129 = new char[RANGE]; + static char[] goldCharP129 = new char[RANGE]; + static char[] goldCharM192 = new char[RANGE]; + static char[] goldCharP192 = new char[RANGE]; + static byte[] goldByteP0 = new byte[RANGE]; + static byte[] goldByteM1 = new byte[RANGE]; + static byte[] goldByteP1 = new byte[RANGE]; + static byte[] goldByteM2 = new byte[RANGE]; + static byte[] goldByteP2 = new byte[RANGE]; + static byte[] goldByteM3 = new byte[RANGE]; + static byte[] goldByteP3 = new byte[RANGE]; + static byte[] goldByteM4 = new byte[RANGE]; + static byte[] goldByteP4 = new byte[RANGE]; + static byte[] goldByteM7 = new byte[RANGE]; + static byte[] goldByteP7 = new byte[RANGE]; + static byte[] goldByteM8 = new byte[RANGE]; + static byte[] goldByteP8 = new byte[RANGE]; + static byte[] goldByteM15 = new byte[RANGE]; + static byte[] goldByteP15 = new byte[RANGE]; + static byte[] goldByteM16 = new byte[RANGE]; + static byte[] goldByteP16 = new byte[RANGE]; + static byte[] goldByteM31 = new byte[RANGE]; + static byte[] goldByteP31 = new byte[RANGE]; + static byte[] goldByteM32 = new byte[RANGE]; + static byte[] goldByteP32 = new byte[RANGE]; + static byte[] goldByteM63 = new byte[RANGE]; + static byte[] goldByteP63 = new byte[RANGE]; + static byte[] goldByteM64 = new byte[RANGE]; + static byte[] goldByteP64 = new byte[RANGE]; + static byte[] goldByteM65 = new byte[RANGE]; + static byte[] goldByteP65 = new byte[RANGE]; + static byte[] goldByteM128 = new byte[RANGE]; + static byte[] goldByteP128 = new byte[RANGE]; + static byte[] goldByteM129 = new byte[RANGE]; + static byte[] goldByteP129 = new byte[RANGE]; + static byte[] goldByteM192 = new byte[RANGE]; + static byte[] goldByteP192 = new byte[RANGE]; + static float[] goldFloatP0 = new float[RANGE]; + static float[] goldFloatM1 = new float[RANGE]; + static float[] goldFloatP1 = new float[RANGE]; + static float[] goldFloatM2 = new float[RANGE]; + static float[] goldFloatP2 = new float[RANGE]; + static float[] goldFloatM3 = new float[RANGE]; + static float[] goldFloatP3 = new float[RANGE]; + static float[] goldFloatM4 = new float[RANGE]; + static float[] goldFloatP4 = new float[RANGE]; + static float[] goldFloatM7 = new float[RANGE]; + static float[] goldFloatP7 = new float[RANGE]; + static float[] goldFloatM8 = new float[RANGE]; + static float[] goldFloatP8 = new float[RANGE]; + static float[] goldFloatM15 = new float[RANGE]; + static float[] goldFloatP15 = new float[RANGE]; + static float[] goldFloatM16 = new float[RANGE]; + static float[] goldFloatP16 = new float[RANGE]; + static float[] goldFloatM31 = new float[RANGE]; + static float[] goldFloatP31 = new float[RANGE]; + static float[] goldFloatM32 = new float[RANGE]; + static float[] goldFloatP32 = new float[RANGE]; + static float[] goldFloatM63 = new float[RANGE]; + static float[] goldFloatP63 = new float[RANGE]; + static float[] goldFloatM64 = new float[RANGE]; + static float[] goldFloatP64 = new float[RANGE]; + static float[] goldFloatM65 = new float[RANGE]; + static float[] goldFloatP65 = new float[RANGE]; + static float[] goldFloatM128 = new float[RANGE]; + static float[] goldFloatP128 = new float[RANGE]; + static float[] goldFloatM129 = new float[RANGE]; + static float[] goldFloatP129 = new float[RANGE]; + static float[] goldFloatM192 = new float[RANGE]; + static float[] goldFloatP192 = new float[RANGE]; + static double[] goldDoubleP0 = new double[RANGE]; + static double[] goldDoubleM1 = new double[RANGE]; + static double[] goldDoubleP1 = new double[RANGE]; + static double[] goldDoubleM2 = new double[RANGE]; + static double[] goldDoubleP2 = new double[RANGE]; + static double[] goldDoubleM3 = new double[RANGE]; + static double[] goldDoubleP3 = new double[RANGE]; + static double[] goldDoubleM4 = new double[RANGE]; + static double[] goldDoubleP4 = new double[RANGE]; + static double[] goldDoubleM7 = new double[RANGE]; + static double[] goldDoubleP7 = new double[RANGE]; + static double[] goldDoubleM8 = new double[RANGE]; + static double[] goldDoubleP8 = new double[RANGE]; + static double[] goldDoubleM15 = new double[RANGE]; + static double[] goldDoubleP15 = new double[RANGE]; + static double[] goldDoubleM16 = new double[RANGE]; + static double[] goldDoubleP16 = new double[RANGE]; + static double[] goldDoubleM31 = new double[RANGE]; + static double[] goldDoubleP31 = new double[RANGE]; + static double[] goldDoubleM32 = new double[RANGE]; + static double[] goldDoubleP32 = new double[RANGE]; + static double[] goldDoubleM63 = new double[RANGE]; + static double[] goldDoubleP63 = new double[RANGE]; + static double[] goldDoubleM64 = new double[RANGE]; + static double[] goldDoubleP64 = new double[RANGE]; + static double[] goldDoubleM65 = new double[RANGE]; + static double[] goldDoubleP65 = new double[RANGE]; + static double[] goldDoubleM128 = new double[RANGE]; + static double[] goldDoubleP128 = new double[RANGE]; + static double[] goldDoubleM129 = new double[RANGE]; + static double[] goldDoubleP129 = new double[RANGE]; + static double[] goldDoubleM192 = new double[RANGE]; + static double[] goldDoubleP192 = new double[RANGE]; + + static { + // compute the gold standard in interpreter mode + init(goldIntP0); + testIntP0(goldIntP0); + init(goldIntM1); + testIntM1(goldIntM1); + init(goldIntP1); + testIntP1(goldIntP1); + init(goldIntM2); + testIntM2(goldIntM2); + init(goldIntP2); + testIntP2(goldIntP2); + init(goldIntM3); + testIntM3(goldIntM3); + init(goldIntP3); + testIntP3(goldIntP3); + init(goldIntM4); + testIntM4(goldIntM4); + init(goldIntP4); + testIntP4(goldIntP4); + init(goldIntM7); + testIntM7(goldIntM7); + init(goldIntP7); + testIntP7(goldIntP7); + init(goldIntM8); + testIntM8(goldIntM8); + init(goldIntP8); + testIntP8(goldIntP8); + init(goldIntM15); + testIntM15(goldIntM15); + init(goldIntP15); + testIntP15(goldIntP15); + init(goldIntM16); + testIntM16(goldIntM16); + init(goldIntP16); + testIntP16(goldIntP16); + init(goldIntM31); + testIntM31(goldIntM31); + init(goldIntP31); + testIntP31(goldIntP31); + init(goldIntM32); + testIntM32(goldIntM32); + init(goldIntP32); + testIntP32(goldIntP32); + init(goldIntM63); + testIntM63(goldIntM63); + init(goldIntP63); + testIntP63(goldIntP63); + init(goldIntM64); + testIntM64(goldIntM64); + init(goldIntP64); + testIntP64(goldIntP64); + init(goldIntM65); + testIntM65(goldIntM65); + init(goldIntP65); + testIntP65(goldIntP65); + init(goldIntM128); + testIntM128(goldIntM128); + init(goldIntP128); + testIntP128(goldIntP128); + init(goldIntM129); + testIntM129(goldIntM129); + init(goldIntP129); + testIntP129(goldIntP129); + init(goldIntM192); + testIntM192(goldIntM192); + init(goldIntP192); + testIntP192(goldIntP192); + init(goldLongP0); + testLongP0(goldLongP0); + init(goldLongM1); + testLongM1(goldLongM1); + init(goldLongP1); + testLongP1(goldLongP1); + init(goldLongM2); + testLongM2(goldLongM2); + init(goldLongP2); + testLongP2(goldLongP2); + init(goldLongM3); + testLongM3(goldLongM3); + init(goldLongP3); + testLongP3(goldLongP3); + init(goldLongM4); + testLongM4(goldLongM4); + init(goldLongP4); + testLongP4(goldLongP4); + init(goldLongM7); + testLongM7(goldLongM7); + init(goldLongP7); + testLongP7(goldLongP7); + init(goldLongM8); + testLongM8(goldLongM8); + init(goldLongP8); + testLongP8(goldLongP8); + init(goldLongM15); + testLongM15(goldLongM15); + init(goldLongP15); + testLongP15(goldLongP15); + init(goldLongM16); + testLongM16(goldLongM16); + init(goldLongP16); + testLongP16(goldLongP16); + init(goldLongM31); + testLongM31(goldLongM31); + init(goldLongP31); + testLongP31(goldLongP31); + init(goldLongM32); + testLongM32(goldLongM32); + init(goldLongP32); + testLongP32(goldLongP32); + init(goldLongM63); + testLongM63(goldLongM63); + init(goldLongP63); + testLongP63(goldLongP63); + init(goldLongM64); + testLongM64(goldLongM64); + init(goldLongP64); + testLongP64(goldLongP64); + init(goldLongM65); + testLongM65(goldLongM65); + init(goldLongP65); + testLongP65(goldLongP65); + init(goldLongM128); + testLongM128(goldLongM128); + init(goldLongP128); + testLongP128(goldLongP128); + init(goldLongM129); + testLongM129(goldLongM129); + init(goldLongP129); + testLongP129(goldLongP129); + init(goldLongM192); + testLongM192(goldLongM192); + init(goldLongP192); + testLongP192(goldLongP192); + init(goldShortP0); + testShortP0(goldShortP0); + init(goldShortM1); + testShortM1(goldShortM1); + init(goldShortP1); + testShortP1(goldShortP1); + init(goldShortM2); + testShortM2(goldShortM2); + init(goldShortP2); + testShortP2(goldShortP2); + init(goldShortM3); + testShortM3(goldShortM3); + init(goldShortP3); + testShortP3(goldShortP3); + init(goldShortM4); + testShortM4(goldShortM4); + init(goldShortP4); + testShortP4(goldShortP4); + init(goldShortM7); + testShortM7(goldShortM7); + init(goldShortP7); + testShortP7(goldShortP7); + init(goldShortM8); + testShortM8(goldShortM8); + init(goldShortP8); + testShortP8(goldShortP8); + init(goldShortM15); + testShortM15(goldShortM15); + init(goldShortP15); + testShortP15(goldShortP15); + init(goldShortM16); + testShortM16(goldShortM16); + init(goldShortP16); + testShortP16(goldShortP16); + init(goldShortM31); + testShortM31(goldShortM31); + init(goldShortP31); + testShortP31(goldShortP31); + init(goldShortM32); + testShortM32(goldShortM32); + init(goldShortP32); + testShortP32(goldShortP32); + init(goldShortM63); + testShortM63(goldShortM63); + init(goldShortP63); + testShortP63(goldShortP63); + init(goldShortM64); + testShortM64(goldShortM64); + init(goldShortP64); + testShortP64(goldShortP64); + init(goldShortM65); + testShortM65(goldShortM65); + init(goldShortP65); + testShortP65(goldShortP65); + init(goldShortM128); + testShortM128(goldShortM128); + init(goldShortP128); + testShortP128(goldShortP128); + init(goldShortM129); + testShortM129(goldShortM129); + init(goldShortP129); + testShortP129(goldShortP129); + init(goldShortM192); + testShortM192(goldShortM192); + init(goldShortP192); + testShortP192(goldShortP192); + init(goldCharP0); + testCharP0(goldCharP0); + init(goldCharM1); + testCharM1(goldCharM1); + init(goldCharP1); + testCharP1(goldCharP1); + init(goldCharM2); + testCharM2(goldCharM2); + init(goldCharP2); + testCharP2(goldCharP2); + init(goldCharM3); + testCharM3(goldCharM3); + init(goldCharP3); + testCharP3(goldCharP3); + init(goldCharM4); + testCharM4(goldCharM4); + init(goldCharP4); + testCharP4(goldCharP4); + init(goldCharM7); + testCharM7(goldCharM7); + init(goldCharP7); + testCharP7(goldCharP7); + init(goldCharM8); + testCharM8(goldCharM8); + init(goldCharP8); + testCharP8(goldCharP8); + init(goldCharM15); + testCharM15(goldCharM15); + init(goldCharP15); + testCharP15(goldCharP15); + init(goldCharM16); + testCharM16(goldCharM16); + init(goldCharP16); + testCharP16(goldCharP16); + init(goldCharM31); + testCharM31(goldCharM31); + init(goldCharP31); + testCharP31(goldCharP31); + init(goldCharM32); + testCharM32(goldCharM32); + init(goldCharP32); + testCharP32(goldCharP32); + init(goldCharM63); + testCharM63(goldCharM63); + init(goldCharP63); + testCharP63(goldCharP63); + init(goldCharM64); + testCharM64(goldCharM64); + init(goldCharP64); + testCharP64(goldCharP64); + init(goldCharM65); + testCharM65(goldCharM65); + init(goldCharP65); + testCharP65(goldCharP65); + init(goldCharM128); + testCharM128(goldCharM128); + init(goldCharP128); + testCharP128(goldCharP128); + init(goldCharM129); + testCharM129(goldCharM129); + init(goldCharP129); + testCharP129(goldCharP129); + init(goldCharM192); + testCharM192(goldCharM192); + init(goldCharP192); + testCharP192(goldCharP192); + init(goldByteP0); + testByteP0(goldByteP0); + init(goldByteM1); + testByteM1(goldByteM1); + init(goldByteP1); + testByteP1(goldByteP1); + init(goldByteM2); + testByteM2(goldByteM2); + init(goldByteP2); + testByteP2(goldByteP2); + init(goldByteM3); + testByteM3(goldByteM3); + init(goldByteP3); + testByteP3(goldByteP3); + init(goldByteM4); + testByteM4(goldByteM4); + init(goldByteP4); + testByteP4(goldByteP4); + init(goldByteM7); + testByteM7(goldByteM7); + init(goldByteP7); + testByteP7(goldByteP7); + init(goldByteM8); + testByteM8(goldByteM8); + init(goldByteP8); + testByteP8(goldByteP8); + init(goldByteM15); + testByteM15(goldByteM15); + init(goldByteP15); + testByteP15(goldByteP15); + init(goldByteM16); + testByteM16(goldByteM16); + init(goldByteP16); + testByteP16(goldByteP16); + init(goldByteM31); + testByteM31(goldByteM31); + init(goldByteP31); + testByteP31(goldByteP31); + init(goldByteM32); + testByteM32(goldByteM32); + init(goldByteP32); + testByteP32(goldByteP32); + init(goldByteM63); + testByteM63(goldByteM63); + init(goldByteP63); + testByteP63(goldByteP63); + init(goldByteM64); + testByteM64(goldByteM64); + init(goldByteP64); + testByteP64(goldByteP64); + init(goldByteM65); + testByteM65(goldByteM65); + init(goldByteP65); + testByteP65(goldByteP65); + init(goldByteM128); + testByteM128(goldByteM128); + init(goldByteP128); + testByteP128(goldByteP128); + init(goldByteM129); + testByteM129(goldByteM129); + init(goldByteP129); + testByteP129(goldByteP129); + init(goldByteM192); + testByteM192(goldByteM192); + init(goldByteP192); + testByteP192(goldByteP192); + init(goldFloatP0); + testFloatP0(goldFloatP0); + init(goldFloatM1); + testFloatM1(goldFloatM1); + init(goldFloatP1); + testFloatP1(goldFloatP1); + init(goldFloatM2); + testFloatM2(goldFloatM2); + init(goldFloatP2); + testFloatP2(goldFloatP2); + init(goldFloatM3); + testFloatM3(goldFloatM3); + init(goldFloatP3); + testFloatP3(goldFloatP3); + init(goldFloatM4); + testFloatM4(goldFloatM4); + init(goldFloatP4); + testFloatP4(goldFloatP4); + init(goldFloatM7); + testFloatM7(goldFloatM7); + init(goldFloatP7); + testFloatP7(goldFloatP7); + init(goldFloatM8); + testFloatM8(goldFloatM8); + init(goldFloatP8); + testFloatP8(goldFloatP8); + init(goldFloatM15); + testFloatM15(goldFloatM15); + init(goldFloatP15); + testFloatP15(goldFloatP15); + init(goldFloatM16); + testFloatM16(goldFloatM16); + init(goldFloatP16); + testFloatP16(goldFloatP16); + init(goldFloatM31); + testFloatM31(goldFloatM31); + init(goldFloatP31); + testFloatP31(goldFloatP31); + init(goldFloatM32); + testFloatM32(goldFloatM32); + init(goldFloatP32); + testFloatP32(goldFloatP32); + init(goldFloatM63); + testFloatM63(goldFloatM63); + init(goldFloatP63); + testFloatP63(goldFloatP63); + init(goldFloatM64); + testFloatM64(goldFloatM64); + init(goldFloatP64); + testFloatP64(goldFloatP64); + init(goldFloatM65); + testFloatM65(goldFloatM65); + init(goldFloatP65); + testFloatP65(goldFloatP65); + init(goldFloatM128); + testFloatM128(goldFloatM128); + init(goldFloatP128); + testFloatP128(goldFloatP128); + init(goldFloatM129); + testFloatM129(goldFloatM129); + init(goldFloatP129); + testFloatP129(goldFloatP129); + init(goldFloatM192); + testFloatM192(goldFloatM192); + init(goldFloatP192); + testFloatP192(goldFloatP192); + init(goldDoubleP0); + testDoubleP0(goldDoubleP0); + init(goldDoubleM1); + testDoubleM1(goldDoubleM1); + init(goldDoubleP1); + testDoubleP1(goldDoubleP1); + init(goldDoubleM2); + testDoubleM2(goldDoubleM2); + init(goldDoubleP2); + testDoubleP2(goldDoubleP2); + init(goldDoubleM3); + testDoubleM3(goldDoubleM3); + init(goldDoubleP3); + testDoubleP3(goldDoubleP3); + init(goldDoubleM4); + testDoubleM4(goldDoubleM4); + init(goldDoubleP4); + testDoubleP4(goldDoubleP4); + init(goldDoubleM7); + testDoubleM7(goldDoubleM7); + init(goldDoubleP7); + testDoubleP7(goldDoubleP7); + init(goldDoubleM8); + testDoubleM8(goldDoubleM8); + init(goldDoubleP8); + testDoubleP8(goldDoubleP8); + init(goldDoubleM15); + testDoubleM15(goldDoubleM15); + init(goldDoubleP15); + testDoubleP15(goldDoubleP15); + init(goldDoubleM16); + testDoubleM16(goldDoubleM16); + init(goldDoubleP16); + testDoubleP16(goldDoubleP16); + init(goldDoubleM31); + testDoubleM31(goldDoubleM31); + init(goldDoubleP31); + testDoubleP31(goldDoubleP31); + init(goldDoubleM32); + testDoubleM32(goldDoubleM32); + init(goldDoubleP32); + testDoubleP32(goldDoubleP32); + init(goldDoubleM63); + testDoubleM63(goldDoubleM63); + init(goldDoubleP63); + testDoubleP63(goldDoubleP63); + init(goldDoubleM64); + testDoubleM64(goldDoubleM64); + init(goldDoubleP64); + testDoubleP64(goldDoubleP64); + init(goldDoubleM65); + testDoubleM65(goldDoubleM65); + init(goldDoubleP65); + testDoubleP65(goldDoubleP65); + init(goldDoubleM128); + testDoubleM128(goldDoubleM128); + init(goldDoubleP128); + testDoubleP128(goldDoubleP128); + init(goldDoubleM129); + testDoubleM129(goldDoubleM129); + init(goldDoubleP129); + testDoubleP129(goldDoubleP129); + init(goldDoubleM192); + testDoubleM192(goldDoubleM192); + init(goldDoubleP192); + testDoubleP192(goldDoubleP192); + } + + public static void main(String args[]) { + TestDependencyOffsets x = new TestDependencyOffsets(); + TestFramework framework = new TestFramework(TestDependencyOffsets.class); + framework.addFlags("-XX:-TieredCompilation", + "-XX:CompileCommand=option,compiler.loopopts.superword.TestDependencyOffsets::test*,Vectorize", + "-XX:CompileCommand=compileonly,compiler.loopopts.superword.TestDependencyOffsets::init", + "-XX:CompileCommand=compileonly,compiler.loopopts.superword.TestDependencyOffsets::test*", + "-XX:CompileCommand=compileonly,compiler.loopopts.superword.TestDependencyOffsets::verify", + "-XX:LoopUnrollLimit=250"); + + int i = 0; + Scenario[] scenarios = new Scenario[8]; + for (int maxVectorSize : new int[] {1, 2, 4, 8, 16, 32, 64, 128}) { + for (String alignVectorSign : new String[] {"-"}) { // TODO + scenarios[i] = new Scenario(i, "-XX:" + alignVectorSign + "AlignVector", + "-XX:SuperWordMaxVectorSize=" + maxVectorSize); + i++; + } + } + framework.addScenarios(scenarios); + framework.start(); + } + + // ------------------- Tests ------------------- + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP0(int[] data) { + for (int j = 0; j < RANGE; j++) { + data[j + 0] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP0") + @Warmup(0) + public static void runIntP0() { + int[] data = new int[RANGE]; + init(data); + testIntP0(data); + verify("testIntP0", data, goldIntP0); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM1(int[] data) { + for (int j = 1; j < RANGE; j++) { + data[j + -1] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM1") + @Warmup(0) + public static void runIntM1() { + int[] data = new int[RANGE]; + init(data); + testIntM1(data); + verify("testIntM1", data, goldIntM1); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP1(int[] data) { + for (int j = 0; j < RANGE - 1; j++) { + data[j + 1] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP1") + @Warmup(0) + public static void runIntP1() { + int[] data = new int[RANGE]; + init(data); + testIntP1(data); + verify("testIntP1", data, goldIntP1); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM2(int[] data) { + for (int j = 2; j < RANGE; j++) { + data[j + -2] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM2") + @Warmup(0) + public static void runIntM2() { + int[] data = new int[RANGE]; + init(data); + testIntM2(data); + verify("testIntM2", data, goldIntM2); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP2(int[] data) { + for (int j = 0; j < RANGE - 2; j++) { + data[j + 2] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP2") + @Warmup(0) + public static void runIntP2() { + int[] data = new int[RANGE]; + init(data); + testIntP2(data); + verify("testIntP2", data, goldIntP2); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM3(int[] data) { + for (int j = 3; j < RANGE; j++) { + data[j + -3] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM3") + @Warmup(0) + public static void runIntM3() { + int[] data = new int[RANGE]; + init(data); + testIntM3(data); + verify("testIntM3", data, goldIntM3); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // positive byte_offset 12 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 12"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 12"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 12 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 12"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 12"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 12 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 12"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 12"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 12 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 12"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 12"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP3(int[] data) { + for (int j = 0; j < RANGE - 3; j++) { + data[j + 3] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP3") + @Warmup(0) + public static void runIntP3() { + int[] data = new int[RANGE]; + init(data); + testIntP3(data); + verify("testIntP3", data, goldIntP3); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM4(int[] data) { + for (int j = 4; j < RANGE; j++) { + data[j + -4] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM4") + @Warmup(0) + public static void runIntM4() { + int[] data = new int[RANGE]; + init(data); + testIntM4(data); + verify("testIntM4", data, goldIntM4); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP4(int[] data) { + for (int j = 0; j < RANGE - 4; j++) { + data[j + 4] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP4") + @Warmup(0) + public static void runIntP4() { + int[] data = new int[RANGE]; + init(data); + testIntP4(data); + verify("testIntP4", data, goldIntP4); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM7(int[] data) { + for (int j = 7; j < RANGE; j++) { + data[j + -7] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM7") + @Warmup(0) + public static void runIntM7() { + int[] data = new int[RANGE]; + init(data); + testIntM7(data); + verify("testIntM7", data, goldIntM7); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 28 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 28"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 28"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 28 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 28"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 28"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 28 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 28"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 28"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP7(int[] data) { + for (int j = 0; j < RANGE - 7; j++) { + data[j + 7] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP7") + @Warmup(0) + public static void runIntP7() { + int[] data = new int[RANGE]; + init(data); + testIntP7(data); + verify("testIntP7", data, goldIntP7); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM8(int[] data) { + for (int j = 8; j < RANGE; j++) { + data[j + -8] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM8") + @Warmup(0) + public static void runIntM8() { + int[] data = new int[RANGE]; + init(data); + testIntM8(data); + verify("testIntM8", data, goldIntM8); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 32 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 32"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 32"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP8(int[] data) { + for (int j = 0; j < RANGE - 8; j++) { + data[j + 8] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP8") + @Warmup(0) + public static void runIntP8() { + int[] data = new int[RANGE]; + init(data); + testIntP8(data); + verify("testIntP8", data, goldIntP8); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM15(int[] data) { + for (int j = 15; j < RANGE; j++) { + data[j + -15] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM15") + @Warmup(0) + public static void runIntM15() { + int[] data = new int[RANGE]; + init(data); + testIntM15(data); + verify("testIntM15", data, goldIntM15); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 60 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 60"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 60"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP15(int[] data) { + for (int j = 0; j < RANGE - 15; j++) { + data[j + 15] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP15") + @Warmup(0) + public static void runIntP15() { + int[] data = new int[RANGE]; + init(data); + testIntP15(data); + verify("testIntP15", data, goldIntP15); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM16(int[] data) { + for (int j = 16; j < RANGE; j++) { + data[j + -16] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM16") + @Warmup(0) + public static void runIntM16() { + int[] data = new int[RANGE]; + init(data); + testIntM16(data); + verify("testIntM16", data, goldIntM16); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP16(int[] data) { + for (int j = 0; j < RANGE - 16; j++) { + data[j + 16] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP16") + @Warmup(0) + public static void runIntP16() { + int[] data = new int[RANGE]; + init(data); + testIntP16(data); + verify("testIntP16", data, goldIntP16); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM31(int[] data) { + for (int j = 31; j < RANGE; j++) { + data[j + -31] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM31") + @Warmup(0) + public static void runIntM31() { + int[] data = new int[RANGE]; + init(data); + testIntM31(data); + verify("testIntM31", data, goldIntM31); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP31(int[] data) { + for (int j = 0; j < RANGE - 31; j++) { + data[j + 31] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP31") + @Warmup(0) + public static void runIntP31() { + int[] data = new int[RANGE]; + init(data); + testIntP31(data); + verify("testIntP31", data, goldIntP31); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM32(int[] data) { + for (int j = 32; j < RANGE; j++) { + data[j + -32] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM32") + @Warmup(0) + public static void runIntM32() { + int[] data = new int[RANGE]; + init(data); + testIntM32(data); + verify("testIntM32", data, goldIntM32); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP32(int[] data) { + for (int j = 0; j < RANGE - 32; j++) { + data[j + 32] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP32") + @Warmup(0) + public static void runIntP32() { + int[] data = new int[RANGE]; + init(data); + testIntP32(data); + verify("testIntP32", data, goldIntP32); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM63(int[] data) { + for (int j = 63; j < RANGE; j++) { + data[j + -63] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM63") + @Warmup(0) + public static void runIntM63() { + int[] data = new int[RANGE]; + init(data); + testIntM63(data); + verify("testIntM63", data, goldIntM63); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP63(int[] data) { + for (int j = 0; j < RANGE - 63; j++) { + data[j + 63] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP63") + @Warmup(0) + public static void runIntP63() { + int[] data = new int[RANGE]; + init(data); + testIntP63(data); + verify("testIntP63", data, goldIntP63); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM64(int[] data) { + for (int j = 64; j < RANGE; j++) { + data[j + -64] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM64") + @Warmup(0) + public static void runIntM64() { + int[] data = new int[RANGE]; + init(data); + testIntM64(data); + verify("testIntM64", data, goldIntM64); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP64(int[] data) { + for (int j = 0; j < RANGE - 64; j++) { + data[j + 64] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP64") + @Warmup(0) + public static void runIntP64() { + int[] data = new int[RANGE]; + init(data); + testIntP64(data); + verify("testIntP64", data, goldIntP64); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM65(int[] data) { + for (int j = 65; j < RANGE; j++) { + data[j + -65] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM65") + @Warmup(0) + public static void runIntM65() { + int[] data = new int[RANGE]; + init(data); + testIntM65(data); + verify("testIntM65", data, goldIntM65); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP65(int[] data) { + for (int j = 0; j < RANGE - 65; j++) { + data[j + 65] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP65") + @Warmup(0) + public static void runIntP65() { + int[] data = new int[RANGE]; + init(data); + testIntP65(data); + verify("testIntP65", data, goldIntP65); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM128(int[] data) { + for (int j = 128; j < RANGE; j++) { + data[j + -128] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM128") + @Warmup(0) + public static void runIntM128() { + int[] data = new int[RANGE]; + init(data); + testIntM128(data); + verify("testIntM128", data, goldIntM128); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP128(int[] data) { + for (int j = 0; j < RANGE - 128; j++) { + data[j + 128] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP128") + @Warmup(0) + public static void runIntP128() { + int[] data = new int[RANGE]; + init(data); + testIntP128(data); + verify("testIntP128", data, goldIntP128); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM129(int[] data) { + for (int j = 129; j < RANGE; j++) { + data[j + -129] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM129") + @Warmup(0) + public static void runIntM129() { + int[] data = new int[RANGE]; + init(data); + testIntM129(data); + verify("testIntM129", data, goldIntM129); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP129(int[] data) { + for (int j = 0; j < RANGE - 129; j++) { + data[j + 129] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP129") + @Warmup(0) + public static void runIntP129() { + int[] data = new int[RANGE]; + init(data); + testIntP129(data); + verify("testIntP129", data, goldIntP129); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM192(int[] data) { + for (int j = 192; j < RANGE; j++) { + data[j + -192] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM192") + @Warmup(0) + public static void runIntM192() { + int[] data = new int[RANGE]; + init(data); + testIntM192(data); + verify("testIntM192", data, goldIntM192); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP192(int[] data) { + for (int j = 0; j < RANGE - 192; j++) { + data[j + 192] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP192") + @Warmup(0) + public static void runIntP192() { + int[] data = new int[RANGE]; + init(data); + testIntP192(data); + verify("testIntP192", data, goldIntP192); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP0(long[] data) { + for (int j = 0; j < RANGE; j++) { + data[j + 0] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongP0") + @Warmup(0) + public static void runLongP0() { + long[] data = new long[RANGE]; + init(data); + testLongP0(data); + verify("testLongP0", data, goldLongP0); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM1(long[] data) { + for (int j = 1; j < RANGE; j++) { + data[j + -1] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongM1") + @Warmup(0) + public static void runLongM1() { + long[] data = new long[RANGE]; + init(data); + testLongM1(data); + verify("testLongM1", data, goldLongM1); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP1(long[] data) { + for (int j = 0; j < RANGE - 1; j++) { + data[j + 1] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongP1") + @Warmup(0) + public static void runLongP1() { + long[] data = new long[RANGE]; + init(data); + testLongP1(data); + verify("testLongP1", data, goldLongP1); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM2(long[] data) { + for (int j = 2; j < RANGE; j++) { + data[j + -2] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongM2") + @Warmup(0) + public static void runLongM2() { + long[] data = new long[RANGE]; + init(data); + testLongM2(data); + verify("testLongM2", data, goldLongM2); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP2(long[] data) { + for (int j = 0; j < RANGE - 2; j++) { + data[j + 2] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongP2") + @Warmup(0) + public static void runLongP2() { + long[] data = new long[RANGE]; + init(data); + testLongP2(data); + verify("testLongP2", data, goldLongP2); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM3(long[] data) { + for (int j = 3; j < RANGE; j++) { + data[j + -3] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongM3") + @Warmup(0) + public static void runLongM3() { + long[] data = new long[RANGE]; + init(data); + testLongM3(data); + verify("testLongM3", data, goldLongM3); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 24 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 24"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 24"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 24 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 24"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 24"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 24 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 24"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 24"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP3(long[] data) { + for (int j = 0; j < RANGE - 3; j++) { + data[j + 3] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongP3") + @Warmup(0) + public static void runLongP3() { + long[] data = new long[RANGE]; + init(data); + testLongP3(data); + verify("testLongP3", data, goldLongP3); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM4(long[] data) { + for (int j = 4; j < RANGE; j++) { + data[j + -4] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongM4") + @Warmup(0) + public static void runLongM4() { + long[] data = new long[RANGE]; + init(data); + testLongM4(data); + verify("testLongM4", data, goldLongM4); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 32 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 32"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 32"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP4(long[] data) { + for (int j = 0; j < RANGE - 4; j++) { + data[j + 4] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongP4") + @Warmup(0) + public static void runLongP4() { + long[] data = new long[RANGE]; + init(data); + testLongP4(data); + verify("testLongP4", data, goldLongP4); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM7(long[] data) { + for (int j = 7; j < RANGE; j++) { + data[j + -7] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongM7") + @Warmup(0) + public static void runLongM7() { + long[] data = new long[RANGE]; + init(data); + testLongM7(data); + verify("testLongM7", data, goldLongM7); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 56 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 56"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 56"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP7(long[] data) { + for (int j = 0; j < RANGE - 7; j++) { + data[j + 7] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongP7") + @Warmup(0) + public static void runLongP7() { + long[] data = new long[RANGE]; + init(data); + testLongP7(data); + verify("testLongP7", data, goldLongP7); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM8(long[] data) { + for (int j = 8; j < RANGE; j++) { + data[j + -8] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongM8") + @Warmup(0) + public static void runLongM8() { + long[] data = new long[RANGE]; + init(data); + testLongM8(data); + verify("testLongM8", data, goldLongM8); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP8(long[] data) { + for (int j = 0; j < RANGE - 8; j++) { + data[j + 8] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongP8") + @Warmup(0) + public static void runLongP8() { + long[] data = new long[RANGE]; + init(data); + testLongP8(data); + verify("testLongP8", data, goldLongP8); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM15(long[] data) { + for (int j = 15; j < RANGE; j++) { + data[j + -15] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongM15") + @Warmup(0) + public static void runLongM15() { + long[] data = new long[RANGE]; + init(data); + testLongM15(data); + verify("testLongM15", data, goldLongM15); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP15(long[] data) { + for (int j = 0; j < RANGE - 15; j++) { + data[j + 15] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongP15") + @Warmup(0) + public static void runLongP15() { + long[] data = new long[RANGE]; + init(data); + testLongP15(data); + verify("testLongP15", data, goldLongP15); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM16(long[] data) { + for (int j = 16; j < RANGE; j++) { + data[j + -16] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongM16") + @Warmup(0) + public static void runLongM16() { + long[] data = new long[RANGE]; + init(data); + testLongM16(data); + verify("testLongM16", data, goldLongM16); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP16(long[] data) { + for (int j = 0; j < RANGE - 16; j++) { + data[j + 16] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongP16") + @Warmup(0) + public static void runLongP16() { + long[] data = new long[RANGE]; + init(data); + testLongP16(data); + verify("testLongP16", data, goldLongP16); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM31(long[] data) { + for (int j = 31; j < RANGE; j++) { + data[j + -31] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongM31") + @Warmup(0) + public static void runLongM31() { + long[] data = new long[RANGE]; + init(data); + testLongM31(data); + verify("testLongM31", data, goldLongM31); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP31(long[] data) { + for (int j = 0; j < RANGE - 31; j++) { + data[j + 31] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongP31") + @Warmup(0) + public static void runLongP31() { + long[] data = new long[RANGE]; + init(data); + testLongP31(data); + verify("testLongP31", data, goldLongP31); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM32(long[] data) { + for (int j = 32; j < RANGE; j++) { + data[j + -32] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongM32") + @Warmup(0) + public static void runLongM32() { + long[] data = new long[RANGE]; + init(data); + testLongM32(data); + verify("testLongM32", data, goldLongM32); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP32(long[] data) { + for (int j = 0; j < RANGE - 32; j++) { + data[j + 32] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongP32") + @Warmup(0) + public static void runLongP32() { + long[] data = new long[RANGE]; + init(data); + testLongP32(data); + verify("testLongP32", data, goldLongP32); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM63(long[] data) { + for (int j = 63; j < RANGE; j++) { + data[j + -63] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongM63") + @Warmup(0) + public static void runLongM63() { + long[] data = new long[RANGE]; + init(data); + testLongM63(data); + verify("testLongM63", data, goldLongM63); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP63(long[] data) { + for (int j = 0; j < RANGE - 63; j++) { + data[j + 63] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongP63") + @Warmup(0) + public static void runLongP63() { + long[] data = new long[RANGE]; + init(data); + testLongP63(data); + verify("testLongP63", data, goldLongP63); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM64(long[] data) { + for (int j = 64; j < RANGE; j++) { + data[j + -64] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongM64") + @Warmup(0) + public static void runLongM64() { + long[] data = new long[RANGE]; + init(data); + testLongM64(data); + verify("testLongM64", data, goldLongM64); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP64(long[] data) { + for (int j = 0; j < RANGE - 64; j++) { + data[j + 64] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongP64") + @Warmup(0) + public static void runLongP64() { + long[] data = new long[RANGE]; + init(data); + testLongP64(data); + verify("testLongP64", data, goldLongP64); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM65(long[] data) { + for (int j = 65; j < RANGE; j++) { + data[j + -65] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongM65") + @Warmup(0) + public static void runLongM65() { + long[] data = new long[RANGE]; + init(data); + testLongM65(data); + verify("testLongM65", data, goldLongM65); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP65(long[] data) { + for (int j = 0; j < RANGE - 65; j++) { + data[j + 65] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongP65") + @Warmup(0) + public static void runLongP65() { + long[] data = new long[RANGE]; + init(data); + testLongP65(data); + verify("testLongP65", data, goldLongP65); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM128(long[] data) { + for (int j = 128; j < RANGE; j++) { + data[j + -128] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongM128") + @Warmup(0) + public static void runLongM128() { + long[] data = new long[RANGE]; + init(data); + testLongM128(data); + verify("testLongM128", data, goldLongM128); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP128(long[] data) { + for (int j = 0; j < RANGE - 128; j++) { + data[j + 128] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongP128") + @Warmup(0) + public static void runLongP128() { + long[] data = new long[RANGE]; + init(data); + testLongP128(data); + verify("testLongP128", data, goldLongP128); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM129(long[] data) { + for (int j = 129; j < RANGE; j++) { + data[j + -129] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongM129") + @Warmup(0) + public static void runLongM129() { + long[] data = new long[RANGE]; + init(data); + testLongM129(data); + verify("testLongM129", data, goldLongM129); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP129(long[] data) { + for (int j = 0; j < RANGE - 129; j++) { + data[j + 129] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongP129") + @Warmup(0) + public static void runLongP129() { + long[] data = new long[RANGE]; + init(data); + testLongP129(data); + verify("testLongP129", data, goldLongP129); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM192(long[] data) { + for (int j = 192; j < RANGE; j++) { + data[j + -192] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongM192") + @Warmup(0) + public static void runLongM192() { + long[] data = new long[RANGE]; + init(data); + testLongM192(data); + verify("testLongM192", data, goldLongM192); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP192(long[] data) { + for (int j = 0; j < RANGE - 192; j++) { + data[j + 192] = (long)(data[j] * (long)-11); + } + } + + @Run(test = "testLongP192") + @Warmup(0) + public static void runLongP192() { + long[] data = new long[RANGE]; + init(data); + testLongP192(data); + verify("testLongP192", data, goldLongP192); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP0(short[] data) { + for (int j = 0; j < RANGE; j++) { + data[j + 0] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP0") + @Warmup(0) + public static void runShortP0() { + short[] data = new short[RANGE]; + init(data); + testShortP0(data); + verify("testShortP0", data, goldShortP0); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM1(short[] data) { + for (int j = 1; j < RANGE; j++) { + data[j + -1] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM1") + @Warmup(0) + public static void runShortM1() { + short[] data = new short[RANGE]; + init(data); + testShortM1(data); + verify("testShortM1", data, goldShortM1); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 2 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 2 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 2 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 2 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP1(short[] data) { + for (int j = 0; j < RANGE - 1; j++) { + data[j + 1] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP1") + @Warmup(0) + public static void runShortP1() { + short[] data = new short[RANGE]; + init(data); + testShortP1(data); + verify("testShortP1", data, goldShortP1); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM2(short[] data) { + for (int j = 2; j < RANGE; j++) { + data[j + -2] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM2") + @Warmup(0) + public static void runShortM2() { + short[] data = new short[RANGE]; + init(data); + testShortM2(data); + verify("testShortM2", data, goldShortM2); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP2(short[] data) { + for (int j = 0; j < RANGE - 2; j++) { + data[j + 2] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP2") + @Warmup(0) + public static void runShortP2() { + short[] data = new short[RANGE]; + init(data); + testShortP2(data); + verify("testShortP2", data, goldShortP2); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM3(short[] data) { + for (int j = 3; j < RANGE; j++) { + data[j + -3] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM3") + @Warmup(0) + public static void runShortM3() { + short[] data = new short[RANGE]; + init(data); + testShortM3(data); + verify("testShortM3", data, goldShortM3); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 6 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 6"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 6"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 6 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 6"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 6"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 6 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 6"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 6"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 6 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 6"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 6"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP3(short[] data) { + for (int j = 0; j < RANGE - 3; j++) { + data[j + 3] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP3") + @Warmup(0) + public static void runShortP3() { + short[] data = new short[RANGE]; + init(data); + testShortP3(data); + verify("testShortP3", data, goldShortP3); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM4(short[] data) { + for (int j = 4; j < RANGE; j++) { + data[j + -4] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM4") + @Warmup(0) + public static void runShortM4() { + short[] data = new short[RANGE]; + init(data); + testShortM4(data); + verify("testShortM4", data, goldShortM4); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP4(short[] data) { + for (int j = 0; j < RANGE - 4; j++) { + data[j + 4] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP4") + @Warmup(0) + public static void runShortP4() { + short[] data = new short[RANGE]; + init(data); + testShortP4(data); + verify("testShortP4", data, goldShortP4); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM7(short[] data) { + for (int j = 7; j < RANGE; j++) { + data[j + -7] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM7") + @Warmup(0) + public static void runShortM7() { + short[] data = new short[RANGE]; + init(data); + testShortM7(data); + verify("testShortM7", data, goldShortM7); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 14 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 14"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 14"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 14 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 14"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 14"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 14 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 14"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 14"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 14 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 14"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 14"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP7(short[] data) { + for (int j = 0; j < RANGE - 7; j++) { + data[j + 7] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP7") + @Warmup(0) + public static void runShortP7() { + short[] data = new short[RANGE]; + init(data); + testShortP7(data); + verify("testShortP7", data, goldShortP7); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM8(short[] data) { + for (int j = 8; j < RANGE; j++) { + data[j + -8] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM8") + @Warmup(0) + public static void runShortM8() { + short[] data = new short[RANGE]; + init(data); + testShortM8(data); + verify("testShortM8", data, goldShortM8); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP8(short[] data) { + for (int j = 0; j < RANGE - 8; j++) { + data[j + 8] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP8") + @Warmup(0) + public static void runShortP8() { + short[] data = new short[RANGE]; + init(data); + testShortP8(data); + verify("testShortP8", data, goldShortP8); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM15(short[] data) { + for (int j = 15; j < RANGE; j++) { + data[j + -15] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM15") + @Warmup(0) + public static void runShortM15() { + short[] data = new short[RANGE]; + init(data); + testShortM15(data); + verify("testShortM15", data, goldShortM15); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 30 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 30"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 30"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 30 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 30"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 30"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 30 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 30"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 30"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP15(short[] data) { + for (int j = 0; j < RANGE - 15; j++) { + data[j + 15] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP15") + @Warmup(0) + public static void runShortP15() { + short[] data = new short[RANGE]; + init(data); + testShortP15(data); + verify("testShortP15", data, goldShortP15); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM16(short[] data) { + for (int j = 16; j < RANGE; j++) { + data[j + -16] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM16") + @Warmup(0) + public static void runShortM16() { + short[] data = new short[RANGE]; + init(data); + testShortM16(data); + verify("testShortM16", data, goldShortM16); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 32 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 32"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 32"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP16(short[] data) { + for (int j = 0; j < RANGE - 16; j++) { + data[j + 16] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP16") + @Warmup(0) + public static void runShortP16() { + short[] data = new short[RANGE]; + init(data); + testShortP16(data); + verify("testShortP16", data, goldShortP16); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM31(short[] data) { + for (int j = 31; j < RANGE; j++) { + data[j + -31] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM31") + @Warmup(0) + public static void runShortM31() { + short[] data = new short[RANGE]; + init(data); + testShortM31(data); + verify("testShortM31", data, goldShortM31); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 62 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 62"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 62"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP31(short[] data) { + for (int j = 0; j < RANGE - 31; j++) { + data[j + 31] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP31") + @Warmup(0) + public static void runShortP31() { + short[] data = new short[RANGE]; + init(data); + testShortP31(data); + verify("testShortP31", data, goldShortP31); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM32(short[] data) { + for (int j = 32; j < RANGE; j++) { + data[j + -32] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM32") + @Warmup(0) + public static void runShortM32() { + short[] data = new short[RANGE]; + init(data); + testShortM32(data); + verify("testShortM32", data, goldShortM32); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP32(short[] data) { + for (int j = 0; j < RANGE - 32; j++) { + data[j + 32] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP32") + @Warmup(0) + public static void runShortP32() { + short[] data = new short[RANGE]; + init(data); + testShortP32(data); + verify("testShortP32", data, goldShortP32); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM63(short[] data) { + for (int j = 63; j < RANGE; j++) { + data[j + -63] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM63") + @Warmup(0) + public static void runShortM63() { + short[] data = new short[RANGE]; + init(data); + testShortM63(data); + verify("testShortM63", data, goldShortM63); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP63(short[] data) { + for (int j = 0; j < RANGE - 63; j++) { + data[j + 63] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP63") + @Warmup(0) + public static void runShortP63() { + short[] data = new short[RANGE]; + init(data); + testShortP63(data); + verify("testShortP63", data, goldShortP63); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM64(short[] data) { + for (int j = 64; j < RANGE; j++) { + data[j + -64] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM64") + @Warmup(0) + public static void runShortM64() { + short[] data = new short[RANGE]; + init(data); + testShortM64(data); + verify("testShortM64", data, goldShortM64); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP64(short[] data) { + for (int j = 0; j < RANGE - 64; j++) { + data[j + 64] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP64") + @Warmup(0) + public static void runShortP64() { + short[] data = new short[RANGE]; + init(data); + testShortP64(data); + verify("testShortP64", data, goldShortP64); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM65(short[] data) { + for (int j = 65; j < RANGE; j++) { + data[j + -65] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM65") + @Warmup(0) + public static void runShortM65() { + short[] data = new short[RANGE]; + init(data); + testShortM65(data); + verify("testShortM65", data, goldShortM65); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP65(short[] data) { + for (int j = 0; j < RANGE - 65; j++) { + data[j + 65] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP65") + @Warmup(0) + public static void runShortP65() { + short[] data = new short[RANGE]; + init(data); + testShortP65(data); + verify("testShortP65", data, goldShortP65); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM128(short[] data) { + for (int j = 128; j < RANGE; j++) { + data[j + -128] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM128") + @Warmup(0) + public static void runShortM128() { + short[] data = new short[RANGE]; + init(data); + testShortM128(data); + verify("testShortM128", data, goldShortM128); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP128(short[] data) { + for (int j = 0; j < RANGE - 128; j++) { + data[j + 128] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP128") + @Warmup(0) + public static void runShortP128() { + short[] data = new short[RANGE]; + init(data); + testShortP128(data); + verify("testShortP128", data, goldShortP128); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM129(short[] data) { + for (int j = 129; j < RANGE; j++) { + data[j + -129] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM129") + @Warmup(0) + public static void runShortM129() { + short[] data = new short[RANGE]; + init(data); + testShortM129(data); + verify("testShortM129", data, goldShortM129); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP129(short[] data) { + for (int j = 0; j < RANGE - 129; j++) { + data[j + 129] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP129") + @Warmup(0) + public static void runShortP129() { + short[] data = new short[RANGE]; + init(data); + testShortP129(data); + verify("testShortP129", data, goldShortP129); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM192(short[] data) { + for (int j = 192; j < RANGE; j++) { + data[j + -192] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM192") + @Warmup(0) + public static void runShortM192() { + short[] data = new short[RANGE]; + init(data); + testShortM192(data); + verify("testShortM192", data, goldShortM192); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP192(short[] data) { + for (int j = 0; j < RANGE - 192; j++) { + data[j + 192] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP192") + @Warmup(0) + public static void runShortP192() { + short[] data = new short[RANGE]; + init(data); + testShortP192(data); + verify("testShortP192", data, goldShortP192); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP0(char[] data) { + for (int j = 0; j < RANGE; j++) { + data[j + 0] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP0") + @Warmup(0) + public static void runCharP0() { + char[] data = new char[RANGE]; + init(data); + testCharP0(data); + verify("testCharP0", data, goldCharP0); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM1(char[] data) { + for (int j = 1; j < RANGE; j++) { + data[j + -1] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM1") + @Warmup(0) + public static void runCharM1() { + char[] data = new char[RANGE]; + init(data); + testCharM1(data); + verify("testCharM1", data, goldCharM1); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 2 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 2 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 2 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 2 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP1(char[] data) { + for (int j = 0; j < RANGE - 1; j++) { + data[j + 1] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP1") + @Warmup(0) + public static void runCharP1() { + char[] data = new char[RANGE]; + init(data); + testCharP1(data); + verify("testCharP1", data, goldCharP1); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM2(char[] data) { + for (int j = 2; j < RANGE; j++) { + data[j + -2] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM2") + @Warmup(0) + public static void runCharM2() { + char[] data = new char[RANGE]; + init(data); + testCharM2(data); + verify("testCharM2", data, goldCharM2); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP2(char[] data) { + for (int j = 0; j < RANGE - 2; j++) { + data[j + 2] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP2") + @Warmup(0) + public static void runCharP2() { + char[] data = new char[RANGE]; + init(data); + testCharP2(data); + verify("testCharP2", data, goldCharP2); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM3(char[] data) { + for (int j = 3; j < RANGE; j++) { + data[j + -3] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM3") + @Warmup(0) + public static void runCharM3() { + char[] data = new char[RANGE]; + init(data); + testCharM3(data); + verify("testCharM3", data, goldCharM3); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 6 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 6"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 6"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 6 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 6"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 6"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 6 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 6"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 6"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 6 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 6"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 6"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP3(char[] data) { + for (int j = 0; j < RANGE - 3; j++) { + data[j + 3] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP3") + @Warmup(0) + public static void runCharP3() { + char[] data = new char[RANGE]; + init(data); + testCharP3(data); + verify("testCharP3", data, goldCharP3); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM4(char[] data) { + for (int j = 4; j < RANGE; j++) { + data[j + -4] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM4") + @Warmup(0) + public static void runCharM4() { + char[] data = new char[RANGE]; + init(data); + testCharM4(data); + verify("testCharM4", data, goldCharM4); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP4(char[] data) { + for (int j = 0; j < RANGE - 4; j++) { + data[j + 4] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP4") + @Warmup(0) + public static void runCharP4() { + char[] data = new char[RANGE]; + init(data); + testCharP4(data); + verify("testCharP4", data, goldCharP4); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM7(char[] data) { + for (int j = 7; j < RANGE; j++) { + data[j + -7] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM7") + @Warmup(0) + public static void runCharM7() { + char[] data = new char[RANGE]; + init(data); + testCharM7(data); + verify("testCharM7", data, goldCharM7); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 14 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 14"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 14"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 14 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 14"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 14"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 14 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 14"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 14"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 14 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 14"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 14"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP7(char[] data) { + for (int j = 0; j < RANGE - 7; j++) { + data[j + 7] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP7") + @Warmup(0) + public static void runCharP7() { + char[] data = new char[RANGE]; + init(data); + testCharP7(data); + verify("testCharP7", data, goldCharP7); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM8(char[] data) { + for (int j = 8; j < RANGE; j++) { + data[j + -8] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM8") + @Warmup(0) + public static void runCharM8() { + char[] data = new char[RANGE]; + init(data); + testCharM8(data); + verify("testCharM8", data, goldCharM8); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP8(char[] data) { + for (int j = 0; j < RANGE - 8; j++) { + data[j + 8] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP8") + @Warmup(0) + public static void runCharP8() { + char[] data = new char[RANGE]; + init(data); + testCharP8(data); + verify("testCharP8", data, goldCharP8); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM15(char[] data) { + for (int j = 15; j < RANGE; j++) { + data[j + -15] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM15") + @Warmup(0) + public static void runCharM15() { + char[] data = new char[RANGE]; + init(data); + testCharM15(data); + verify("testCharM15", data, goldCharM15); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 30 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 30"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 30"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 30 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 30"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 30"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 30 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 30"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 30"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP15(char[] data) { + for (int j = 0; j < RANGE - 15; j++) { + data[j + 15] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP15") + @Warmup(0) + public static void runCharP15() { + char[] data = new char[RANGE]; + init(data); + testCharP15(data); + verify("testCharP15", data, goldCharP15); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM16(char[] data) { + for (int j = 16; j < RANGE; j++) { + data[j + -16] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM16") + @Warmup(0) + public static void runCharM16() { + char[] data = new char[RANGE]; + init(data); + testCharM16(data); + verify("testCharM16", data, goldCharM16); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 32 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 32"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 32"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP16(char[] data) { + for (int j = 0; j < RANGE - 16; j++) { + data[j + 16] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP16") + @Warmup(0) + public static void runCharP16() { + char[] data = new char[RANGE]; + init(data); + testCharP16(data); + verify("testCharP16", data, goldCharP16); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM31(char[] data) { + for (int j = 31; j < RANGE; j++) { + data[j + -31] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM31") + @Warmup(0) + public static void runCharM31() { + char[] data = new char[RANGE]; + init(data); + testCharM31(data); + verify("testCharM31", data, goldCharM31); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 62 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 62"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 62"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP31(char[] data) { + for (int j = 0; j < RANGE - 31; j++) { + data[j + 31] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP31") + @Warmup(0) + public static void runCharP31() { + char[] data = new char[RANGE]; + init(data); + testCharP31(data); + verify("testCharP31", data, goldCharP31); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM32(char[] data) { + for (int j = 32; j < RANGE; j++) { + data[j + -32] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM32") + @Warmup(0) + public static void runCharM32() { + char[] data = new char[RANGE]; + init(data); + testCharM32(data); + verify("testCharM32", data, goldCharM32); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP32(char[] data) { + for (int j = 0; j < RANGE - 32; j++) { + data[j + 32] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP32") + @Warmup(0) + public static void runCharP32() { + char[] data = new char[RANGE]; + init(data); + testCharP32(data); + verify("testCharP32", data, goldCharP32); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM63(char[] data) { + for (int j = 63; j < RANGE; j++) { + data[j + -63] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM63") + @Warmup(0) + public static void runCharM63() { + char[] data = new char[RANGE]; + init(data); + testCharM63(data); + verify("testCharM63", data, goldCharM63); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP63(char[] data) { + for (int j = 0; j < RANGE - 63; j++) { + data[j + 63] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP63") + @Warmup(0) + public static void runCharP63() { + char[] data = new char[RANGE]; + init(data); + testCharP63(data); + verify("testCharP63", data, goldCharP63); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM64(char[] data) { + for (int j = 64; j < RANGE; j++) { + data[j + -64] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM64") + @Warmup(0) + public static void runCharM64() { + char[] data = new char[RANGE]; + init(data); + testCharM64(data); + verify("testCharM64", data, goldCharM64); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP64(char[] data) { + for (int j = 0; j < RANGE - 64; j++) { + data[j + 64] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP64") + @Warmup(0) + public static void runCharP64() { + char[] data = new char[RANGE]; + init(data); + testCharP64(data); + verify("testCharP64", data, goldCharP64); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM65(char[] data) { + for (int j = 65; j < RANGE; j++) { + data[j + -65] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM65") + @Warmup(0) + public static void runCharM65() { + char[] data = new char[RANGE]; + init(data); + testCharM65(data); + verify("testCharM65", data, goldCharM65); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP65(char[] data) { + for (int j = 0; j < RANGE - 65; j++) { + data[j + 65] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP65") + @Warmup(0) + public static void runCharP65() { + char[] data = new char[RANGE]; + init(data); + testCharP65(data); + verify("testCharP65", data, goldCharP65); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM128(char[] data) { + for (int j = 128; j < RANGE; j++) { + data[j + -128] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM128") + @Warmup(0) + public static void runCharM128() { + char[] data = new char[RANGE]; + init(data); + testCharM128(data); + verify("testCharM128", data, goldCharM128); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP128(char[] data) { + for (int j = 0; j < RANGE - 128; j++) { + data[j + 128] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP128") + @Warmup(0) + public static void runCharP128() { + char[] data = new char[RANGE]; + init(data); + testCharP128(data); + verify("testCharP128", data, goldCharP128); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM129(char[] data) { + for (int j = 129; j < RANGE; j++) { + data[j + -129] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM129") + @Warmup(0) + public static void runCharM129() { + char[] data = new char[RANGE]; + init(data); + testCharM129(data); + verify("testCharM129", data, goldCharM129); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP129(char[] data) { + for (int j = 0; j < RANGE - 129; j++) { + data[j + 129] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP129") + @Warmup(0) + public static void runCharP129() { + char[] data = new char[RANGE]; + init(data); + testCharP129(data); + verify("testCharP129", data, goldCharP129); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM192(char[] data) { + for (int j = 192; j < RANGE; j++) { + data[j + -192] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM192") + @Warmup(0) + public static void runCharM192() { + char[] data = new char[RANGE]; + init(data); + testCharM192(data); + verify("testCharM192", data, goldCharM192); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP192(char[] data) { + for (int j = 0; j < RANGE - 192; j++) { + data[j + 192] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP192") + @Warmup(0) + public static void runCharP192() { + char[] data = new char[RANGE]; + init(data); + testCharP192(data); + verify("testCharP192", data, goldCharP192); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP0(byte[] data) { + for (int j = 0; j < RANGE; j++) { + data[j + 0] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP0") + @Warmup(0) + public static void runByteP0() { + byte[] data = new byte[RANGE]; + init(data); + testByteP0(data); + verify("testByteP0", data, goldByteP0); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM1(byte[] data) { + for (int j = 1; j < RANGE; j++) { + data[j + -1] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM1") + @Warmup(0) + public static void runByteM1() { + byte[] data = new byte[RANGE]; + init(data); + testByteM1(data); + verify("testByteM1", data, goldByteM1); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // positive byte_offset 1 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 1"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 1"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 1 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 1"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 1"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 1 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 1"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 1"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 1 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 1"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 1"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP1(byte[] data) { + for (int j = 0; j < RANGE - 1; j++) { + data[j + 1] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP1") + @Warmup(0) + public static void runByteP1() { + byte[] data = new byte[RANGE]; + init(data); + testByteP1(data); + verify("testByteP1", data, goldByteP1); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM2(byte[] data) { + for (int j = 2; j < RANGE; j++) { + data[j + -2] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM2") + @Warmup(0) + public static void runByteM2() { + byte[] data = new byte[RANGE]; + init(data); + testByteM2(data); + verify("testByteM2", data, goldByteM2); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // positive byte_offset 2 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 2 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 2 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 2 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP2(byte[] data) { + for (int j = 0; j < RANGE - 2; j++) { + data[j + 2] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP2") + @Warmup(0) + public static void runByteP2() { + byte[] data = new byte[RANGE]; + init(data); + testByteP2(data); + verify("testByteP2", data, goldByteP2); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM3(byte[] data) { + for (int j = 3; j < RANGE; j++) { + data[j + -3] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM3") + @Warmup(0) + public static void runByteM3() { + byte[] data = new byte[RANGE]; + init(data); + testByteM3(data); + verify("testByteM3", data, goldByteM3); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // positive byte_offset 3 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 3"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 3"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 3 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 3"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 3"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 3 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 3"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 3"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 3 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 3"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 3"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP3(byte[] data) { + for (int j = 0; j < RANGE - 3; j++) { + data[j + 3] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP3") + @Warmup(0) + public static void runByteP3() { + byte[] data = new byte[RANGE]; + init(data); + testByteP3(data); + verify("testByteP3", data, goldByteP3); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM4(byte[] data) { + for (int j = 4; j < RANGE; j++) { + data[j + -4] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM4") + @Warmup(0) + public static void runByteM4() { + byte[] data = new byte[RANGE]; + init(data); + testByteM4(data); + verify("testByteM4", data, goldByteM4); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP4(byte[] data) { + for (int j = 0; j < RANGE - 4; j++) { + data[j + 4] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP4") + @Warmup(0) + public static void runByteP4() { + byte[] data = new byte[RANGE]; + init(data); + testByteP4(data); + verify("testByteP4", data, goldByteP4); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM7(byte[] data) { + for (int j = 7; j < RANGE; j++) { + data[j + -7] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM7") + @Warmup(0) + public static void runByteM7() { + byte[] data = new byte[RANGE]; + init(data); + testByteM7(data); + verify("testByteM7", data, goldByteM7); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // positive byte_offset 7 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 7"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 7"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 7 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 7"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 7"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 7 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 7"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 7"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 7 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 7"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 7"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP7(byte[] data) { + for (int j = 0; j < RANGE - 7; j++) { + data[j + 7] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP7") + @Warmup(0) + public static void runByteP7() { + byte[] data = new byte[RANGE]; + init(data); + testByteP7(data); + verify("testByteP7", data, goldByteP7); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM8(byte[] data) { + for (int j = 8; j < RANGE; j++) { + data[j + -8] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM8") + @Warmup(0) + public static void runByteM8() { + byte[] data = new byte[RANGE]; + init(data); + testByteM8(data); + verify("testByteM8", data, goldByteM8); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP8(byte[] data) { + for (int j = 0; j < RANGE - 8; j++) { + data[j + 8] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP8") + @Warmup(0) + public static void runByteP8() { + byte[] data = new byte[RANGE]; + init(data); + testByteP8(data); + verify("testByteP8", data, goldByteP8); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM15(byte[] data) { + for (int j = 15; j < RANGE; j++) { + data[j + -15] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM15") + @Warmup(0) + public static void runByteM15() { + byte[] data = new byte[RANGE]; + init(data); + testByteM15(data); + verify("testByteM15", data, goldByteM15); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // positive byte_offset 15 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 15"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 15"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 15 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 15"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 15"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 15 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 15"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 15"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 15 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 15"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 15"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP15(byte[] data) { + for (int j = 0; j < RANGE - 15; j++) { + data[j + 15] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP15") + @Warmup(0) + public static void runByteP15() { + byte[] data = new byte[RANGE]; + init(data); + testByteP15(data); + verify("testByteP15", data, goldByteP15); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM16(byte[] data) { + for (int j = 16; j < RANGE; j++) { + data[j + -16] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM16") + @Warmup(0) + public static void runByteM16() { + byte[] data = new byte[RANGE]; + init(data); + testByteM16(data); + verify("testByteM16", data, goldByteM16); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP16(byte[] data) { + for (int j = 0; j < RANGE - 16; j++) { + data[j + 16] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP16") + @Warmup(0) + public static void runByteP16() { + byte[] data = new byte[RANGE]; + init(data); + testByteP16(data); + verify("testByteP16", data, goldByteP16); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM31(byte[] data) { + for (int j = 31; j < RANGE; j++) { + data[j + -31] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM31") + @Warmup(0) + public static void runByteM31() { + byte[] data = new byte[RANGE]; + init(data); + testByteM31(data); + verify("testByteM31", data, goldByteM31); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 31 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 31"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 31"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 31 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 31"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 31"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 31 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 31"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 31"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP31(byte[] data) { + for (int j = 0; j < RANGE - 31; j++) { + data[j + 31] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP31") + @Warmup(0) + public static void runByteP31() { + byte[] data = new byte[RANGE]; + init(data); + testByteP31(data); + verify("testByteP31", data, goldByteP31); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM32(byte[] data) { + for (int j = 32; j < RANGE; j++) { + data[j + -32] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM32") + @Warmup(0) + public static void runByteM32() { + byte[] data = new byte[RANGE]; + init(data); + testByteM32(data); + verify("testByteM32", data, goldByteM32); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 32 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 32"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 32"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP32(byte[] data) { + for (int j = 0; j < RANGE - 32; j++) { + data[j + 32] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP32") + @Warmup(0) + public static void runByteP32() { + byte[] data = new byte[RANGE]; + init(data); + testByteP32(data); + verify("testByteP32", data, goldByteP32); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM63(byte[] data) { + for (int j = 63; j < RANGE; j++) { + data[j + -63] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM63") + @Warmup(0) + public static void runByteM63() { + byte[] data = new byte[RANGE]; + init(data); + testByteM63(data); + verify("testByteM63", data, goldByteM63); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 63 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 63"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 63"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP63(byte[] data) { + for (int j = 0; j < RANGE - 63; j++) { + data[j + 63] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP63") + @Warmup(0) + public static void runByteP63() { + byte[] data = new byte[RANGE]; + init(data); + testByteP63(data); + verify("testByteP63", data, goldByteP63); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM64(byte[] data) { + for (int j = 64; j < RANGE; j++) { + data[j + -64] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM64") + @Warmup(0) + public static void runByteM64() { + byte[] data = new byte[RANGE]; + init(data); + testByteM64(data); + verify("testByteM64", data, goldByteM64); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP64(byte[] data) { + for (int j = 0; j < RANGE - 64; j++) { + data[j + 64] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP64") + @Warmup(0) + public static void runByteP64() { + byte[] data = new byte[RANGE]; + init(data); + testByteP64(data); + verify("testByteP64", data, goldByteP64); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM65(byte[] data) { + for (int j = 65; j < RANGE; j++) { + data[j + -65] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM65") + @Warmup(0) + public static void runByteM65() { + byte[] data = new byte[RANGE]; + init(data); + testByteM65(data); + verify("testByteM65", data, goldByteM65); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP65(byte[] data) { + for (int j = 0; j < RANGE - 65; j++) { + data[j + 65] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP65") + @Warmup(0) + public static void runByteP65() { + byte[] data = new byte[RANGE]; + init(data); + testByteP65(data); + verify("testByteP65", data, goldByteP65); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM128(byte[] data) { + for (int j = 128; j < RANGE; j++) { + data[j + -128] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM128") + @Warmup(0) + public static void runByteM128() { + byte[] data = new byte[RANGE]; + init(data); + testByteM128(data); + verify("testByteM128", data, goldByteM128); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP128(byte[] data) { + for (int j = 0; j < RANGE - 128; j++) { + data[j + 128] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP128") + @Warmup(0) + public static void runByteP128() { + byte[] data = new byte[RANGE]; + init(data); + testByteP128(data); + verify("testByteP128", data, goldByteP128); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM129(byte[] data) { + for (int j = 129; j < RANGE; j++) { + data[j + -129] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM129") + @Warmup(0) + public static void runByteM129() { + byte[] data = new byte[RANGE]; + init(data); + testByteM129(data); + verify("testByteM129", data, goldByteM129); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP129(byte[] data) { + for (int j = 0; j < RANGE - 129; j++) { + data[j + 129] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP129") + @Warmup(0) + public static void runByteP129() { + byte[] data = new byte[RANGE]; + init(data); + testByteP129(data); + verify("testByteP129", data, goldByteP129); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM192(byte[] data) { + for (int j = 192; j < RANGE; j++) { + data[j + -192] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM192") + @Warmup(0) + public static void runByteM192() { + byte[] data = new byte[RANGE]; + init(data); + testByteM192(data); + verify("testByteM192", data, goldByteM192); + } + + @Test + // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP192(byte[] data) { + for (int j = 0; j < RANGE - 192; j++) { + data[j + 192] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP192") + @Warmup(0) + public static void runByteP192() { + byte[] data = new byte[RANGE]; + init(data); + testByteP192(data); + verify("testByteP192", data, goldByteP192); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP0(float[] data) { + for (int j = 0; j < RANGE; j++) { + data[j + 0] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP0") + @Warmup(0) + public static void runFloatP0() { + float[] data = new float[RANGE]; + init(data); + testFloatP0(data); + verify("testFloatP0", data, goldFloatP0); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM1(float[] data) { + for (int j = 1; j < RANGE; j++) { + data[j + -1] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM1") + @Warmup(0) + public static void runFloatM1() { + float[] data = new float[RANGE]; + init(data); + testFloatM1(data); + verify("testFloatM1", data, goldFloatM1); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 4 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP1(float[] data) { + for (int j = 0; j < RANGE - 1; j++) { + data[j + 1] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP1") + @Warmup(0) + public static void runFloatP1() { + float[] data = new float[RANGE]; + init(data); + testFloatP1(data); + verify("testFloatP1", data, goldFloatP1); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM2(float[] data) { + for (int j = 2; j < RANGE; j++) { + data[j + -2] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM2") + @Warmup(0) + public static void runFloatM2() { + float[] data = new float[RANGE]; + init(data); + testFloatM2(data); + verify("testFloatM2", data, goldFloatM2); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP2(float[] data) { + for (int j = 0; j < RANGE - 2; j++) { + data[j + 2] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP2") + @Warmup(0) + public static void runFloatP2() { + float[] data = new float[RANGE]; + init(data); + testFloatP2(data); + verify("testFloatP2", data, goldFloatP2); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM3(float[] data) { + for (int j = 3; j < RANGE; j++) { + data[j + -3] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM3") + @Warmup(0) + public static void runFloatM3() { + float[] data = new float[RANGE]; + init(data); + testFloatM3(data); + verify("testFloatM3", data, goldFloatM3); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // positive byte_offset 12 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 12"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 12"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 12 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 12"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 12"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 12 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 12"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 12"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 12 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 12"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 12"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP3(float[] data) { + for (int j = 0; j < RANGE - 3; j++) { + data[j + 3] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP3") + @Warmup(0) + public static void runFloatP3() { + float[] data = new float[RANGE]; + init(data); + testFloatP3(data); + verify("testFloatP3", data, goldFloatP3); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM4(float[] data) { + for (int j = 4; j < RANGE; j++) { + data[j + -4] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM4") + @Warmup(0) + public static void runFloatM4() { + float[] data = new float[RANGE]; + init(data); + testFloatM4(data); + verify("testFloatM4", data, goldFloatM4); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP4(float[] data) { + for (int j = 0; j < RANGE - 4; j++) { + data[j + 4] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP4") + @Warmup(0) + public static void runFloatP4() { + float[] data = new float[RANGE]; + init(data); + testFloatP4(data); + verify("testFloatP4", data, goldFloatP4); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM7(float[] data) { + for (int j = 7; j < RANGE; j++) { + data[j + -7] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM7") + @Warmup(0) + public static void runFloatM7() { + float[] data = new float[RANGE]; + init(data); + testFloatM7(data); + verify("testFloatM7", data, goldFloatM7); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 28 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 28"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 28"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 28 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 28"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 28"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 28 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 28"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 28"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP7(float[] data) { + for (int j = 0; j < RANGE - 7; j++) { + data[j + 7] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP7") + @Warmup(0) + public static void runFloatP7() { + float[] data = new float[RANGE]; + init(data); + testFloatP7(data); + verify("testFloatP7", data, goldFloatP7); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM8(float[] data) { + for (int j = 8; j < RANGE; j++) { + data[j + -8] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM8") + @Warmup(0) + public static void runFloatM8() { + float[] data = new float[RANGE]; + init(data); + testFloatM8(data); + verify("testFloatM8", data, goldFloatM8); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 32 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 32"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 32"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP8(float[] data) { + for (int j = 0; j < RANGE - 8; j++) { + data[j + 8] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP8") + @Warmup(0) + public static void runFloatP8() { + float[] data = new float[RANGE]; + init(data); + testFloatP8(data); + verify("testFloatP8", data, goldFloatP8); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM15(float[] data) { + for (int j = 15; j < RANGE; j++) { + data[j + -15] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM15") + @Warmup(0) + public static void runFloatM15() { + float[] data = new float[RANGE]; + init(data); + testFloatM15(data); + verify("testFloatM15", data, goldFloatM15); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 60 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 60"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 60"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP15(float[] data) { + for (int j = 0; j < RANGE - 15; j++) { + data[j + 15] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP15") + @Warmup(0) + public static void runFloatP15() { + float[] data = new float[RANGE]; + init(data); + testFloatP15(data); + verify("testFloatP15", data, goldFloatP15); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM16(float[] data) { + for (int j = 16; j < RANGE; j++) { + data[j + -16] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM16") + @Warmup(0) + public static void runFloatM16() { + float[] data = new float[RANGE]; + init(data); + testFloatM16(data); + verify("testFloatM16", data, goldFloatM16); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP16(float[] data) { + for (int j = 0; j < RANGE - 16; j++) { + data[j + 16] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP16") + @Warmup(0) + public static void runFloatP16() { + float[] data = new float[RANGE]; + init(data); + testFloatP16(data); + verify("testFloatP16", data, goldFloatP16); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM31(float[] data) { + for (int j = 31; j < RANGE; j++) { + data[j + -31] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM31") + @Warmup(0) + public static void runFloatM31() { + float[] data = new float[RANGE]; + init(data); + testFloatM31(data); + verify("testFloatM31", data, goldFloatM31); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP31(float[] data) { + for (int j = 0; j < RANGE - 31; j++) { + data[j + 31] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP31") + @Warmup(0) + public static void runFloatP31() { + float[] data = new float[RANGE]; + init(data); + testFloatP31(data); + verify("testFloatP31", data, goldFloatP31); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM32(float[] data) { + for (int j = 32; j < RANGE; j++) { + data[j + -32] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM32") + @Warmup(0) + public static void runFloatM32() { + float[] data = new float[RANGE]; + init(data); + testFloatM32(data); + verify("testFloatM32", data, goldFloatM32); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP32(float[] data) { + for (int j = 0; j < RANGE - 32; j++) { + data[j + 32] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP32") + @Warmup(0) + public static void runFloatP32() { + float[] data = new float[RANGE]; + init(data); + testFloatP32(data); + verify("testFloatP32", data, goldFloatP32); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM63(float[] data) { + for (int j = 63; j < RANGE; j++) { + data[j + -63] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM63") + @Warmup(0) + public static void runFloatM63() { + float[] data = new float[RANGE]; + init(data); + testFloatM63(data); + verify("testFloatM63", data, goldFloatM63); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP63(float[] data) { + for (int j = 0; j < RANGE - 63; j++) { + data[j + 63] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP63") + @Warmup(0) + public static void runFloatP63() { + float[] data = new float[RANGE]; + init(data); + testFloatP63(data); + verify("testFloatP63", data, goldFloatP63); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM64(float[] data) { + for (int j = 64; j < RANGE; j++) { + data[j + -64] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM64") + @Warmup(0) + public static void runFloatM64() { + float[] data = new float[RANGE]; + init(data); + testFloatM64(data); + verify("testFloatM64", data, goldFloatM64); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP64(float[] data) { + for (int j = 0; j < RANGE - 64; j++) { + data[j + 64] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP64") + @Warmup(0) + public static void runFloatP64() { + float[] data = new float[RANGE]; + init(data); + testFloatP64(data); + verify("testFloatP64", data, goldFloatP64); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM65(float[] data) { + for (int j = 65; j < RANGE; j++) { + data[j + -65] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM65") + @Warmup(0) + public static void runFloatM65() { + float[] data = new float[RANGE]; + init(data); + testFloatM65(data); + verify("testFloatM65", data, goldFloatM65); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP65(float[] data) { + for (int j = 0; j < RANGE - 65; j++) { + data[j + 65] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP65") + @Warmup(0) + public static void runFloatP65() { + float[] data = new float[RANGE]; + init(data); + testFloatP65(data); + verify("testFloatP65", data, goldFloatP65); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM128(float[] data) { + for (int j = 128; j < RANGE; j++) { + data[j + -128] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM128") + @Warmup(0) + public static void runFloatM128() { + float[] data = new float[RANGE]; + init(data); + testFloatM128(data); + verify("testFloatM128", data, goldFloatM128); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP128(float[] data) { + for (int j = 0; j < RANGE - 128; j++) { + data[j + 128] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP128") + @Warmup(0) + public static void runFloatP128() { + float[] data = new float[RANGE]; + init(data); + testFloatP128(data); + verify("testFloatP128", data, goldFloatP128); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM129(float[] data) { + for (int j = 129; j < RANGE; j++) { + data[j + -129] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM129") + @Warmup(0) + public static void runFloatM129() { + float[] data = new float[RANGE]; + init(data); + testFloatM129(data); + verify("testFloatM129", data, goldFloatM129); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP129(float[] data) { + for (int j = 0; j < RANGE - 129; j++) { + data[j + 129] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP129") + @Warmup(0) + public static void runFloatP129() { + float[] data = new float[RANGE]; + init(data); + testFloatP129(data); + verify("testFloatP129", data, goldFloatP129); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM192(float[] data) { + for (int j = 192; j < RANGE; j++) { + data[j + -192] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM192") + @Warmup(0) + public static void runFloatM192() { + float[] data = new float[RANGE]; + init(data); + testFloatM192(data); + verify("testFloatM192", data, goldFloatM192); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP192(float[] data) { + for (int j = 0; j < RANGE - 192; j++) { + data[j + 192] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP192") + @Warmup(0) + public static void runFloatP192() { + float[] data = new float[RANGE]; + init(data); + testFloatP192(data); + verify("testFloatP192", data, goldFloatP192); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP0(double[] data) { + for (int j = 0; j < RANGE; j++) { + data[j + 0] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP0") + @Warmup(0) + public static void runDoubleP0() { + double[] data = new double[RANGE]; + init(data); + testDoubleP0(data); + verify("testDoubleP0", data, goldDoubleP0); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM1(double[] data) { + for (int j = 1; j < RANGE; j++) { + data[j + -1] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM1") + @Warmup(0) + public static void runDoubleM1() { + double[] data = new double[RANGE]; + init(data); + testDoubleM1(data); + verify("testDoubleM1", data, goldDoubleM1); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 8 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP1(double[] data) { + for (int j = 0; j < RANGE - 1; j++) { + data[j + 1] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP1") + @Warmup(0) + public static void runDoubleP1() { + double[] data = new double[RANGE]; + init(data); + testDoubleP1(data); + verify("testDoubleP1", data, goldDoubleP1); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM2(double[] data) { + for (int j = 2; j < RANGE; j++) { + data[j + -2] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM2") + @Warmup(0) + public static void runDoubleM2() { + double[] data = new double[RANGE]; + init(data); + testDoubleM2(data); + verify("testDoubleM2", data, goldDoubleM2); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP2(double[] data) { + for (int j = 0; j < RANGE - 2; j++) { + data[j + 2] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP2") + @Warmup(0) + public static void runDoubleP2() { + double[] data = new double[RANGE]; + init(data); + testDoubleP2(data); + verify("testDoubleP2", data, goldDoubleP2); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM3(double[] data) { + for (int j = 3; j < RANGE; j++) { + data[j + -3] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM3") + @Warmup(0) + public static void runDoubleM3() { + double[] data = new double[RANGE]; + init(data); + testDoubleM3(data); + verify("testDoubleM3", data, goldDoubleM3); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 24 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 24"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 24"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 24 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 24"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 24"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 24 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 24"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 24"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP3(double[] data) { + for (int j = 0; j < RANGE - 3; j++) { + data[j + 3] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP3") + @Warmup(0) + public static void runDoubleP3() { + double[] data = new double[RANGE]; + init(data); + testDoubleP3(data); + verify("testDoubleP3", data, goldDoubleP3); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM4(double[] data) { + for (int j = 4; j < RANGE; j++) { + data[j + -4] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM4") + @Warmup(0) + public static void runDoubleM4() { + double[] data = new double[RANGE]; + init(data); + testDoubleM4(data); + verify("testDoubleM4", data, goldDoubleM4); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 32 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 32"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 32"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP4(double[] data) { + for (int j = 0; j < RANGE - 4; j++) { + data[j + 4] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP4") + @Warmup(0) + public static void runDoubleP4() { + double[] data = new double[RANGE]; + init(data); + testDoubleP4(data); + verify("testDoubleP4", data, goldDoubleP4); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM7(double[] data) { + for (int j = 7; j < RANGE; j++) { + data[j + -7] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM7") + @Warmup(0) + public static void runDoubleM7() { + double[] data = new double[RANGE]; + init(data); + testDoubleM7(data); + verify("testDoubleM7", data, goldDoubleM7); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 56 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 56"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 56"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP7(double[] data) { + for (int j = 0; j < RANGE - 7; j++) { + data[j + 7] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP7") + @Warmup(0) + public static void runDoubleP7() { + double[] data = new double[RANGE]; + init(data); + testDoubleP7(data); + verify("testDoubleP7", data, goldDoubleP7); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM8(double[] data) { + for (int j = 8; j < RANGE; j++) { + data[j + -8] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM8") + @Warmup(0) + public static void runDoubleM8() { + double[] data = new double[RANGE]; + init(data); + testDoubleM8(data); + verify("testDoubleM8", data, goldDoubleM8); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP8(double[] data) { + for (int j = 0; j < RANGE - 8; j++) { + data[j + 8] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP8") + @Warmup(0) + public static void runDoubleP8() { + double[] data = new double[RANGE]; + init(data); + testDoubleP8(data); + verify("testDoubleP8", data, goldDoubleP8); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM15(double[] data) { + for (int j = 15; j < RANGE; j++) { + data[j + -15] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM15") + @Warmup(0) + public static void runDoubleM15() { + double[] data = new double[RANGE]; + init(data); + testDoubleM15(data); + verify("testDoubleM15", data, goldDoubleM15); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP15(double[] data) { + for (int j = 0; j < RANGE - 15; j++) { + data[j + 15] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP15") + @Warmup(0) + public static void runDoubleP15() { + double[] data = new double[RANGE]; + init(data); + testDoubleP15(data); + verify("testDoubleP15", data, goldDoubleP15); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM16(double[] data) { + for (int j = 16; j < RANGE; j++) { + data[j + -16] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM16") + @Warmup(0) + public static void runDoubleM16() { + double[] data = new double[RANGE]; + init(data); + testDoubleM16(data); + verify("testDoubleM16", data, goldDoubleM16); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP16(double[] data) { + for (int j = 0; j < RANGE - 16; j++) { + data[j + 16] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP16") + @Warmup(0) + public static void runDoubleP16() { + double[] data = new double[RANGE]; + init(data); + testDoubleP16(data); + verify("testDoubleP16", data, goldDoubleP16); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM31(double[] data) { + for (int j = 31; j < RANGE; j++) { + data[j + -31] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM31") + @Warmup(0) + public static void runDoubleM31() { + double[] data = new double[RANGE]; + init(data); + testDoubleM31(data); + verify("testDoubleM31", data, goldDoubleM31); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP31(double[] data) { + for (int j = 0; j < RANGE - 31; j++) { + data[j + 31] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP31") + @Warmup(0) + public static void runDoubleP31() { + double[] data = new double[RANGE]; + init(data); + testDoubleP31(data); + verify("testDoubleP31", data, goldDoubleP31); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM32(double[] data) { + for (int j = 32; j < RANGE; j++) { + data[j + -32] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM32") + @Warmup(0) + public static void runDoubleM32() { + double[] data = new double[RANGE]; + init(data); + testDoubleM32(data); + verify("testDoubleM32", data, goldDoubleM32); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP32(double[] data) { + for (int j = 0; j < RANGE - 32; j++) { + data[j + 32] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP32") + @Warmup(0) + public static void runDoubleP32() { + double[] data = new double[RANGE]; + init(data); + testDoubleP32(data); + verify("testDoubleP32", data, goldDoubleP32); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM63(double[] data) { + for (int j = 63; j < RANGE; j++) { + data[j + -63] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM63") + @Warmup(0) + public static void runDoubleM63() { + double[] data = new double[RANGE]; + init(data); + testDoubleM63(data); + verify("testDoubleM63", data, goldDoubleM63); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP63(double[] data) { + for (int j = 0; j < RANGE - 63; j++) { + data[j + 63] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP63") + @Warmup(0) + public static void runDoubleP63() { + double[] data = new double[RANGE]; + init(data); + testDoubleP63(data); + verify("testDoubleP63", data, goldDoubleP63); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM64(double[] data) { + for (int j = 64; j < RANGE; j++) { + data[j + -64] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM64") + @Warmup(0) + public static void runDoubleM64() { + double[] data = new double[RANGE]; + init(data); + testDoubleM64(data); + verify("testDoubleM64", data, goldDoubleM64); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP64(double[] data) { + for (int j = 0; j < RANGE - 64; j++) { + data[j + 64] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP64") + @Warmup(0) + public static void runDoubleP64() { + double[] data = new double[RANGE]; + init(data); + testDoubleP64(data); + verify("testDoubleP64", data, goldDoubleP64); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM65(double[] data) { + for (int j = 65; j < RANGE; j++) { + data[j + -65] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM65") + @Warmup(0) + public static void runDoubleM65() { + double[] data = new double[RANGE]; + init(data); + testDoubleM65(data); + verify("testDoubleM65", data, goldDoubleM65); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP65(double[] data) { + for (int j = 0; j < RANGE - 65; j++) { + data[j + 65] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP65") + @Warmup(0) + public static void runDoubleP65() { + double[] data = new double[RANGE]; + init(data); + testDoubleP65(data); + verify("testDoubleP65", data, goldDoubleP65); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM128(double[] data) { + for (int j = 128; j < RANGE; j++) { + data[j + -128] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM128") + @Warmup(0) + public static void runDoubleM128() { + double[] data = new double[RANGE]; + init(data); + testDoubleM128(data); + verify("testDoubleM128", data, goldDoubleM128); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP128(double[] data) { + for (int j = 0; j < RANGE - 128; j++) { + data[j + 128] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP128") + @Warmup(0) + public static void runDoubleP128() { + double[] data = new double[RANGE]; + init(data); + testDoubleP128(data); + verify("testDoubleP128", data, goldDoubleP128); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM129(double[] data) { + for (int j = 129; j < RANGE; j++) { + data[j + -129] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM129") + @Warmup(0) + public static void runDoubleM129() { + double[] data = new double[RANGE]; + init(data); + testDoubleM129(data); + verify("testDoubleM129", data, goldDoubleM129); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP129(double[] data) { + for (int j = 0; j < RANGE - 129; j++) { + data[j + 129] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP129") + @Warmup(0) + public static void runDoubleP129() { + double[] data = new double[RANGE]; + init(data); + testDoubleP129(data); + verify("testDoubleP129", data, goldDoubleP129); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM192(double[] data) { + for (int j = 192; j < RANGE; j++) { + data[j + -192] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM192") + @Warmup(0) + public static void runDoubleM192() { + double[] data = new double[RANGE]; + init(data); + testDoubleM192(data); + verify("testDoubleM192", data, goldDoubleM192); + } + + @Test + // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP192(double[] data) { + for (int j = 0; j < RANGE - 192; j++) { + data[j + 192] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP192") + @Warmup(0) + public static void runDoubleP192() { + double[] data = new double[RANGE]; + init(data); + testDoubleP192(data); + verify("testDoubleP192", data, goldDoubleP192); + } + + // ------------------- Initialization ------------------- + + static void init(int[] data) { + for (int j = 0; j < RANGE; j++) { + data[j] = (int)j; + } + } + + static void init(long[] data) { + for (int j = 0; j < RANGE; j++) { + data[j] = (long)j; + } + } + + static void init(short[] data) { + for (int j = 0; j < RANGE; j++) { + data[j] = (short)j; + } + } + + static void init(char[] data) { + for (int j = 0; j < RANGE; j++) { + data[j] = (char)j; + } + } + + static void init(byte[] data) { + for (int j = 0; j < RANGE; j++) { + data[j] = (byte)j; + } + } + + static void init(float[] data) { + for (int j = 0; j < RANGE; j++) { + data[j] = (float)j; + } + } + + static void init(double[] data) { + for (int j = 0; j < RANGE; j++) { + data[j] = (double)j; + } + } + + // ------------------- Verification ------------------- + + static void verify(String context, int[] data, int[] gold) { + for (int i = 0; i < RANGE; i++) { + if (data[i] != gold[i]) { + throw new RuntimeException(" Invalid " + context + " result: data[" + i + "]: " + data[i] + " != " + gold[i]); + } + } + } + static void verify(String context, long[] data, long[] gold) { + for (int i = 0; i < RANGE; i++) { + if (data[i] != gold[i]) { + throw new RuntimeException(" Invalid " + context + " result: data[" + i + "]: " + data[i] + " != " + gold[i]); + } + } + } + static void verify(String context, short[] data, short[] gold) { + for (int i = 0; i < RANGE; i++) { + if (data[i] != gold[i]) { + throw new RuntimeException(" Invalid " + context + " result: data[" + i + "]: " + data[i] + " != " + gold[i]); + } + } + } + static void verify(String context, char[] data, char[] gold) { + for (int i = 0; i < RANGE; i++) { + if (data[i] != gold[i]) { + throw new RuntimeException(" Invalid " + context + " result: data[" + i + "]: " + data[i] + " != " + gold[i]); + } + } + } + static void verify(String context, byte[] data, byte[] gold) { + for (int i = 0; i < RANGE; i++) { + if (data[i] != gold[i]) { + throw new RuntimeException(" Invalid " + context + " result: data[" + i + "]: " + data[i] + " != " + gold[i]); + } + } + } + static void verify(String context, float[] data, float[] gold) { + for (int i = 0; i < RANGE; i++) { + if (data[i] != gold[i]) { + throw new RuntimeException(" Invalid " + context + " result: data[" + i + "]: " + data[i] + " != " + gold[i]); + } + } + } + static void verify(String context, double[] data, double[] gold) { + for (int i = 0; i < RANGE; i++) { + if (data[i] != gold[i]) { + throw new RuntimeException(" Invalid " + context + " result: data[" + i + "]: " + data[i] + " != " + gold[i]); + } + } + } +} From 5955c2903340be95e4592d079caee65fa1df7288 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Tue, 28 Feb 2023 16:20:09 +0100 Subject: [PATCH 23/34] v2 TestDependencyOffsets.java based on MaxVectorSize not SuperWordMaxVectorSize (platform independent) --- .../superword/TestDependencyOffsets.java | 3702 ++++++++--------- 1 file changed, 1851 insertions(+), 1851 deletions(-) diff --git a/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java b/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java index 206b351525c05..71135aaa13f42 100644 --- a/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java +++ b/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java @@ -25,7 +25,7 @@ * @test * @bug 8298935 * @summary Test SuperWord vectorization with different access offsets - * and various SuperWordMaxVectorSize values, and +- AlignVector. + * and various MaxVectorSize values, and +- AlignVector. * Note: CompileCommand Option Vectorize is enabled. * @requires vm.compiler2.enabled * @library /test/lib / @@ -44,7 +44,7 @@ * * Checking if we should vectorize is a bit complicated. It depends on * Matcher::vector_width_in_bytes, of the respective platforms (eg. x86.ad) - * This vector_width can be further constrained by SuperWordMaxVectorSize. + * This vector_width can be further constrained by MaxVectorSize. * * Generally, we vectorize if: * - Vectors have at least 4 bytes: vector_width >= 4 @@ -777,7 +777,7 @@ public static void main(String args[]) { for (int maxVectorSize : new int[] {1, 2, 4, 8, 16, 32, 64, 128}) { for (String alignVectorSign : new String[] {"-"}) { // TODO scenarios[i] = new Scenario(i, "-XX:" + alignVectorSign + "AlignVector", - "-XX:SuperWordMaxVectorSize=" + maxVectorSize); + "-XX:MaxVectorSize=" + maxVectorSize); i++; } } @@ -790,31 +790,31 @@ public static void main(String args[]) { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP0(int[] data) { for (int j = 0; j < RANGE; j++) { @@ -834,31 +834,31 @@ public static void runIntP0() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM1(int[] data) { for (int j = 1; j < RANGE; j++) { @@ -879,34 +879,34 @@ public static void runIntM1() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 4"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 4"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP1(int[] data) { for (int j = 0; j < RANGE - 1; j++) { @@ -926,31 +926,31 @@ public static void runIntP1() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM2(int[] data) { for (int j = 2; j < RANGE; j++) { @@ -971,34 +971,34 @@ public static void runIntM2() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP2(int[] data) { for (int j = 0; j < RANGE - 2; j++) { @@ -1018,31 +1018,31 @@ public static void runIntP2() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM3(int[] data) { for (int j = 3; j < RANGE; j++) { @@ -1063,34 +1063,34 @@ public static void runIntM3() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 // positive byte_offset 12 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 12"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 12"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 12"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 12 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 12"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 12"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 12"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 // positive byte_offset 12 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 12"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 12"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 12"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 12 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 12"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 12"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 12"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP3(int[] data) { for (int j = 0; j < RANGE - 3; j++) { @@ -1110,31 +1110,31 @@ public static void runIntP3() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM4(int[] data) { for (int j = 4; j < RANGE; j++) { @@ -1154,34 +1154,34 @@ public static void runIntM4() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP4(int[] data) { for (int j = 0; j < RANGE - 4; j++) { @@ -1201,31 +1201,31 @@ public static void runIntP4() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM7(int[] data) { for (int j = 7; j < RANGE; j++) { @@ -1245,34 +1245,34 @@ public static void runIntM7() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 28"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 28"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 28"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 28"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 28"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 28"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 28"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 28"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 28"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP7(int[] data) { for (int j = 0; j < RANGE - 7; j++) { @@ -1292,31 +1292,31 @@ public static void runIntP7() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM8(int[] data) { for (int j = 8; j < RANGE; j++) { @@ -1336,32 +1336,32 @@ public static void runIntM8() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 // positive byte_offset 32 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 32"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 32"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 32"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 32"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP8(int[] data) { for (int j = 0; j < RANGE - 8; j++) { @@ -1381,31 +1381,31 @@ public static void runIntP8() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM15(int[] data) { for (int j = 15; j < RANGE; j++) { @@ -1425,32 +1425,32 @@ public static void runIntM15() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 // positive byte_offset 60 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 60"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 60"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 60"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 60"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP15(int[] data) { for (int j = 0; j < RANGE - 15; j++) { @@ -1470,31 +1470,31 @@ public static void runIntP15() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM16(int[] data) { for (int j = 16; j < RANGE; j++) { @@ -1514,31 +1514,31 @@ public static void runIntM16() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP16(int[] data) { for (int j = 0; j < RANGE - 16; j++) { @@ -1558,31 +1558,31 @@ public static void runIntP16() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM31(int[] data) { for (int j = 31; j < RANGE; j++) { @@ -1602,31 +1602,31 @@ public static void runIntM31() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP31(int[] data) { for (int j = 0; j < RANGE - 31; j++) { @@ -1646,31 +1646,31 @@ public static void runIntP31() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM32(int[] data) { for (int j = 32; j < RANGE; j++) { @@ -1690,31 +1690,31 @@ public static void runIntM32() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP32(int[] data) { for (int j = 0; j < RANGE - 32; j++) { @@ -1734,31 +1734,31 @@ public static void runIntP32() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM63(int[] data) { for (int j = 63; j < RANGE; j++) { @@ -1778,31 +1778,31 @@ public static void runIntM63() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP63(int[] data) { for (int j = 0; j < RANGE - 63; j++) { @@ -1822,31 +1822,31 @@ public static void runIntP63() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM64(int[] data) { for (int j = 64; j < RANGE; j++) { @@ -1866,31 +1866,31 @@ public static void runIntM64() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP64(int[] data) { for (int j = 0; j < RANGE - 64; j++) { @@ -1910,31 +1910,31 @@ public static void runIntP64() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM65(int[] data) { for (int j = 65; j < RANGE; j++) { @@ -1954,31 +1954,31 @@ public static void runIntM65() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP65(int[] data) { for (int j = 0; j < RANGE - 65; j++) { @@ -1998,31 +1998,31 @@ public static void runIntP65() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM128(int[] data) { for (int j = 128; j < RANGE; j++) { @@ -2042,31 +2042,31 @@ public static void runIntM128() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP128(int[] data) { for (int j = 0; j < RANGE - 128; j++) { @@ -2086,31 +2086,31 @@ public static void runIntP128() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM129(int[] data) { for (int j = 129; j < RANGE; j++) { @@ -2130,31 +2130,31 @@ public static void runIntM129() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP129(int[] data) { for (int j = 0; j < RANGE - 129; j++) { @@ -2174,31 +2174,31 @@ public static void runIntP129() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM192(int[] data) { for (int j = 192; j < RANGE; j++) { @@ -2218,31 +2218,31 @@ public static void runIntM192() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP192(int[] data) { for (int j = 0; j < RANGE - 192; j++) { @@ -2262,31 +2262,31 @@ public static void runIntP192() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP0(long[] data) { for (int j = 0; j < RANGE; j++) { @@ -2306,31 +2306,31 @@ public static void runLongP0() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM1(long[] data) { for (int j = 1; j < RANGE; j++) { @@ -2351,34 +2351,34 @@ public static void runLongM1() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP1(long[] data) { for (int j = 0; j < RANGE - 1; j++) { @@ -2398,31 +2398,31 @@ public static void runLongP1() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM2(long[] data) { for (int j = 2; j < RANGE; j++) { @@ -2442,34 +2442,34 @@ public static void runLongM2() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP2(long[] data) { for (int j = 0; j < RANGE - 2; j++) { @@ -2489,31 +2489,31 @@ public static void runLongP2() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM3(long[] data) { for (int j = 3; j < RANGE; j++) { @@ -2533,34 +2533,34 @@ public static void runLongM3() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 24 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 24"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 24"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 24"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 // positive byte_offset 24 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 24"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 24"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 24"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 24 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 24"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 24"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 24"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP3(long[] data) { for (int j = 0; j < RANGE - 3; j++) { @@ -2580,31 +2580,31 @@ public static void runLongP3() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM4(long[] data) { for (int j = 4; j < RANGE; j++) { @@ -2624,32 +2624,32 @@ public static void runLongM4() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 // positive byte_offset 32 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 32"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 32"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 32"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 32"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP4(long[] data) { for (int j = 0; j < RANGE - 4; j++) { @@ -2669,31 +2669,31 @@ public static void runLongP4() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM7(long[] data) { for (int j = 7; j < RANGE; j++) { @@ -2713,32 +2713,32 @@ public static void runLongM7() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 // positive byte_offset 56 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 56"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 56"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 56"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 56"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP7(long[] data) { for (int j = 0; j < RANGE - 7; j++) { @@ -2758,31 +2758,31 @@ public static void runLongP7() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM8(long[] data) { for (int j = 8; j < RANGE; j++) { @@ -2802,31 +2802,31 @@ public static void runLongM8() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP8(long[] data) { for (int j = 0; j < RANGE - 8; j++) { @@ -2846,31 +2846,31 @@ public static void runLongP8() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM15(long[] data) { for (int j = 15; j < RANGE; j++) { @@ -2890,31 +2890,31 @@ public static void runLongM15() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP15(long[] data) { for (int j = 0; j < RANGE - 15; j++) { @@ -2934,31 +2934,31 @@ public static void runLongP15() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM16(long[] data) { for (int j = 16; j < RANGE; j++) { @@ -2978,31 +2978,31 @@ public static void runLongM16() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP16(long[] data) { for (int j = 0; j < RANGE - 16; j++) { @@ -3022,31 +3022,31 @@ public static void runLongP16() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM31(long[] data) { for (int j = 31; j < RANGE; j++) { @@ -3066,31 +3066,31 @@ public static void runLongM31() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP31(long[] data) { for (int j = 0; j < RANGE - 31; j++) { @@ -3110,31 +3110,31 @@ public static void runLongP31() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM32(long[] data) { for (int j = 32; j < RANGE; j++) { @@ -3154,31 +3154,31 @@ public static void runLongM32() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP32(long[] data) { for (int j = 0; j < RANGE - 32; j++) { @@ -3198,31 +3198,31 @@ public static void runLongP32() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM63(long[] data) { for (int j = 63; j < RANGE; j++) { @@ -3242,31 +3242,31 @@ public static void runLongM63() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP63(long[] data) { for (int j = 0; j < RANGE - 63; j++) { @@ -3286,31 +3286,31 @@ public static void runLongP63() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM64(long[] data) { for (int j = 64; j < RANGE; j++) { @@ -3330,31 +3330,31 @@ public static void runLongM64() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP64(long[] data) { for (int j = 0; j < RANGE - 64; j++) { @@ -3374,31 +3374,31 @@ public static void runLongP64() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM65(long[] data) { for (int j = 65; j < RANGE; j++) { @@ -3418,31 +3418,31 @@ public static void runLongM65() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP65(long[] data) { for (int j = 0; j < RANGE - 65; j++) { @@ -3462,31 +3462,31 @@ public static void runLongP65() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM128(long[] data) { for (int j = 128; j < RANGE; j++) { @@ -3506,31 +3506,31 @@ public static void runLongM128() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP128(long[] data) { for (int j = 0; j < RANGE - 128; j++) { @@ -3550,31 +3550,31 @@ public static void runLongP128() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM129(long[] data) { for (int j = 129; j < RANGE; j++) { @@ -3594,31 +3594,31 @@ public static void runLongM129() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP129(long[] data) { for (int j = 0; j < RANGE - 129; j++) { @@ -3638,31 +3638,31 @@ public static void runLongP129() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM192(long[] data) { for (int j = 192; j < RANGE; j++) { @@ -3682,31 +3682,31 @@ public static void runLongM192() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP192(long[] data) { for (int j = 0; j < RANGE - 192; j++) { @@ -3726,31 +3726,31 @@ public static void runLongP192() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP0(short[] data) { for (int j = 0; j < RANGE; j++) { @@ -3770,31 +3770,31 @@ public static void runShortP0() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM1(short[] data) { for (int j = 1; j < RANGE; j++) { @@ -3815,34 +3815,34 @@ public static void runShortM1() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 // positive byte_offset 2 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 2 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 2 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 2 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP1(short[] data) { for (int j = 0; j < RANGE - 1; j++) { @@ -3862,31 +3862,31 @@ public static void runShortP1() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM2(short[] data) { for (int j = 2; j < RANGE; j++) { @@ -3907,34 +3907,34 @@ public static void runShortM2() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP2(short[] data) { for (int j = 0; j < RANGE - 2; j++) { @@ -3954,31 +3954,31 @@ public static void runShortP2() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM3(short[] data) { for (int j = 3; j < RANGE; j++) { @@ -3999,34 +3999,34 @@ public static void runShortM3() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 // positive byte_offset 6 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 6"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 6"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 6"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 6 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 6"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 6"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 6"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 6 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 6"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 6"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 6"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 6 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 6"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 6"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 6"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP3(short[] data) { for (int j = 0; j < RANGE - 3; j++) { @@ -4046,31 +4046,31 @@ public static void runShortP3() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM4(short[] data) { for (int j = 4; j < RANGE; j++) { @@ -4091,34 +4091,34 @@ public static void runShortM4() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP4(short[] data) { for (int j = 0; j < RANGE - 4; j++) { @@ -4138,31 +4138,31 @@ public static void runShortP4() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM7(short[] data) { for (int j = 7; j < RANGE; j++) { @@ -4183,34 +4183,34 @@ public static void runShortM7() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 14"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 14"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 14"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 14"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 14"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 14"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 14"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 14"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 14"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 14"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 14"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 14"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP7(short[] data) { for (int j = 0; j < RANGE - 7; j++) { @@ -4230,31 +4230,31 @@ public static void runShortP7() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM8(short[] data) { for (int j = 8; j < RANGE; j++) { @@ -4274,34 +4274,34 @@ public static void runShortM8() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP8(short[] data) { for (int j = 0; j < RANGE - 8; j++) { @@ -4321,31 +4321,31 @@ public static void runShortP8() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM15(short[] data) { for (int j = 15; j < RANGE; j++) { @@ -4365,34 +4365,34 @@ public static void runShortM15() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 30 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 30"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 30"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 30"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 30 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 30"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 30"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 30"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 30 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 30"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 30"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 30"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP15(short[] data) { for (int j = 0; j < RANGE - 15; j++) { @@ -4412,31 +4412,31 @@ public static void runShortP15() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM16(short[] data) { for (int j = 16; j < RANGE; j++) { @@ -4456,32 +4456,32 @@ public static void runShortM16() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 32 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 32"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 32"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 32"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 32"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP16(short[] data) { for (int j = 0; j < RANGE - 16; j++) { @@ -4501,31 +4501,31 @@ public static void runShortP16() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM31(short[] data) { for (int j = 31; j < RANGE; j++) { @@ -4545,32 +4545,32 @@ public static void runShortM31() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 62 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 62"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 62"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 62"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 62"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP31(short[] data) { for (int j = 0; j < RANGE - 31; j++) { @@ -4590,31 +4590,31 @@ public static void runShortP31() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM32(short[] data) { for (int j = 32; j < RANGE; j++) { @@ -4634,31 +4634,31 @@ public static void runShortM32() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP32(short[] data) { for (int j = 0; j < RANGE - 32; j++) { @@ -4678,31 +4678,31 @@ public static void runShortP32() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM63(short[] data) { for (int j = 63; j < RANGE; j++) { @@ -4722,31 +4722,31 @@ public static void runShortM63() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP63(short[] data) { for (int j = 0; j < RANGE - 63; j++) { @@ -4766,31 +4766,31 @@ public static void runShortP63() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM64(short[] data) { for (int j = 64; j < RANGE; j++) { @@ -4810,31 +4810,31 @@ public static void runShortM64() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP64(short[] data) { for (int j = 0; j < RANGE - 64; j++) { @@ -4854,31 +4854,31 @@ public static void runShortP64() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM65(short[] data) { for (int j = 65; j < RANGE; j++) { @@ -4898,31 +4898,31 @@ public static void runShortM65() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP65(short[] data) { for (int j = 0; j < RANGE - 65; j++) { @@ -4942,31 +4942,31 @@ public static void runShortP65() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM128(short[] data) { for (int j = 128; j < RANGE; j++) { @@ -4986,31 +4986,31 @@ public static void runShortM128() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP128(short[] data) { for (int j = 0; j < RANGE - 128; j++) { @@ -5030,31 +5030,31 @@ public static void runShortP128() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM129(short[] data) { for (int j = 129; j < RANGE; j++) { @@ -5074,31 +5074,31 @@ public static void runShortM129() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP129(short[] data) { for (int j = 0; j < RANGE - 129; j++) { @@ -5118,31 +5118,31 @@ public static void runShortP129() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM192(short[] data) { for (int j = 192; j < RANGE; j++) { @@ -5162,31 +5162,31 @@ public static void runShortM192() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP192(short[] data) { for (int j = 0; j < RANGE - 192; j++) { @@ -5206,31 +5206,31 @@ public static void runShortP192() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP0(char[] data) { for (int j = 0; j < RANGE; j++) { @@ -5250,31 +5250,31 @@ public static void runCharP0() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM1(char[] data) { for (int j = 1; j < RANGE; j++) { @@ -5295,34 +5295,34 @@ public static void runCharM1() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 // positive byte_offset 2 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 2 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 2 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 2 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP1(char[] data) { for (int j = 0; j < RANGE - 1; j++) { @@ -5342,31 +5342,31 @@ public static void runCharP1() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM2(char[] data) { for (int j = 2; j < RANGE; j++) { @@ -5387,34 +5387,34 @@ public static void runCharM2() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP2(char[] data) { for (int j = 0; j < RANGE - 2; j++) { @@ -5434,31 +5434,31 @@ public static void runCharP2() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM3(char[] data) { for (int j = 3; j < RANGE; j++) { @@ -5479,34 +5479,34 @@ public static void runCharM3() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 // positive byte_offset 6 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 6"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 6"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 6"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 6 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 6"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 6"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 6"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 6 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 6"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 6"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 6"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 6 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 6"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 6"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 6"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP3(char[] data) { for (int j = 0; j < RANGE - 3; j++) { @@ -5526,31 +5526,31 @@ public static void runCharP3() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM4(char[] data) { for (int j = 4; j < RANGE; j++) { @@ -5571,34 +5571,34 @@ public static void runCharM4() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP4(char[] data) { for (int j = 0; j < RANGE - 4; j++) { @@ -5618,31 +5618,31 @@ public static void runCharP4() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM7(char[] data) { for (int j = 7; j < RANGE; j++) { @@ -5663,34 +5663,34 @@ public static void runCharM7() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 14"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 14"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 14"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 14"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 14"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 14"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 14"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 14"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 14"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 14"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 14"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 14"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP7(char[] data) { for (int j = 0; j < RANGE - 7; j++) { @@ -5710,31 +5710,31 @@ public static void runCharP7() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM8(char[] data) { for (int j = 8; j < RANGE; j++) { @@ -5754,34 +5754,34 @@ public static void runCharM8() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP8(char[] data) { for (int j = 0; j < RANGE - 8; j++) { @@ -5801,31 +5801,31 @@ public static void runCharP8() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM15(char[] data) { for (int j = 15; j < RANGE; j++) { @@ -5845,34 +5845,34 @@ public static void runCharM15() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 30 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 30"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 30"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 30"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 30 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 30"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 30"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 30"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 // positive byte_offset 30 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 30"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 30"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 30"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP15(char[] data) { for (int j = 0; j < RANGE - 15; j++) { @@ -5892,31 +5892,31 @@ public static void runCharP15() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM16(char[] data) { for (int j = 16; j < RANGE; j++) { @@ -5936,32 +5936,32 @@ public static void runCharM16() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 32 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 32"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 32"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 32"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 32"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP16(char[] data) { for (int j = 0; j < RANGE - 16; j++) { @@ -5981,31 +5981,31 @@ public static void runCharP16() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM31(char[] data) { for (int j = 31; j < RANGE; j++) { @@ -6025,32 +6025,32 @@ public static void runCharM31() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 // positive byte_offset 62 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 62"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 62"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 62"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 62"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP31(char[] data) { for (int j = 0; j < RANGE - 31; j++) { @@ -6070,31 +6070,31 @@ public static void runCharP31() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM32(char[] data) { for (int j = 32; j < RANGE; j++) { @@ -6114,31 +6114,31 @@ public static void runCharM32() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP32(char[] data) { for (int j = 0; j < RANGE - 32; j++) { @@ -6158,31 +6158,31 @@ public static void runCharP32() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM63(char[] data) { for (int j = 63; j < RANGE; j++) { @@ -6202,31 +6202,31 @@ public static void runCharM63() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP63(char[] data) { for (int j = 0; j < RANGE - 63; j++) { @@ -6246,31 +6246,31 @@ public static void runCharP63() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM64(char[] data) { for (int j = 64; j < RANGE; j++) { @@ -6290,31 +6290,31 @@ public static void runCharM64() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP64(char[] data) { for (int j = 0; j < RANGE - 64; j++) { @@ -6334,31 +6334,31 @@ public static void runCharP64() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM65(char[] data) { for (int j = 65; j < RANGE; j++) { @@ -6378,31 +6378,31 @@ public static void runCharM65() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP65(char[] data) { for (int j = 0; j < RANGE - 65; j++) { @@ -6422,31 +6422,31 @@ public static void runCharP65() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM128(char[] data) { for (int j = 128; j < RANGE; j++) { @@ -6466,31 +6466,31 @@ public static void runCharM128() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP128(char[] data) { for (int j = 0; j < RANGE - 128; j++) { @@ -6510,31 +6510,31 @@ public static void runCharP128() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM129(char[] data) { for (int j = 129; j < RANGE; j++) { @@ -6554,31 +6554,31 @@ public static void runCharM129() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP129(char[] data) { for (int j = 0; j < RANGE - 129; j++) { @@ -6598,31 +6598,31 @@ public static void runCharP129() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM192(char[] data) { for (int j = 192; j < RANGE; j++) { @@ -6642,31 +6642,31 @@ public static void runCharM192() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP192(char[] data) { for (int j = 0; j < RANGE - 192; j++) { @@ -6686,31 +6686,31 @@ public static void runCharP192() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP0(byte[] data) { for (int j = 0; j < RANGE; j++) { @@ -6730,31 +6730,31 @@ public static void runByteP0() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM1(byte[] data) { for (int j = 1; j < RANGE; j++) { @@ -6775,34 +6775,34 @@ public static void runByteM1() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 // positive byte_offset 1 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 1"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 1"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 1"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 1"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 1 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 1"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 1"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 1"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 1"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 // positive byte_offset 1 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 1"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 1"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 1"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 1"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 1 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 1"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 1"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 1"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 1"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP1(byte[] data) { for (int j = 0; j < RANGE - 1; j++) { @@ -6822,31 +6822,31 @@ public static void runByteP1() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM2(byte[] data) { for (int j = 2; j < RANGE; j++) { @@ -6867,34 +6867,34 @@ public static void runByteM2() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 // positive byte_offset 2 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 2 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 // positive byte_offset 2 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 2 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 2"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 2"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP2(byte[] data) { for (int j = 0; j < RANGE - 2; j++) { @@ -6914,31 +6914,31 @@ public static void runByteP2() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM3(byte[] data) { for (int j = 3; j < RANGE; j++) { @@ -6959,34 +6959,34 @@ public static void runByteM3() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 // positive byte_offset 3 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 3"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 3"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 3"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 3"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 3 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 3"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 3"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 3"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 3"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 // positive byte_offset 3 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 3"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 3"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 3"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 3"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 3 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 3"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 3"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 3"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 3"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP3(byte[] data) { for (int j = 0; j < RANGE - 3; j++) { @@ -7006,31 +7006,31 @@ public static void runByteP3() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM4(byte[] data) { for (int j = 4; j < RANGE; j++) { @@ -7051,34 +7051,34 @@ public static void runByteM4() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP4(byte[] data) { for (int j = 0; j < RANGE - 4; j++) { @@ -7098,31 +7098,31 @@ public static void runByteP4() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM7(byte[] data) { for (int j = 7; j < RANGE; j++) { @@ -7143,34 +7143,34 @@ public static void runByteM7() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 // positive byte_offset 7 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 7"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 7"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 7"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 7"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 7 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 7"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 7"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 7"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 7"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 // positive byte_offset 7 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 7"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 7"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 7"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 7"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 7 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 7"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 7"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 7"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 7"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP7(byte[] data) { for (int j = 0; j < RANGE - 7; j++) { @@ -7190,31 +7190,31 @@ public static void runByteP7() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM8(byte[] data) { for (int j = 8; j < RANGE; j++) { @@ -7235,34 +7235,34 @@ public static void runByteM8() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP8(byte[] data) { for (int j = 0; j < RANGE - 8; j++) { @@ -7282,31 +7282,31 @@ public static void runByteP8() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM15(byte[] data) { for (int j = 15; j < RANGE; j++) { @@ -7327,34 +7327,34 @@ public static void runByteM15() { // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 // positive byte_offset 15 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 15"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 15"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 15"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 15"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 15 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 15"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 15"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 15"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 15"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 // positive byte_offset 15 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 15"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 15"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 15"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 15"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 15 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 15"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 15"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 15"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 15"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP15(byte[] data) { for (int j = 0; j < RANGE - 15; j++) { @@ -7374,31 +7374,31 @@ public static void runByteP15() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM16(byte[] data) { for (int j = 16; j < RANGE; j++) { @@ -7418,34 +7418,34 @@ public static void runByteM16() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP16(byte[] data) { for (int j = 0; j < RANGE - 16; j++) { @@ -7465,31 +7465,31 @@ public static void runByteP16() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM31(byte[] data) { for (int j = 31; j < RANGE; j++) { @@ -7509,34 +7509,34 @@ public static void runByteM31() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 31 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 31"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 31"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 31"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 31"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 // positive byte_offset 31 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 31"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 31"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 31"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 31"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 // positive byte_offset 31 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 31"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 31"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 31"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 31"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP31(byte[] data) { for (int j = 0; j < RANGE - 31; j++) { @@ -7556,31 +7556,31 @@ public static void runByteP31() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM32(byte[] data) { for (int j = 32; j < RANGE; j++) { @@ -7600,32 +7600,32 @@ public static void runByteM32() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 // positive byte_offset 32 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 32"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 32"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 32"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 32"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP32(byte[] data) { for (int j = 0; j < RANGE - 32; j++) { @@ -7645,31 +7645,31 @@ public static void runByteP32() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM63(byte[] data) { for (int j = 63; j < RANGE; j++) { @@ -7689,32 +7689,32 @@ public static void runByteM63() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 // positive byte_offset 63 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 4", "SuperWordMaxVectorSize", "<= 63"}, + applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 63"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 4", "SuperWordMaxVectorSize", "> 63"}, + applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 63"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP63(byte[] data) { for (int j = 0; j < RANGE - 63; j++) { @@ -7734,31 +7734,31 @@ public static void runByteP63() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM64(byte[] data) { for (int j = 64; j < RANGE; j++) { @@ -7778,31 +7778,31 @@ public static void runByteM64() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP64(byte[] data) { for (int j = 0; j < RANGE - 64; j++) { @@ -7822,31 +7822,31 @@ public static void runByteP64() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM65(byte[] data) { for (int j = 65; j < RANGE; j++) { @@ -7866,31 +7866,31 @@ public static void runByteM65() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP65(byte[] data) { for (int j = 0; j < RANGE - 65; j++) { @@ -7910,31 +7910,31 @@ public static void runByteP65() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM128(byte[] data) { for (int j = 128; j < RANGE; j++) { @@ -7954,31 +7954,31 @@ public static void runByteM128() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP128(byte[] data) { for (int j = 0; j < RANGE - 128; j++) { @@ -7998,31 +7998,31 @@ public static void runByteP128() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM129(byte[] data) { for (int j = 129; j < RANGE; j++) { @@ -8042,31 +8042,31 @@ public static void runByteM129() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP129(byte[] data) { for (int j = 0; j < RANGE - 129; j++) { @@ -8086,31 +8086,31 @@ public static void runByteP129() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM192(byte[] data) { for (int j = 192; j < RANGE; j++) { @@ -8130,31 +8130,31 @@ public static void runByteM192() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"avx512bw", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 4"}, + applyIf = {"MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 4"}, + applyIf = {"MaxVectorSize", "< 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP192(byte[] data) { for (int j = 0; j < RANGE - 192; j++) { @@ -8174,31 +8174,31 @@ public static void runByteP192() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP0(float[] data) { for (int j = 0; j < RANGE; j++) { @@ -8218,31 +8218,31 @@ public static void runFloatP0() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM1(float[] data) { for (int j = 1; j < RANGE; j++) { @@ -8263,34 +8263,34 @@ public static void runFloatM1() { // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 4"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 4"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 4"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 4"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 4"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 4"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 4"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP1(float[] data) { for (int j = 0; j < RANGE - 1; j++) { @@ -8310,31 +8310,31 @@ public static void runFloatP1() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM2(float[] data) { for (int j = 2; j < RANGE; j++) { @@ -8355,34 +8355,34 @@ public static void runFloatM2() { // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP2(float[] data) { for (int j = 0; j < RANGE - 2; j++) { @@ -8402,31 +8402,31 @@ public static void runFloatP2() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM3(float[] data) { for (int j = 3; j < RANGE; j++) { @@ -8447,34 +8447,34 @@ public static void runFloatM3() { // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 // positive byte_offset 12 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 12"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 12"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 12"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 12 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 12"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 12"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 12"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 // positive byte_offset 12 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 12"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 12"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 12"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 12 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 12"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 12"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 12"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP3(float[] data) { for (int j = 0; j < RANGE - 3; j++) { @@ -8494,31 +8494,31 @@ public static void runFloatP3() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM4(float[] data) { for (int j = 4; j < RANGE; j++) { @@ -8538,34 +8538,34 @@ public static void runFloatM4() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP4(float[] data) { for (int j = 0; j < RANGE - 4; j++) { @@ -8585,31 +8585,31 @@ public static void runFloatP4() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM7(float[] data) { for (int j = 7; j < RANGE; j++) { @@ -8629,34 +8629,34 @@ public static void runFloatM7() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 28"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 28"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 28"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 28"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 28"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 28"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 28"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 28"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 28"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP7(float[] data) { for (int j = 0; j < RANGE - 7; j++) { @@ -8676,31 +8676,31 @@ public static void runFloatP7() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM8(float[] data) { for (int j = 8; j < RANGE; j++) { @@ -8720,32 +8720,32 @@ public static void runFloatM8() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 // positive byte_offset 32 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 32"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 32"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 32"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 32"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP8(float[] data) { for (int j = 0; j < RANGE - 8; j++) { @@ -8765,31 +8765,31 @@ public static void runFloatP8() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM15(float[] data) { for (int j = 15; j < RANGE; j++) { @@ -8809,32 +8809,32 @@ public static void runFloatM15() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 // positive byte_offset 60 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 8", "SuperWordMaxVectorSize", "<= 60"}, + applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 60"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 8", "SuperWordMaxVectorSize", "> 60"}, + applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 60"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP15(float[] data) { for (int j = 0; j < RANGE - 15; j++) { @@ -8854,31 +8854,31 @@ public static void runFloatP15() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM16(float[] data) { for (int j = 16; j < RANGE; j++) { @@ -8898,31 +8898,31 @@ public static void runFloatM16() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP16(float[] data) { for (int j = 0; j < RANGE - 16; j++) { @@ -8942,31 +8942,31 @@ public static void runFloatP16() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM31(float[] data) { for (int j = 31; j < RANGE; j++) { @@ -8986,31 +8986,31 @@ public static void runFloatM31() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP31(float[] data) { for (int j = 0; j < RANGE - 31; j++) { @@ -9030,31 +9030,31 @@ public static void runFloatP31() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM32(float[] data) { for (int j = 32; j < RANGE; j++) { @@ -9074,31 +9074,31 @@ public static void runFloatM32() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP32(float[] data) { for (int j = 0; j < RANGE - 32; j++) { @@ -9118,31 +9118,31 @@ public static void runFloatP32() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM63(float[] data) { for (int j = 63; j < RANGE; j++) { @@ -9162,31 +9162,31 @@ public static void runFloatM63() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP63(float[] data) { for (int j = 0; j < RANGE - 63; j++) { @@ -9206,31 +9206,31 @@ public static void runFloatP63() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM64(float[] data) { for (int j = 64; j < RANGE; j++) { @@ -9250,31 +9250,31 @@ public static void runFloatM64() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP64(float[] data) { for (int j = 0; j < RANGE - 64; j++) { @@ -9294,31 +9294,31 @@ public static void runFloatP64() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM65(float[] data) { for (int j = 65; j < RANGE; j++) { @@ -9338,31 +9338,31 @@ public static void runFloatM65() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP65(float[] data) { for (int j = 0; j < RANGE - 65; j++) { @@ -9382,31 +9382,31 @@ public static void runFloatP65() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM128(float[] data) { for (int j = 128; j < RANGE; j++) { @@ -9426,31 +9426,31 @@ public static void runFloatM128() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP128(float[] data) { for (int j = 0; j < RANGE - 128; j++) { @@ -9470,31 +9470,31 @@ public static void runFloatP128() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM129(float[] data) { for (int j = 129; j < RANGE; j++) { @@ -9514,31 +9514,31 @@ public static void runFloatM129() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP129(float[] data) { for (int j = 0; j < RANGE - 129; j++) { @@ -9558,31 +9558,31 @@ public static void runFloatP129() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM192(float[] data) { for (int j = 192; j < RANGE; j++) { @@ -9602,31 +9602,31 @@ public static void runFloatM192() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 8"}, + applyIf = {"MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 8"}, + applyIf = {"MaxVectorSize", "< 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP192(float[] data) { for (int j = 0; j < RANGE - 192; j++) { @@ -9646,31 +9646,31 @@ public static void runFloatP192() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP0(double[] data) { for (int j = 0; j < RANGE; j++) { @@ -9690,31 +9690,31 @@ public static void runDoubleP0() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM1(double[] data) { for (int j = 1; j < RANGE; j++) { @@ -9735,34 +9735,34 @@ public static void runDoubleM1() { // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 8"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 8"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP1(double[] data) { for (int j = 0; j < RANGE - 1; j++) { @@ -9782,31 +9782,31 @@ public static void runDoubleP1() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM2(double[] data) { for (int j = 2; j < RANGE; j++) { @@ -9826,34 +9826,34 @@ public static void runDoubleM2() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 16"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 16"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP2(double[] data) { for (int j = 0; j < RANGE - 2; j++) { @@ -9873,31 +9873,31 @@ public static void runDoubleP2() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM3(double[] data) { for (int j = 3; j < RANGE; j++) { @@ -9917,34 +9917,34 @@ public static void runDoubleM3() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 24 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 24"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 24"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 24"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 // positive byte_offset 24 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 24"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 24"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 24"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 24 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 24"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 24"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 24"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP3(double[] data) { for (int j = 0; j < RANGE - 3; j++) { @@ -9964,31 +9964,31 @@ public static void runDoubleP3() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM4(double[] data) { for (int j = 4; j < RANGE; j++) { @@ -10008,32 +10008,32 @@ public static void runDoubleM4() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 // positive byte_offset 32 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 32"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 32"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 32"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 32"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP4(double[] data) { for (int j = 0; j < RANGE - 4; j++) { @@ -10053,31 +10053,31 @@ public static void runDoubleP4() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM7(double[] data) { for (int j = 7; j < RANGE; j++) { @@ -10097,32 +10097,32 @@ public static void runDoubleM7() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 // positive byte_offset 56 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"SuperWordMaxVectorSize", ">= 16", "SuperWordMaxVectorSize", "<= 56"}, + applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 56"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"SuperWordMaxVectorSize", "< 16", "SuperWordMaxVectorSize", "> 56"}, + applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 56"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP7(double[] data) { for (int j = 0; j < RANGE - 7; j++) { @@ -10142,31 +10142,31 @@ public static void runDoubleP7() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM8(double[] data) { for (int j = 8; j < RANGE; j++) { @@ -10186,31 +10186,31 @@ public static void runDoubleM8() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP8(double[] data) { for (int j = 0; j < RANGE - 8; j++) { @@ -10230,31 +10230,31 @@ public static void runDoubleP8() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM15(double[] data) { for (int j = 15; j < RANGE; j++) { @@ -10274,31 +10274,31 @@ public static void runDoubleM15() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP15(double[] data) { for (int j = 0; j < RANGE - 15; j++) { @@ -10318,31 +10318,31 @@ public static void runDoubleP15() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM16(double[] data) { for (int j = 16; j < RANGE; j++) { @@ -10362,31 +10362,31 @@ public static void runDoubleM16() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP16(double[] data) { for (int j = 0; j < RANGE - 16; j++) { @@ -10406,31 +10406,31 @@ public static void runDoubleP16() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM31(double[] data) { for (int j = 31; j < RANGE; j++) { @@ -10450,31 +10450,31 @@ public static void runDoubleM31() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP31(double[] data) { for (int j = 0; j < RANGE - 31; j++) { @@ -10494,31 +10494,31 @@ public static void runDoubleP31() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM32(double[] data) { for (int j = 32; j < RANGE; j++) { @@ -10538,31 +10538,31 @@ public static void runDoubleM32() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP32(double[] data) { for (int j = 0; j < RANGE - 32; j++) { @@ -10582,31 +10582,31 @@ public static void runDoubleP32() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM63(double[] data) { for (int j = 63; j < RANGE; j++) { @@ -10626,31 +10626,31 @@ public static void runDoubleM63() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP63(double[] data) { for (int j = 0; j < RANGE - 63; j++) { @@ -10670,31 +10670,31 @@ public static void runDoubleP63() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM64(double[] data) { for (int j = 64; j < RANGE; j++) { @@ -10714,31 +10714,31 @@ public static void runDoubleM64() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP64(double[] data) { for (int j = 0; j < RANGE - 64; j++) { @@ -10758,31 +10758,31 @@ public static void runDoubleP64() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM65(double[] data) { for (int j = 65; j < RANGE; j++) { @@ -10802,31 +10802,31 @@ public static void runDoubleM65() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP65(double[] data) { for (int j = 0; j < RANGE - 65; j++) { @@ -10846,31 +10846,31 @@ public static void runDoubleP65() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM128(double[] data) { for (int j = 128; j < RANGE; j++) { @@ -10890,31 +10890,31 @@ public static void runDoubleM128() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP128(double[] data) { for (int j = 0; j < RANGE - 128; j++) { @@ -10934,31 +10934,31 @@ public static void runDoubleP128() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM129(double[] data) { for (int j = 129; j < RANGE; j++) { @@ -10978,31 +10978,31 @@ public static void runDoubleM129() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP129(double[] data) { for (int j = 0; j < RANGE - 129; j++) { @@ -11022,31 +11022,31 @@ public static void runDoubleP129() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM192(double[] data) { for (int j = 192; j < RANGE; j++) { @@ -11066,31 +11066,31 @@ public static void runDoubleM192() { @Test // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"SuperWordMaxVectorSize", ">= 16"}, + applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"SuperWordMaxVectorSize", "< 16"}, + applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP192(double[] data) { for (int j = 0; j < RANGE - 192; j++) { From 7462cd1f1325d9e82c34dc7f0fa023eb35e368de Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Tue, 28 Feb 2023 18:38:56 +0100 Subject: [PATCH 24/34] Fix TestCyclicDependency.java for aarch64 machines with AlignVector == true --- .../loopopts/superword/TestCyclicDependency.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java b/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java index 6e302f4db0a61..569e85301f1b2 100644 --- a/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java +++ b/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java @@ -342,6 +342,11 @@ static void test6b(int[] dataI, float[] dataF) { @Test @IR(counts = {IRNode.ADD_VI, "> 0", IRNode.ADD_VF, "= 0"}, + applyIf = {"AlignVector", "false"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) + // Some aarch64 machines have AlignVector == true, like ThunderX2 + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test7(int[] dataI, float[] dataF) { for (int i = 0; i < RANGE - 32; i++) { @@ -357,6 +362,11 @@ static void test7(int[] dataI, float[] dataF) { @Test @IR(counts = {IRNode.ADD_VI, "= 0", IRNode.ADD_VF, "> 0"}, + applyIf = {"AlignVector", "false"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) + // Some aarch64 machines have AlignVector == true, like ThunderX2 + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test8(int[] dataI, float[] dataF) { for (int i = 0; i < RANGE - 32; i++) { From 8349906d63a5746383752091904bd1b1e75c83ae Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Tue, 28 Feb 2023 19:34:02 +0100 Subject: [PATCH 25/34] Fix TestOptionVectorizeIR.java for aarch64 machines with AlignVector == true --- .../vectorization/TestOptionVectorizeIR.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java index 5c4a8fe49b463..ba3c3201c09ef 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java @@ -223,6 +223,7 @@ static void test1(int[] data) { @Test @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_VI, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"AlignVector", "false"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test2(int[] data) { for (int j = 0; j < RANGE - 1; j++) { @@ -233,6 +234,7 @@ static void test2(int[] data) { @Test @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.REPLICATE_I, "> 0", IRNode.ADD_VI, "> 0", IRNode.MUL_VI, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"AlignVector", "false"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test3(int[] data, int A, int B) { for (int j = 0; j < RANGE - 1; j++) { @@ -277,6 +279,7 @@ static void test6(int[] data) { @Test @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"AlignVector", "false"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test10(long[] data) { for (int j = 2; j < RANGE - 2; j++) { @@ -286,6 +289,7 @@ static void test10(long[] data) { @Test @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"AlignVector", "false"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test11(long[] data) { for (int j = 2; j < RANGE - 2; j++) { @@ -352,6 +356,7 @@ public void runTest13() { @Test @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"AlignVector", "false"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test20(short[] data) { for (int j = 2; j < RANGE - 2; j++) { @@ -361,6 +366,7 @@ static void test20(short[] data) { @Test @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"AlignVector", "false"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test21(short[] data) { for (int j = 2; j < RANGE - 2; j++) { @@ -425,6 +431,7 @@ public void runTest23() { @Test @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"AlignVector", "false"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test30(byte[] data) { for (int j = 2; j < RANGE - 2; j++) { @@ -434,6 +441,7 @@ static void test30(byte[] data) { @Test @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"AlignVector", "false"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test31(byte[] data) { for (int j = 2; j < RANGE - 2; j++) { @@ -498,6 +506,7 @@ public void runTest33() { @Test @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"AlignVector", "false"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test40(char[] data) { for (int j = 2; j < RANGE - 2; j++) { @@ -507,6 +516,7 @@ static void test40(char[] data) { @Test @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"AlignVector", "false"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test41(char[] data) { for (int j = 2; j < RANGE - 2; j++) { @@ -570,6 +580,7 @@ public void runTest43() { @Test @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"AlignVector", "false"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test50(float[] data) { for (int j = 2; j < RANGE - 2; j++) { @@ -579,6 +590,7 @@ static void test50(float[] data) { @Test @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"AlignVector", "false"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test51(float[] data) { for (int j = 2; j < RANGE - 2; j++) { @@ -642,6 +654,7 @@ public void runTest53() { @Test @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"AlignVector", "false"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test60(double[] data) { for (int j = 2; j < RANGE - 2; j++) { @@ -651,6 +664,7 @@ static void test60(double[] data) { @Test @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIf = {"AlignVector", "false"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test61(double[] data) { for (int j = 2; j < RANGE - 2; j++) { From 0cb67e5d8a7da15a362c51c0ae4bdabf7a4c8be5 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Wed, 1 Mar 2023 13:01:31 +0100 Subject: [PATCH 26/34] TestDependencyOffsets.java: MulVL not supported on NEON / asimd. Replaced it with AddVL --- .../superword/TestDependencyOffsets.java | 594 +++++++++--------- 1 file changed, 297 insertions(+), 297 deletions(-) diff --git a/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java b/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java index 71135aaa13f42..d9340beae5934 100644 --- a/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java +++ b/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java @@ -2261,36 +2261,36 @@ public static void runIntP192() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP0(long[] data) { for (int j = 0; j < RANGE; j++) { - data[j + 0] = (long)(data[j] * (long)-11); + data[j + 0] = (long)(data[j] + (long)-11); } } @@ -2305,36 +2305,36 @@ public static void runLongP0() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM1(long[] data) { for (int j = 1; j < RANGE; j++) { - data[j + -1] = (long)(data[j] * (long)-11); + data[j + -1] = (long)(data[j] + (long)-11); } } @@ -2350,39 +2350,39 @@ public static void runLongM1() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 // positive byte_offset 8 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 8 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 // positive byte_offset 8 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 8 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP1(long[] data) { for (int j = 0; j < RANGE - 1; j++) { - data[j + 1] = (long)(data[j] * (long)-11); + data[j + 1] = (long)(data[j] + (long)-11); } } @@ -2397,36 +2397,36 @@ public static void runLongP1() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM2(long[] data) { for (int j = 2; j < RANGE; j++) { - data[j + -2] = (long)(data[j] * (long)-11); + data[j + -2] = (long)(data[j] + (long)-11); } } @@ -2441,39 +2441,39 @@ public static void runLongM2() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 16 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 // positive byte_offset 16 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 16 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP2(long[] data) { for (int j = 0; j < RANGE - 2; j++) { - data[j + 2] = (long)(data[j] * (long)-11); + data[j + 2] = (long)(data[j] + (long)-11); } } @@ -2488,36 +2488,36 @@ public static void runLongP2() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM3(long[] data) { for (int j = 3; j < RANGE; j++) { - data[j + -3] = (long)(data[j] * (long)-11); + data[j + -3] = (long)(data[j] + (long)-11); } } @@ -2532,39 +2532,39 @@ public static void runLongM3() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 24 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 24"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 // positive byte_offset 24 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 24"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 // positive byte_offset 24 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 24"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP3(long[] data) { for (int j = 0; j < RANGE - 3; j++) { - data[j + 3] = (long)(data[j] * (long)-11); + data[j + 3] = (long)(data[j] + (long)-11); } } @@ -2579,36 +2579,36 @@ public static void runLongP3() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM4(long[] data) { for (int j = 4; j < RANGE; j++) { - data[j + -4] = (long)(data[j] * (long)-11); + data[j + -4] = (long)(data[j] + (long)-11); } } @@ -2623,37 +2623,37 @@ public static void runLongM4() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 // positive byte_offset 32 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 32"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 32"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP4(long[] data) { for (int j = 0; j < RANGE - 4; j++) { - data[j + 4] = (long)(data[j] * (long)-11); + data[j + 4] = (long)(data[j] + (long)-11); } } @@ -2668,36 +2668,36 @@ public static void runLongP4() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM7(long[] data) { for (int j = 7; j < RANGE; j++) { - data[j + -7] = (long)(data[j] * (long)-11); + data[j + -7] = (long)(data[j] + (long)-11); } } @@ -2712,37 +2712,37 @@ public static void runLongM7() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 // positive byte_offset 56 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 56"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 56"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP7(long[] data) { for (int j = 0; j < RANGE - 7; j++) { - data[j + 7] = (long)(data[j] * (long)-11); + data[j + 7] = (long)(data[j] + (long)-11); } } @@ -2757,36 +2757,36 @@ public static void runLongP7() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM8(long[] data) { for (int j = 8; j < RANGE; j++) { - data[j + -8] = (long)(data[j] * (long)-11); + data[j + -8] = (long)(data[j] + (long)-11); } } @@ -2801,36 +2801,36 @@ public static void runLongM8() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP8(long[] data) { for (int j = 0; j < RANGE - 8; j++) { - data[j + 8] = (long)(data[j] * (long)-11); + data[j + 8] = (long)(data[j] + (long)-11); } } @@ -2845,36 +2845,36 @@ public static void runLongP8() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM15(long[] data) { for (int j = 15; j < RANGE; j++) { - data[j + -15] = (long)(data[j] * (long)-11); + data[j + -15] = (long)(data[j] + (long)-11); } } @@ -2889,36 +2889,36 @@ public static void runLongM15() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP15(long[] data) { for (int j = 0; j < RANGE - 15; j++) { - data[j + 15] = (long)(data[j] * (long)-11); + data[j + 15] = (long)(data[j] + (long)-11); } } @@ -2933,36 +2933,36 @@ public static void runLongP15() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM16(long[] data) { for (int j = 16; j < RANGE; j++) { - data[j + -16] = (long)(data[j] * (long)-11); + data[j + -16] = (long)(data[j] + (long)-11); } } @@ -2977,36 +2977,36 @@ public static void runLongM16() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP16(long[] data) { for (int j = 0; j < RANGE - 16; j++) { - data[j + 16] = (long)(data[j] * (long)-11); + data[j + 16] = (long)(data[j] + (long)-11); } } @@ -3021,36 +3021,36 @@ public static void runLongP16() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM31(long[] data) { for (int j = 31; j < RANGE; j++) { - data[j + -31] = (long)(data[j] * (long)-11); + data[j + -31] = (long)(data[j] + (long)-11); } } @@ -3065,36 +3065,36 @@ public static void runLongM31() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP31(long[] data) { for (int j = 0; j < RANGE - 31; j++) { - data[j + 31] = (long)(data[j] * (long)-11); + data[j + 31] = (long)(data[j] + (long)-11); } } @@ -3109,36 +3109,36 @@ public static void runLongP31() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM32(long[] data) { for (int j = 32; j < RANGE; j++) { - data[j + -32] = (long)(data[j] * (long)-11); + data[j + -32] = (long)(data[j] + (long)-11); } } @@ -3153,36 +3153,36 @@ public static void runLongM32() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP32(long[] data) { for (int j = 0; j < RANGE - 32; j++) { - data[j + 32] = (long)(data[j] * (long)-11); + data[j + 32] = (long)(data[j] + (long)-11); } } @@ -3197,36 +3197,36 @@ public static void runLongP32() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM63(long[] data) { for (int j = 63; j < RANGE; j++) { - data[j + -63] = (long)(data[j] * (long)-11); + data[j + -63] = (long)(data[j] + (long)-11); } } @@ -3241,36 +3241,36 @@ public static void runLongM63() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP63(long[] data) { for (int j = 0; j < RANGE - 63; j++) { - data[j + 63] = (long)(data[j] * (long)-11); + data[j + 63] = (long)(data[j] + (long)-11); } } @@ -3285,36 +3285,36 @@ public static void runLongP63() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM64(long[] data) { for (int j = 64; j < RANGE; j++) { - data[j + -64] = (long)(data[j] * (long)-11); + data[j + -64] = (long)(data[j] + (long)-11); } } @@ -3329,36 +3329,36 @@ public static void runLongM64() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP64(long[] data) { for (int j = 0; j < RANGE - 64; j++) { - data[j + 64] = (long)(data[j] * (long)-11); + data[j + 64] = (long)(data[j] + (long)-11); } } @@ -3373,36 +3373,36 @@ public static void runLongP64() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM65(long[] data) { for (int j = 65; j < RANGE; j++) { - data[j + -65] = (long)(data[j] * (long)-11); + data[j + -65] = (long)(data[j] + (long)-11); } } @@ -3417,36 +3417,36 @@ public static void runLongM65() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP65(long[] data) { for (int j = 0; j < RANGE - 65; j++) { - data[j + 65] = (long)(data[j] * (long)-11); + data[j + 65] = (long)(data[j] + (long)-11); } } @@ -3461,36 +3461,36 @@ public static void runLongP65() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM128(long[] data) { for (int j = 128; j < RANGE; j++) { - data[j + -128] = (long)(data[j] * (long)-11); + data[j + -128] = (long)(data[j] + (long)-11); } } @@ -3505,36 +3505,36 @@ public static void runLongM128() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP128(long[] data) { for (int j = 0; j < RANGE - 128; j++) { - data[j + 128] = (long)(data[j] * (long)-11); + data[j + 128] = (long)(data[j] + (long)-11); } } @@ -3549,36 +3549,36 @@ public static void runLongP128() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM129(long[] data) { for (int j = 129; j < RANGE; j++) { - data[j + -129] = (long)(data[j] * (long)-11); + data[j + -129] = (long)(data[j] + (long)-11); } } @@ -3593,36 +3593,36 @@ public static void runLongM129() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP129(long[] data) { for (int j = 0; j < RANGE - 129; j++) { - data[j + 129] = (long)(data[j] * (long)-11); + data[j + 129] = (long)(data[j] + (long)-11); } } @@ -3637,36 +3637,36 @@ public static void runLongP129() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM192(long[] data) { for (int j = 192; j < RANGE; j++) { - data[j + -192] = (long)(data[j] * (long)-11); + data[j + -192] = (long)(data[j] + (long)-11); } } @@ -3681,36 +3681,36 @@ public static void runLongM192() { @Test // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"avx512", "true"}) // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIf = {"MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, applyIf = {"MaxVectorSize", "< 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP192(long[] data) { for (int j = 0; j < RANGE - 192; j++) { - data[j + 192] = (long)(data[j] * (long)-11); + data[j + 192] = (long)(data[j] + (long)-11); } } From 366bc31b58aa298a1c8aaf68a89791c106cf1a70 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Thu, 2 Mar 2023 08:40:19 +0100 Subject: [PATCH 27/34] removed negative rules for TestCyclicDependency.java --- .../superword/TestCyclicDependency.java | 30 ++++--------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java b/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java index 569e85301f1b2..803c7e9841d9d 100644 --- a/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java +++ b/test/hotspot/jtreg/compiler/loopopts/superword/TestCyclicDependency.java @@ -251,10 +251,9 @@ static void test0(int[] dataI, float[] dataF) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test1(int[] dataI, float[] dataF) { for (int i = 0; i < RANGE - 1; i++) { - // dataI has cyclic dependency of distance 1, cannot vectorize + // dataI has cyclic dependency of distance 1 int v = dataI[i]; dataI[i + 1] = v; dataF[i] = v; // let's not get confused by another type @@ -262,10 +261,9 @@ static void test1(int[] dataI, float[] dataF) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test2(int[] dataI, float[] dataF) { for (int i = 0; i < RANGE - 2; i++) { - // dataI has cyclic dependency of distance 2, cannot vectorize + // dataI has cyclic dependency of distance 2 int v = dataI[i]; dataI[i + 2] = v; dataF[i] = v; // let's not get confused by another type @@ -273,10 +271,9 @@ static void test2(int[] dataI, float[] dataF) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test3(int[] dataI, float[] dataF) { for (int i = 0; i < RANGE - 3; i++) { - // dataI has cyclic dependency of distance 3, cannot vectorize + // dataI has cyclic dependency of distance 3 int v = dataI[i]; dataI[i + 3] = v; dataF[i] = v; // let's not get confused by another type @@ -284,10 +281,9 @@ static void test3(int[] dataI, float[] dataF) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test4(int[] dataI, float[] dataF) { for (int i = 1; i < RANGE - 1; i++) { - // dataI has cyclic dependency of distance 2, cannot vectorize + // dataI has cyclic dependency of distance 2 int v = dataI[i - 1]; dataI[i + 1] = v; dataF[i] = v; // let's not get confused by another type @@ -295,22 +291,18 @@ static void test4(int[] dataI, float[] dataF) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test5a(int[] dataI, float[] dataF) { for (int i = 2; i < RANGE; i++) { // dataI has read / write distance 1, but no cyclic dependency - // test5a and test5b should either both vectorize, or both not int v = dataI[i]; dataI[i - 1] = v + 5; } } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test5b(int[] dataI, float[] dataF) { for (int i = 1; i < RANGE; i++) { // dataI has read / write distance 1, but no cyclic dependency - // test5a and test5b should either both vectorize, or both not int v = dataI[i]; dataI[i - 1] = v; dataF[i] = v; // let's not get confused by another type @@ -318,22 +310,18 @@ static void test5b(int[] dataI, float[] dataF) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test6a(int[] dataI, float[] dataF) { for (int i = 2; i < RANGE; i++) { // dataI has read / write distance 2, but no cyclic dependency - // test6a and test6b should either both vectorize, or both not int v = dataI[i]; dataI[i - 2] = v + 5; } } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test6b(int[] dataI, float[] dataF) { for (int i = 2; i < RANGE; i++) { // dataI has read / write distance 2, but no cyclic dependency - // test6a and test6b should either both vectorize, or both not int v = dataI[i]; dataI[i - 2] = v; dataF[i] = v; // let's not get confused by another type @@ -341,13 +329,10 @@ static void test6b(int[] dataI, float[] dataF) { } @Test - @IR(counts = {IRNode.ADD_VI, "> 0", IRNode.ADD_VF, "= 0"}, + @IR(counts = {IRNode.ADD_VI, "> 0"}, applyIf = {"AlignVector", "false"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) // Some aarch64 machines have AlignVector == true, like ThunderX2 - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test7(int[] dataI, float[] dataF) { for (int i = 0; i < RANGE - 32; i++) { // write forward 32 -> more than vector size -> can vectorize @@ -361,13 +346,10 @@ static void test7(int[] dataI, float[] dataF) { } @Test - @IR(counts = {IRNode.ADD_VI, "= 0", IRNode.ADD_VF, "> 0"}, + @IR(counts = {IRNode.ADD_VF, "> 0"}, applyIf = {"AlignVector", "false"}, applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) // Some aarch64 machines have AlignVector == true, like ThunderX2 - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"}) static void test8(int[] dataI, float[] dataF) { for (int i = 0; i < RANGE - 32; i++) { // write forward 32 -> more than vector size -> can vectorize From 9b8738ae3ee5167a1a846e13ec211611d4c353cb Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Thu, 2 Mar 2023 08:50:20 +0100 Subject: [PATCH 28/34] remove negative IR rules for TestOptionVectorizeIR.java --- .../vectorization/TestOptionVectorizeIR.java | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java index ba3c3201c09ef..d7f7716ed0068 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java @@ -244,7 +244,6 @@ static void test3(int[] data, int A, int B) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test4(int[] data) { for (int j = 0; j < RANGE - 1; j++) { // write forward -> cyclic dependency -> cannot vectorize @@ -254,7 +253,6 @@ static void test4(int[] data) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test5(int[] data) { for (int j = 0; j < RANGE - 3; j++) { // write forward -> cyclic dependency -> cannot vectorize @@ -265,7 +263,6 @@ static void test5(int[] data) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test6(int[] data) { for (int j = 0; j < RANGE - 3; j++) { // write forward -> cyclic dependency -> cannot vectorize @@ -298,7 +295,6 @@ static void test11(long[] data) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test12(long[] data) { for (int j = 2; j < RANGE - 2; j++) { data[j] += data[j - 1]; @@ -306,8 +302,6 @@ static void test12(long[] data) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}, - applyIfCPUFeatureOr = {"avx2", "true", "sve", "true"}) static void test13(long[] data) { // 128-bit vectors -> can vectorize because only 2 elements for (int j = 2; j < RANGE - 2; j++) { @@ -375,7 +369,6 @@ static void test21(short[] data) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test22(short[] data) { for (int j = 2; j < RANGE - 2; j++) { data[j] += data[j - 1]; @@ -383,7 +376,6 @@ static void test22(short[] data) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test23(short[] data) { for (int j = 2; j < RANGE - 2; j++) { data[j] += data[j - 2]; @@ -450,7 +442,6 @@ static void test31(byte[] data) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test32(byte[] data) { for (int j = 2; j < RANGE - 2; j++) { data[j] += data[j - 1]; @@ -458,7 +449,6 @@ static void test32(byte[] data) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test33(byte[] data) { for (int j = 2; j < RANGE - 2; j++) { data[j] += data[j - 2]; @@ -525,7 +515,6 @@ static void test41(char[] data) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test42(char[] data) { for (int j = 2; j < RANGE - 2; j++) { data[j] += data[j - 1]; @@ -533,7 +522,6 @@ static void test42(char[] data) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test43(char[] data) { for (int j = 2; j < RANGE - 2; j++) { data[j] += data[j - 2]; @@ -599,7 +587,6 @@ static void test51(float[] data) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test52(float[] data) { for (int j = 2; j < RANGE - 2; j++) { data[j] += data[j - 1]; @@ -607,7 +594,6 @@ static void test52(float[] data) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test53(float[] data) { for (int j = 2; j < RANGE - 2; j++) { data[j] += data[j - 2]; @@ -673,7 +659,6 @@ static void test61(double[] data) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}) static void test62(double[] data) { for (int j = 2; j < RANGE - 2; j++) { data[j] += data[j - 1]; @@ -681,8 +666,6 @@ static void test62(double[] data) { } @Test - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.STORE_VECTOR}, - applyIfCPUFeatureOr = {"avx2", "true", "sve", "true"}) static void test63(double[] data) { // 128-bit vectors -> can vectorize because only 2 elements for (int j = 2; j < RANGE - 2; j++) { From 645ed50283751802bd2fb660e81dc5d30d1e0876 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Thu, 2 Mar 2023 16:51:19 +0100 Subject: [PATCH 29/34] Reworked TestDependencyOffsets.java --- .../superword/TestDependencyOffsets.java | 8440 ++++++++--------- 1 file changed, 4115 insertions(+), 4325 deletions(-) diff --git a/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java b/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java index d9340beae5934..0e05e12840c9e 100644 --- a/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java +++ b/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java @@ -29,7 +29,7 @@ * Note: CompileCommand Option Vectorize is enabled. * @requires vm.compiler2.enabled * @library /test/lib / - * @run driver compiler.loopopts.superword.TestDependencyOffsets + * @run driver/timeout=400 compiler.loopopts.superword.TestDependencyOffsets */ package compiler.loopopts.superword; @@ -40,15 +40,17 @@ * https://bugs.openjdk.org/browse/JDK-8298935 * * Types: int, long, short, char, byte, float, double - * Offsets: 0, -1, 1, -2, 2, -3, 3, -4, 4, -7, 7, -8, 8, -15, 15, -16, 16, -31, 31, -32, 32, -63, 63, -64, 64, -65, 65, -128, 128, -129, 129, -192, 192 + * Offsets: 0, -1, 1, -2, 2, -3, 3, -4, 4, -7, 7, -8, 8, -15, 15, -16, 16, -18, 18, -20, 20, -31, 31, -32, 32, -63, 63, -64, 64, -65, 65, -128, 128, -129, 129, -192, 192 * * Checking if we should vectorize is a bit complicated. It depends on * Matcher::vector_width_in_bytes, of the respective platforms (eg. x86.ad) * This vector_width can be further constrained by MaxVectorSize. * - * Generally, we vectorize if: + * With '-XX:-AlignVector', we vectorize if: * - Vectors have at least 4 bytes: vector_width >= 4 * - Vectors hold at least 2 elements: vector_width >= 2 * sizeofop(velt_type) + * -> min_vector_width = max(4, 2 * sizeofop(velt_type)) + * -> simplifies to: vector_width >= min_vector_width * - No cyclic dependency: * - Access: data[i + offset] = data[i] * fac; * - byte_offset = offset * sizeofop(type) @@ -59,7 +61,42 @@ * Different types can lead to different vector_width. This depends on * the CPU-features. Thus, we have a positive and negative IR rule per * CPU-feature for each test. -*/ + * + * Definition: + * MaxVectorSize: limit through flag + * vector_width: limit given by specific CPU feature for a specific velt_type + * actual_vector_width: what is actually vectorized with + * min_vector_width: what is minimally required for vectorization + * + * min_vector_width = max(4, 2 * sizeofop(velt_type)) + * MaxVectorSize >= vector_width >= actual_vector_width >= min_vector_width + * + * In general, we cannot easily specify negative IR rules, that require no + * vectorization to happen. We may improve the SuperWord algorithm later, + * or some additional optimization collapses some Loads, and suddenly cyclic + * dependency disappears, and we can vectorize. + * + * With '-XX:+AlignVector', we would like to check that we vectorize exactly iff: + * byte_offset % actual_vector_width == 0 + * Because all vector_widths are powers of 2, this is equivalent to: + * pow2_factor(byte_offset) >= actual_vector_width + * where pow2_factor computes the largest power of 2 that is a factor of the number. + * + * Under these assumptions, we know there must be vectorization: + * pow2_factor(byte_offset) >= vector_width + * implies + * pow2_factor(byte_offset) >= actual_vector_width + * MaxVectorSize >= min_vector_size + * else any vectorization is impossible. + * + * And under the following conditions no vectorization is possible: + * byte_offset < 0: No cyclic dependency. + * Cyclic dependency could lead to Load removals, then only the store is vectorized. + * byte_offset % min_vector_width != 0 + * implies + * byte_offset % actual_vector_width != 0 + * + */ public class TestDependencyOffsets { static final int RANGE = 512; @@ -81,6 +118,10 @@ public class TestDependencyOffsets { static int[] goldIntP15 = new int[RANGE]; static int[] goldIntM16 = new int[RANGE]; static int[] goldIntP16 = new int[RANGE]; + static int[] goldIntM18 = new int[RANGE]; + static int[] goldIntP18 = new int[RANGE]; + static int[] goldIntM20 = new int[RANGE]; + static int[] goldIntP20 = new int[RANGE]; static int[] goldIntM31 = new int[RANGE]; static int[] goldIntP31 = new int[RANGE]; static int[] goldIntM32 = new int[RANGE]; @@ -114,6 +155,10 @@ public class TestDependencyOffsets { static long[] goldLongP15 = new long[RANGE]; static long[] goldLongM16 = new long[RANGE]; static long[] goldLongP16 = new long[RANGE]; + static long[] goldLongM18 = new long[RANGE]; + static long[] goldLongP18 = new long[RANGE]; + static long[] goldLongM20 = new long[RANGE]; + static long[] goldLongP20 = new long[RANGE]; static long[] goldLongM31 = new long[RANGE]; static long[] goldLongP31 = new long[RANGE]; static long[] goldLongM32 = new long[RANGE]; @@ -147,6 +192,10 @@ public class TestDependencyOffsets { static short[] goldShortP15 = new short[RANGE]; static short[] goldShortM16 = new short[RANGE]; static short[] goldShortP16 = new short[RANGE]; + static short[] goldShortM18 = new short[RANGE]; + static short[] goldShortP18 = new short[RANGE]; + static short[] goldShortM20 = new short[RANGE]; + static short[] goldShortP20 = new short[RANGE]; static short[] goldShortM31 = new short[RANGE]; static short[] goldShortP31 = new short[RANGE]; static short[] goldShortM32 = new short[RANGE]; @@ -180,6 +229,10 @@ public class TestDependencyOffsets { static char[] goldCharP15 = new char[RANGE]; static char[] goldCharM16 = new char[RANGE]; static char[] goldCharP16 = new char[RANGE]; + static char[] goldCharM18 = new char[RANGE]; + static char[] goldCharP18 = new char[RANGE]; + static char[] goldCharM20 = new char[RANGE]; + static char[] goldCharP20 = new char[RANGE]; static char[] goldCharM31 = new char[RANGE]; static char[] goldCharP31 = new char[RANGE]; static char[] goldCharM32 = new char[RANGE]; @@ -213,6 +266,10 @@ public class TestDependencyOffsets { static byte[] goldByteP15 = new byte[RANGE]; static byte[] goldByteM16 = new byte[RANGE]; static byte[] goldByteP16 = new byte[RANGE]; + static byte[] goldByteM18 = new byte[RANGE]; + static byte[] goldByteP18 = new byte[RANGE]; + static byte[] goldByteM20 = new byte[RANGE]; + static byte[] goldByteP20 = new byte[RANGE]; static byte[] goldByteM31 = new byte[RANGE]; static byte[] goldByteP31 = new byte[RANGE]; static byte[] goldByteM32 = new byte[RANGE]; @@ -246,6 +303,10 @@ public class TestDependencyOffsets { static float[] goldFloatP15 = new float[RANGE]; static float[] goldFloatM16 = new float[RANGE]; static float[] goldFloatP16 = new float[RANGE]; + static float[] goldFloatM18 = new float[RANGE]; + static float[] goldFloatP18 = new float[RANGE]; + static float[] goldFloatM20 = new float[RANGE]; + static float[] goldFloatP20 = new float[RANGE]; static float[] goldFloatM31 = new float[RANGE]; static float[] goldFloatP31 = new float[RANGE]; static float[] goldFloatM32 = new float[RANGE]; @@ -279,6 +340,10 @@ public class TestDependencyOffsets { static double[] goldDoubleP15 = new double[RANGE]; static double[] goldDoubleM16 = new double[RANGE]; static double[] goldDoubleP16 = new double[RANGE]; + static double[] goldDoubleM18 = new double[RANGE]; + static double[] goldDoubleP18 = new double[RANGE]; + static double[] goldDoubleM20 = new double[RANGE]; + static double[] goldDoubleP20 = new double[RANGE]; static double[] goldDoubleM31 = new double[RANGE]; static double[] goldDoubleP31 = new double[RANGE]; static double[] goldDoubleM32 = new double[RANGE]; @@ -332,6 +397,14 @@ public class TestDependencyOffsets { testIntM16(goldIntM16); init(goldIntP16); testIntP16(goldIntP16); + init(goldIntM18); + testIntM18(goldIntM18); + init(goldIntP18); + testIntP18(goldIntP18); + init(goldIntM20); + testIntM20(goldIntM20); + init(goldIntP20); + testIntP20(goldIntP20); init(goldIntM31); testIntM31(goldIntM31); init(goldIntP31); @@ -398,6 +471,14 @@ public class TestDependencyOffsets { testLongM16(goldLongM16); init(goldLongP16); testLongP16(goldLongP16); + init(goldLongM18); + testLongM18(goldLongM18); + init(goldLongP18); + testLongP18(goldLongP18); + init(goldLongM20); + testLongM20(goldLongM20); + init(goldLongP20); + testLongP20(goldLongP20); init(goldLongM31); testLongM31(goldLongM31); init(goldLongP31); @@ -464,6 +545,14 @@ public class TestDependencyOffsets { testShortM16(goldShortM16); init(goldShortP16); testShortP16(goldShortP16); + init(goldShortM18); + testShortM18(goldShortM18); + init(goldShortP18); + testShortP18(goldShortP18); + init(goldShortM20); + testShortM20(goldShortM20); + init(goldShortP20); + testShortP20(goldShortP20); init(goldShortM31); testShortM31(goldShortM31); init(goldShortP31); @@ -530,6 +619,14 @@ public class TestDependencyOffsets { testCharM16(goldCharM16); init(goldCharP16); testCharP16(goldCharP16); + init(goldCharM18); + testCharM18(goldCharM18); + init(goldCharP18); + testCharP18(goldCharP18); + init(goldCharM20); + testCharM20(goldCharM20); + init(goldCharP20); + testCharP20(goldCharP20); init(goldCharM31); testCharM31(goldCharM31); init(goldCharP31); @@ -596,6 +693,14 @@ public class TestDependencyOffsets { testByteM16(goldByteM16); init(goldByteP16); testByteP16(goldByteP16); + init(goldByteM18); + testByteM18(goldByteM18); + init(goldByteP18); + testByteP18(goldByteP18); + init(goldByteM20); + testByteM20(goldByteM20); + init(goldByteP20); + testByteP20(goldByteP20); init(goldByteM31); testByteM31(goldByteM31); init(goldByteP31); @@ -662,6 +767,14 @@ public class TestDependencyOffsets { testFloatM16(goldFloatM16); init(goldFloatP16); testFloatP16(goldFloatP16); + init(goldFloatM18); + testFloatM18(goldFloatM18); + init(goldFloatP18); + testFloatP18(goldFloatP18); + init(goldFloatM20); + testFloatM20(goldFloatM20); + init(goldFloatP20); + testFloatP20(goldFloatP20); init(goldFloatM31); testFloatM31(goldFloatM31); init(goldFloatP31); @@ -728,6 +841,14 @@ public class TestDependencyOffsets { testDoubleM16(goldDoubleM16); init(goldDoubleP16); testDoubleP16(goldDoubleP16); + init(goldDoubleM18); + testDoubleM18(goldDoubleM18); + init(goldDoubleP18); + testDoubleP18(goldDoubleP18); + init(goldDoubleM20); + testDoubleM20(goldDoubleM20); + init(goldDoubleP20); + testDoubleP20(goldDoubleP20); init(goldDoubleM31); testDoubleM31(goldDoubleM31); init(goldDoubleP31); @@ -763,7 +884,6 @@ public class TestDependencyOffsets { } public static void main(String args[]) { - TestDependencyOffsets x = new TestDependencyOffsets(); TestFramework framework = new TestFramework(TestDependencyOffsets.class); framework.addFlags("-XX:-TieredCompilation", "-XX:CompileCommand=option,compiler.loopopts.superword.TestDependencyOffsets::test*,Vectorize", @@ -773,9 +893,9 @@ public static void main(String args[]) { "-XX:LoopUnrollLimit=250"); int i = 0; - Scenario[] scenarios = new Scenario[8]; + Scenario[] scenarios = new Scenario[16]; for (int maxVectorSize : new int[] {1, 2, 4, 8, 16, 32, 64, 128}) { - for (String alignVectorSign : new String[] {"-"}) { // TODO + for (String alignVectorSign : new String[] {"+", "-"}) { scenarios[i] = new Scenario(i, "-XX:" + alignVectorSign + "AlignVector", "-XX:MaxVectorSize=" + maxVectorSize); i++; @@ -788,33 +908,21 @@ public static void main(String args[]) { // ------------------- Tests ------------------- @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP0(int[] data) { for (int j = 0; j < RANGE; j++) { @@ -832,33 +940,37 @@ public static void runIntP0() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM1(int[] data) { for (int j = 1; j < RANGE; j++) { @@ -876,38 +988,18 @@ public static void runIntM1() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 - // positive byte_offset 4 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 4 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 - // positive byte_offset 4 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 4"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 4"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 4 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 4"}, - applyIfCPUFeature = {"asimd", "true"}) + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // positive byte_offset 4 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 4 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 4 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 4 can lead to cyclic dependency + // No positive IR rule: conditions impossible. public static void testIntP1(int[] data) { for (int j = 0; j < RANGE - 1; j++) { data[j + 1] = (int)(data[j] * (int)-11); @@ -924,33 +1016,21 @@ public static void runIntP1() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM2(int[] data) { for (int j = 2; j < RANGE; j++) { @@ -968,37 +1048,25 @@ public static void runIntM2() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 8"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP2(int[] data) { for (int j = 0; j < RANGE - 2; j++) { @@ -1016,33 +1084,37 @@ public static void runIntP2() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM3(int[] data) { for (int j = 3; j < RANGE; j++) { @@ -1060,37 +1132,25 @@ public static void runIntM3() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 - // positive byte_offset 12 can lead to cyclic dependency + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // positive byte_offset 12 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 12"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 12 can lead to cyclic dependency + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 12 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 12"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 - // positive byte_offset 12 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 12 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 12"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 12 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 12 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 12"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP3(int[] data) { for (int j = 0; j < RANGE - 3; j++) { @@ -1108,33 +1168,21 @@ public static void runIntP3() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM4(int[] data) { for (int j = 4; j < RANGE; j++) { @@ -1152,36 +1200,28 @@ public static void runIntM4() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 16"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP4(int[] data) { for (int j = 0; j < RANGE - 4; j++) { @@ -1199,33 +1239,37 @@ public static void runIntP4() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM7(int[] data) { for (int j = 7; j < RANGE; j++) { @@ -1243,36 +1287,24 @@ public static void runIntM7() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 28 can lead to cyclic dependency + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 28"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 - // positive byte_offset 28 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 28"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 28 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 28"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP7(int[] data) { for (int j = 0; j < RANGE - 7; j++) { @@ -1290,33 +1322,21 @@ public static void runIntP7() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM8(int[] data) { for (int j = 8; j < RANGE; j++) { @@ -1334,34 +1354,34 @@ public static void runIntM8() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 - // positive byte_offset 32 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 32 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 32"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 32"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 32"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP8(int[] data) { for (int j = 0; j < RANGE - 8; j++) { @@ -1379,33 +1399,37 @@ public static void runIntP8() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM15(int[] data) { for (int j = 15; j < RANGE; j++) { @@ -1423,34 +1447,22 @@ public static void runIntM15() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 - // positive byte_offset 60 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 60 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 60"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 60"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 60"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP15(int[] data) { for (int j = 0; j < RANGE - 15; j++) { @@ -1468,33 +1480,21 @@ public static void runIntP15() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM16(int[] data) { for (int j = 16; j < RANGE; j++) { @@ -1512,33 +1512,37 @@ public static void runIntM16() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP16(int[] data) { for (int j = 0; j < RANGE - 16; j++) { @@ -1556,33 +1560,169 @@ public static void runIntP16() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM18(int[] data) { + for (int j = 18; j < RANGE; j++) { + data[j + -18] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM18") + @Warmup(0) + public static void runIntM18() { + int[] data = new int[RANGE]; + init(data); + testIntM18(data); + verify("testIntM18", data, goldIntM18); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP18(int[] data) { + for (int j = 0; j < RANGE - 18; j++) { + data[j + 18] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP18") + @Warmup(0) + public static void runIntP18() { + int[] data = new int[RANGE]; + init(data); + testIntP18(data); + verify("testIntP18", data, goldIntP18); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntM20(int[] data) { + for (int j = 20; j < RANGE; j++) { + data[j + -20] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntM20") + @Warmup(0) + public static void runIntM20() { + int[] data = new int[RANGE]; + init(data); + testIntM20(data); + verify("testIntM20", data, goldIntM20); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testIntP20(int[] data) { + for (int j = 0; j < RANGE - 20; j++) { + data[j + 20] = (int)(data[j] * (int)-11); + } + } + + @Run(test = "testIntP20") + @Warmup(0) + public static void runIntP20() { + int[] data = new int[RANGE]; + init(data); + testIntP20(data); + verify("testIntP20", data, goldIntP20); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM31(int[] data) { for (int j = 31; j < RANGE; j++) { @@ -1600,33 +1740,21 @@ public static void runIntM31() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP31(int[] data) { for (int j = 0; j < RANGE - 31; j++) { @@ -1644,33 +1772,21 @@ public static void runIntP31() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM32(int[] data) { for (int j = 32; j < RANGE; j++) { @@ -1688,33 +1804,37 @@ public static void runIntM32() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP32(int[] data) { for (int j = 0; j < RANGE - 32; j++) { @@ -1732,33 +1852,37 @@ public static void runIntP32() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM63(int[] data) { for (int j = 63; j < RANGE; j++) { @@ -1776,33 +1900,21 @@ public static void runIntM63() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP63(int[] data) { for (int j = 0; j < RANGE - 63; j++) { @@ -1820,33 +1932,21 @@ public static void runIntP63() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM64(int[] data) { for (int j = 64; j < RANGE; j++) { @@ -1864,33 +1964,37 @@ public static void runIntM64() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP64(int[] data) { for (int j = 0; j < RANGE - 64; j++) { @@ -1908,33 +2012,37 @@ public static void runIntP64() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM65(int[] data) { for (int j = 65; j < RANGE; j++) { @@ -1952,33 +2060,21 @@ public static void runIntM65() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP65(int[] data) { for (int j = 0; j < RANGE - 65; j++) { @@ -1996,33 +2092,21 @@ public static void runIntP65() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM128(int[] data) { for (int j = 128; j < RANGE; j++) { @@ -2040,33 +2124,37 @@ public static void runIntM128() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP128(int[] data) { for (int j = 0; j < RANGE - 128; j++) { @@ -2084,33 +2172,37 @@ public static void runIntP128() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM129(int[] data) { for (int j = 129; j < RANGE; j++) { @@ -2128,33 +2220,21 @@ public static void runIntM129() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP129(int[] data) { for (int j = 0; j < RANGE - 129; j++) { @@ -2172,33 +2252,21 @@ public static void runIntP129() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntM192(int[] data) { for (int j = 192; j < RANGE; j++) { @@ -2216,33 +2284,37 @@ public static void runIntM192() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testIntP192(int[] data) { for (int j = 0; j < RANGE - 192; j++) { @@ -2260,33 +2332,21 @@ public static void runIntP192() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP0(long[] data) { for (int j = 0; j < RANGE; j++) { @@ -2304,33 +2364,37 @@ public static void runLongP0() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM1(long[] data) { for (int j = 1; j < RANGE; j++) { @@ -2348,38 +2412,18 @@ public static void runLongM1() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 - // positive byte_offset 8 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - // positive byte_offset 8 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - // positive byte_offset 8 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - // positive byte_offset 8 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, - applyIfCPUFeature = {"asimd", "true"}) + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // positive byte_offset 8 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 8 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 8 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 8 can lead to cyclic dependency + // No positive IR rule: conditions impossible. public static void testLongP1(long[] data) { for (int j = 0; j < RANGE - 1; j++) { data[j + 1] = (long)(data[j] + (long)-11); @@ -2396,33 +2440,21 @@ public static void runLongP1() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM2(long[] data) { for (int j = 2; j < RANGE; j++) { @@ -2440,36 +2472,28 @@ public static void runLongM2() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP2(long[] data) { for (int j = 0; j < RANGE - 2; j++) { @@ -2487,33 +2511,37 @@ public static void runLongP2() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM3(long[] data) { for (int j = 3; j < RANGE; j++) { @@ -2531,36 +2559,24 @@ public static void runLongM3() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 - // positive byte_offset 24 can lead to cyclic dependency + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 24 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 24"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - // positive byte_offset 24 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 24 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 24"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - // positive byte_offset 24 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 24 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 24"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP3(long[] data) { for (int j = 0; j < RANGE - 3; j++) { @@ -2578,33 +2594,21 @@ public static void runLongP3() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM4(long[] data) { for (int j = 4; j < RANGE; j++) { @@ -2622,34 +2626,34 @@ public static void runLongM4() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - // positive byte_offset 32 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 32 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 32"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 32"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16", "MaxVectorSize", "<= 32"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP4(long[] data) { for (int j = 0; j < RANGE - 4; j++) { @@ -2667,33 +2671,37 @@ public static void runLongP4() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM7(long[] data) { for (int j = 7; j < RANGE; j++) { @@ -2711,34 +2719,22 @@ public static void runLongM7() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - // positive byte_offset 56 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 56 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 56"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 56"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16", "MaxVectorSize", "<= 56"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP7(long[] data) { for (int j = 0; j < RANGE - 7; j++) { @@ -2756,33 +2752,21 @@ public static void runLongP7() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM8(long[] data) { for (int j = 8; j < RANGE; j++) { @@ -2800,33 +2784,37 @@ public static void runLongM8() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP8(long[] data) { for (int j = 0; j < RANGE - 8; j++) { @@ -2844,33 +2832,37 @@ public static void runLongP8() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM15(long[] data) { for (int j = 15; j < RANGE; j++) { @@ -2888,33 +2880,21 @@ public static void runLongM15() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP15(long[] data) { for (int j = 0; j < RANGE - 15; j++) { @@ -2932,33 +2912,21 @@ public static void runLongP15() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM16(long[] data) { for (int j = 16; j < RANGE; j++) { @@ -2976,33 +2944,37 @@ public static void runLongM16() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP16(long[] data) { for (int j = 0; j < RANGE - 16; j++) { @@ -3020,33 +2992,181 @@ public static void runLongP16() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM18(long[] data) { + for (int j = 18; j < RANGE; j++) { + data[j + -18] = (long)(data[j] + (long)-11); + } + } + + @Run(test = "testLongM18") + @Warmup(0) + public static void runLongM18() { + long[] data = new long[RANGE]; + init(data); + testLongM18(data); + verify("testLongM18", data, goldLongM18); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP18(long[] data) { + for (int j = 0; j < RANGE - 18; j++) { + data[j + 18] = (long)(data[j] + (long)-11); + } + } + + @Run(test = "testLongP18") + @Warmup(0) + public static void runLongP18() { + long[] data = new long[RANGE]; + init(data); + testLongP18(data); + verify("testLongP18", data, goldLongP18); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongM20(long[] data) { + for (int j = 20; j < RANGE; j++) { + data[j + -20] = (long)(data[j] + (long)-11); + } + } + + @Run(test = "testLongM20") + @Warmup(0) + public static void runLongM20() { + long[] data = new long[RANGE]; + init(data); + testLongM20(data); + verify("testLongM20", data, goldLongM20); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testLongP20(long[] data) { + for (int j = 0; j < RANGE - 20; j++) { + data[j + 20] = (long)(data[j] + (long)-11); + } + } + + @Run(test = "testLongP20") + @Warmup(0) + public static void runLongP20() { + long[] data = new long[RANGE]; + init(data); + testLongP20(data); + verify("testLongP20", data, goldLongP20); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM31(long[] data) { for (int j = 31; j < RANGE; j++) { @@ -3064,33 +3184,21 @@ public static void runLongM31() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP31(long[] data) { for (int j = 0; j < RANGE - 31; j++) { @@ -3108,33 +3216,21 @@ public static void runLongP31() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM32(long[] data) { for (int j = 32; j < RANGE; j++) { @@ -3152,33 +3248,37 @@ public static void runLongM32() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP32(long[] data) { for (int j = 0; j < RANGE - 32; j++) { @@ -3196,33 +3296,37 @@ public static void runLongP32() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM63(long[] data) { for (int j = 63; j < RANGE; j++) { @@ -3240,33 +3344,21 @@ public static void runLongM63() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP63(long[] data) { for (int j = 0; j < RANGE - 63; j++) { @@ -3284,33 +3376,21 @@ public static void runLongP63() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM64(long[] data) { for (int j = 64; j < RANGE; j++) { @@ -3328,33 +3408,37 @@ public static void runLongM64() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP64(long[] data) { for (int j = 0; j < RANGE - 64; j++) { @@ -3372,33 +3456,37 @@ public static void runLongP64() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM65(long[] data) { for (int j = 65; j < RANGE; j++) { @@ -3416,33 +3504,21 @@ public static void runLongM65() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP65(long[] data) { for (int j = 0; j < RANGE - 65; j++) { @@ -3460,33 +3536,21 @@ public static void runLongP65() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM128(long[] data) { for (int j = 128; j < RANGE; j++) { @@ -3504,33 +3568,37 @@ public static void runLongM128() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP128(long[] data) { for (int j = 0; j < RANGE - 128; j++) { @@ -3548,33 +3616,37 @@ public static void runLongP128() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM129(long[] data) { for (int j = 129; j < RANGE; j++) { @@ -3592,33 +3664,21 @@ public static void runLongM129() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP129(long[] data) { for (int j = 0; j < RANGE - 129; j++) { @@ -3636,33 +3696,21 @@ public static void runLongP129() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongM192(long[] data) { for (int j = 192; j < RANGE; j++) { @@ -3680,33 +3728,37 @@ public static void runLongM192() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testLongP192(long[] data) { for (int j = 0; j < RANGE - 192; j++) { @@ -3724,33 +3776,21 @@ public static void runLongP192() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP0(short[] data) { for (int j = 0; j < RANGE; j++) { @@ -3768,33 +3808,37 @@ public static void runShortP0() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM1(short[] data) { for (int j = 1; j < RANGE; j++) { @@ -3812,38 +3856,18 @@ public static void runShortM1() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 - // positive byte_offset 2 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 2 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 2 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 2 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, - applyIfCPUFeature = {"asimd", "true"}) + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 2 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 2 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 2 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 2 can lead to cyclic dependency + // No positive IR rule: conditions impossible. public static void testShortP1(short[] data) { for (int j = 0; j < RANGE - 1; j++) { data[j + 1] = (short)(data[j] * (short)-11); @@ -3860,33 +3884,21 @@ public static void runShortP1() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM2(short[] data) { for (int j = 2; j < RANGE; j++) { @@ -3904,37 +3916,25 @@ public static void runShortM2() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 - // positive byte_offset 4 can lead to cyclic dependency + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 4 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 4 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 4 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP2(short[] data) { for (int j = 0; j < RANGE - 2; j++) { @@ -3952,33 +3952,37 @@ public static void runShortP2() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM3(short[] data) { for (int j = 3; j < RANGE; j++) { @@ -3996,37 +4000,25 @@ public static void runShortM3() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 - // positive byte_offset 6 can lead to cyclic dependency + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 6 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 6"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 6 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 6 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 6"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 6 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 6 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 6"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 6 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 6 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 6"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP3(short[] data) { for (int j = 0; j < RANGE - 3; j++) { @@ -4044,33 +4036,21 @@ public static void runShortP3() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM4(short[] data) { for (int j = 4; j < RANGE; j++) { @@ -4088,37 +4068,25 @@ public static void runShortM4() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP4(short[] data) { for (int j = 0; j < RANGE - 4; j++) { @@ -4136,33 +4104,37 @@ public static void runShortP4() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM7(short[] data) { for (int j = 7; j < RANGE; j++) { @@ -4180,37 +4152,25 @@ public static void runShortM7() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 - // positive byte_offset 14 can lead to cyclic dependency + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 14"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 14 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 14"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 14 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 14"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 14 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 14"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP7(short[] data) { for (int j = 0; j < RANGE - 7; j++) { @@ -4228,33 +4188,21 @@ public static void runShortP7() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM8(short[] data) { for (int j = 8; j < RANGE; j++) { @@ -4272,36 +4220,28 @@ public static void runShortM8() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP8(short[] data) { for (int j = 0; j < RANGE - 8; j++) { @@ -4319,33 +4259,37 @@ public static void runShortP8() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM15(short[] data) { for (int j = 15; j < RANGE; j++) { @@ -4363,36 +4307,24 @@ public static void runShortM15() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 30 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 30 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 30"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 30 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 30 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 30"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 30 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 30 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 30"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP15(short[] data) { for (int j = 0; j < RANGE - 15; j++) { @@ -4410,33 +4342,21 @@ public static void runShortP15() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM16(short[] data) { for (int j = 16; j < RANGE; j++) { @@ -4454,34 +4374,34 @@ public static void runShortM16() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 32 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 32 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 32"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 32"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 32"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP16(short[] data) { for (int j = 0; j < RANGE - 16; j++) { @@ -4499,298 +4419,392 @@ public static void runShortP16() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"asimd", "true"}) - public static void testShortM31(short[] data) { - for (int j = 31; j < RANGE; j++) { - data[j + -31] = (short)(data[j] * (short)-11); + public static void testShortM18(short[] data) { + for (int j = 18; j < RANGE; j++) { + data[j + -18] = (short)(data[j] * (short)-11); } } - @Run(test = "testShortM31") + @Run(test = "testShortM18") @Warmup(0) - public static void runShortM31() { + public static void runShortM18() { short[] data = new short[RANGE]; init(data); - testShortM31(data); - verify("testShortM31", data, goldShortM31); + testShortM18(data); + verify("testShortM18", data, goldShortM18); } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 62 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 36 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 62"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 62"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 36"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testShortP31(short[] data) { - for (int j = 0; j < RANGE - 31; j++) { - data[j + 31] = (short)(data[j] * (short)-11); + public static void testShortP18(short[] data) { + for (int j = 0; j < RANGE - 18; j++) { + data[j + 18] = (short)(data[j] * (short)-11); } } - @Run(test = "testShortP31") + @Run(test = "testShortP18") @Warmup(0) - public static void runShortP31() { + public static void runShortP18() { short[] data = new short[RANGE]; init(data); - testShortP31(data); - verify("testShortP31", data, goldShortP31); + testShortP18(data); + verify("testShortP18", data, goldShortP18); } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testShortM32(short[] data) { - for (int j = 32; j < RANGE; j++) { - data[j + -32] = (short)(data[j] * (short)-11); + public static void testShortM20(short[] data) { + for (int j = 20; j < RANGE; j++) { + data[j + -20] = (short)(data[j] * (short)-11); } } - @Run(test = "testShortM32") + @Run(test = "testShortM20") @Warmup(0) - public static void runShortM32() { + public static void runShortM20() { short[] data = new short[RANGE]; init(data); - testShortM32(data); - verify("testShortM32", data, goldShortM32); + testShortM20(data); + verify("testShortM20", data, goldShortM20); } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 40 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 40"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testShortP32(short[] data) { - for (int j = 0; j < RANGE - 32; j++) { - data[j + 32] = (short)(data[j] * (short)-11); + public static void testShortP20(short[] data) { + for (int j = 0; j < RANGE - 20; j++) { + data[j + 20] = (short)(data[j] * (short)-11); } } - @Run(test = "testShortP32") + @Run(test = "testShortP20") @Warmup(0) - public static void runShortP32() { + public static void runShortP20() { short[] data = new short[RANGE]; init(data); - testShortP32(data); - verify("testShortP32", data, goldShortP32); + testShortP20(data); + verify("testShortP20", data, goldShortP20); } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testShortM63(short[] data) { - for (int j = 63; j < RANGE; j++) { - data[j + -63] = (short)(data[j] * (short)-11); + public static void testShortM31(short[] data) { + for (int j = 31; j < RANGE; j++) { + data[j + -31] = (short)(data[j] * (short)-11); } } - @Run(test = "testShortM63") + @Run(test = "testShortM31") @Warmup(0) - public static void runShortM63() { + public static void runShortM31() { short[] data = new short[RANGE]; init(data); - testShortM63(data); - verify("testShortM63", data, goldShortM63); + testShortM31(data); + verify("testShortM31", data, goldShortM31); } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 62 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 62"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testShortP63(short[] data) { - for (int j = 0; j < RANGE - 63; j++) { - data[j + 63] = (short)(data[j] * (short)-11); - } + public static void testShortP31(short[] data) { + for (int j = 0; j < RANGE - 31; j++) { + data[j + 31] = (short)(data[j] * (short)-11); + } } - @Run(test = "testShortP63") + @Run(test = "testShortP31") @Warmup(0) - public static void runShortP63() { + public static void runShortP31() { short[] data = new short[RANGE]; init(data); - testShortP63(data); - verify("testShortP63", data, goldShortP63); + testShortP31(data); + verify("testShortP31", data, goldShortP31); } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM32(short[] data) { + for (int j = 32; j < RANGE; j++) { + data[j + -32] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM32") + @Warmup(0) + public static void runShortM32() { + short[] data = new short[RANGE]; + init(data); + testShortM32(data); + verify("testShortM32", data, goldShortM32); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP32(short[] data) { + for (int j = 0; j < RANGE - 32; j++) { + data[j + 32] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP32") + @Warmup(0) + public static void runShortP32() { + short[] data = new short[RANGE]; + init(data); + testShortP32(data); + verify("testShortP32", data, goldShortP32); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortM63(short[] data) { + for (int j = 63; j < RANGE; j++) { + data[j + -63] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortM63") + @Warmup(0) + public static void runShortM63() { + short[] data = new short[RANGE]; + init(data); + testShortM63(data); + verify("testShortM63", data, goldShortM63); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testShortP63(short[] data) { + for (int j = 0; j < RANGE - 63; j++) { + data[j + 63] = (short)(data[j] * (short)-11); + } + } + + @Run(test = "testShortP63") + @Warmup(0) + public static void runShortP63() { + short[] data = new short[RANGE]; + init(data); + testShortP63(data); + verify("testShortP63", data, goldShortP63); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM64(short[] data) { for (int j = 64; j < RANGE; j++) { @@ -4808,33 +4822,37 @@ public static void runShortM64() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP64(short[] data) { for (int j = 0; j < RANGE - 64; j++) { @@ -4852,33 +4870,37 @@ public static void runShortP64() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM65(short[] data) { for (int j = 65; j < RANGE; j++) { @@ -4896,33 +4918,21 @@ public static void runShortM65() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP65(short[] data) { for (int j = 0; j < RANGE - 65; j++) { @@ -4940,33 +4950,21 @@ public static void runShortP65() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM128(short[] data) { for (int j = 128; j < RANGE; j++) { @@ -4984,33 +4982,37 @@ public static void runShortM128() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP128(short[] data) { for (int j = 0; j < RANGE - 128; j++) { @@ -5028,33 +5030,37 @@ public static void runShortP128() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM129(short[] data) { for (int j = 129; j < RANGE; j++) { @@ -5072,33 +5078,21 @@ public static void runShortM129() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP129(short[] data) { for (int j = 0; j < RANGE - 129; j++) { @@ -5116,33 +5110,21 @@ public static void runShortP129() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortM192(short[] data) { for (int j = 192; j < RANGE; j++) { @@ -5160,33 +5142,37 @@ public static void runShortM192() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testShortP192(short[] data) { for (int j = 0; j < RANGE - 192; j++) { @@ -5204,33 +5190,21 @@ public static void runShortP192() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP0(char[] data) { for (int j = 0; j < RANGE; j++) { @@ -5248,33 +5222,37 @@ public static void runCharP0() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM1(char[] data) { for (int j = 1; j < RANGE; j++) { @@ -5292,38 +5270,18 @@ public static void runCharM1() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 - // positive byte_offset 2 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 2 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 2 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 2 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, - applyIfCPUFeature = {"asimd", "true"}) + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 2 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 2 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 2 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 2 can lead to cyclic dependency + // No positive IR rule: conditions impossible. public static void testCharP1(char[] data) { for (int j = 0; j < RANGE - 1; j++) { data[j + 1] = (char)(data[j] * (char)-11); @@ -5340,33 +5298,21 @@ public static void runCharP1() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM2(char[] data) { for (int j = 2; j < RANGE; j++) { @@ -5384,37 +5330,25 @@ public static void runCharM2() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 - // positive byte_offset 4 can lead to cyclic dependency + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 4 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 4 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 4 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP2(char[] data) { for (int j = 0; j < RANGE - 2; j++) { @@ -5432,33 +5366,37 @@ public static void runCharP2() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM3(char[] data) { for (int j = 3; j < RANGE; j++) { @@ -5476,37 +5414,25 @@ public static void runCharM3() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 - // positive byte_offset 6 can lead to cyclic dependency + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 6 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 6"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 6 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 6 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 6"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 6 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 6 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 6"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 6 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 6 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 6"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 6"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP3(char[] data) { for (int j = 0; j < RANGE - 3; j++) { @@ -5524,33 +5450,21 @@ public static void runCharP3() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM4(char[] data) { for (int j = 4; j < RANGE; j++) { @@ -5568,37 +5482,25 @@ public static void runCharM4() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP4(char[] data) { for (int j = 0; j < RANGE - 4; j++) { @@ -5616,33 +5518,37 @@ public static void runCharP4() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM7(char[] data) { for (int j = 7; j < RANGE; j++) { @@ -5660,37 +5566,25 @@ public static void runCharM7() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 - // positive byte_offset 14 can lead to cyclic dependency + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 14"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 14 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 14"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 14 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 14"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 14 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 14"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP7(char[] data) { for (int j = 0; j < RANGE - 7; j++) { @@ -5708,33 +5602,21 @@ public static void runCharP7() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM8(char[] data) { for (int j = 8; j < RANGE; j++) { @@ -5752,260 +5634,366 @@ public static void runCharM8() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 16 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP8(char[] data) { + for (int j = 0; j < RANGE - 8; j++) { + data[j + 8] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP8") + @Warmup(0) + public static void runCharP8() { + char[] data = new char[RANGE]; + init(data); + testCharP8(data); + verify("testCharP8", data, goldCharP8); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, + applyIf = {"AlignVector", "true"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. + @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, + applyIf = {"AlignVector", "true"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM15(char[] data) { + for (int j = 15; j < RANGE; j++) { + data[j + -15] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM15") + @Warmup(0) + public static void runCharM15() { + char[] data = new char[RANGE]; + init(data); + testCharM15(data); + verify("testCharM15", data, goldCharM15); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 30 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 30 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + // positive byte_offset 30 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharP15(char[] data) { + for (int j = 0; j < RANGE - 15; j++) { + data[j + 15] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharP15") + @Warmup(0) + public static void runCharP15() { + char[] data = new char[RANGE]; + init(data); + testCharP15(data); + verify("testCharP15", data, goldCharP15); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testCharM16(char[] data) { + for (int j = 16; j < RANGE; j++) { + data[j + -16] = (char)(data[j] * (char)-11); + } + } + + @Run(test = "testCharM16") + @Warmup(0) + public static void runCharM16() { + char[] data = new char[RANGE]; + init(data); + testCharM16(data); + verify("testCharM16", data, goldCharM16); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 32 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 32"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testCharP8(char[] data) { - for (int j = 0; j < RANGE - 8; j++) { - data[j + 8] = (char)(data[j] * (char)-11); + public static void testCharP16(char[] data) { + for (int j = 0; j < RANGE - 16; j++) { + data[j + 16] = (char)(data[j] * (char)-11); } } - @Run(test = "testCharP8") + @Run(test = "testCharP16") @Warmup(0) - public static void runCharP8() { + public static void runCharP16() { char[] data = new char[RANGE]; init(data); - testCharP8(data); - verify("testCharP8", data, goldCharP8); + testCharP16(data); + verify("testCharP16", data, goldCharP16); } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testCharM15(char[] data) { - for (int j = 15; j < RANGE; j++) { - data[j + -15] = (char)(data[j] * (char)-11); + public static void testCharM18(char[] data) { + for (int j = 18; j < RANGE; j++) { + data[j + -18] = (char)(data[j] * (char)-11); } } - @Run(test = "testCharM15") + @Run(test = "testCharM18") @Warmup(0) - public static void runCharM15() { + public static void runCharM18() { char[] data = new char[RANGE]; init(data); - testCharM15(data); - verify("testCharM15", data, goldCharM15); + testCharM18(data); + verify("testCharM18", data, goldCharM18); } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 30 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 30"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 30 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 36 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 30"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 36"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 30 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 30"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testCharP15(char[] data) { - for (int j = 0; j < RANGE - 15; j++) { - data[j + 15] = (char)(data[j] * (char)-11); + public static void testCharP18(char[] data) { + for (int j = 0; j < RANGE - 18; j++) { + data[j + 18] = (char)(data[j] * (char)-11); } } - @Run(test = "testCharP15") + @Run(test = "testCharP18") @Warmup(0) - public static void runCharP15() { + public static void runCharP18() { char[] data = new char[RANGE]; init(data); - testCharP15(data); - verify("testCharP15", data, goldCharP15); + testCharP18(data); + verify("testCharP18", data, goldCharP18); } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"asimd", "true"}) - public static void testCharM16(char[] data) { - for (int j = 16; j < RANGE; j++) { - data[j + -16] = (char)(data[j] * (char)-11); + public static void testCharM20(char[] data) { + for (int j = 20; j < RANGE; j++) { + data[j + -20] = (char)(data[j] * (char)-11); } } - @Run(test = "testCharM16") + @Run(test = "testCharM20") @Warmup(0) - public static void runCharM16() { + public static void runCharM20() { char[] data = new char[RANGE]; init(data); - testCharM16(data); - verify("testCharM16", data, goldCharM16); + testCharM20(data); + verify("testCharM20", data, goldCharM20); } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 32 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 40 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 32"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 32"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 40"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testCharP16(char[] data) { - for (int j = 0; j < RANGE - 16; j++) { - data[j + 16] = (char)(data[j] * (char)-11); + public static void testCharP20(char[] data) { + for (int j = 0; j < RANGE - 20; j++) { + data[j + 20] = (char)(data[j] * (char)-11); } } - @Run(test = "testCharP16") + @Run(test = "testCharP20") @Warmup(0) - public static void runCharP16() { + public static void runCharP20() { char[] data = new char[RANGE]; init(data); - testCharP16(data); - verify("testCharP16", data, goldCharP16); + testCharP20(data); + verify("testCharP20", data, goldCharP20); } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM31(char[] data) { for (int j = 31; j < RANGE; j++) { @@ -6023,34 +6011,22 @@ public static void runCharM31() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 62 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 + // positive byte_offset 62 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 62"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 62"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 62"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP31(char[] data) { for (int j = 0; j < RANGE - 31; j++) { @@ -6068,33 +6044,21 @@ public static void runCharP31() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM32(char[] data) { for (int j = 32; j < RANGE; j++) { @@ -6112,33 +6076,37 @@ public static void runCharM32() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP32(char[] data) { for (int j = 0; j < RANGE - 32; j++) { @@ -6156,33 +6124,37 @@ public static void runCharP32() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM63(char[] data) { for (int j = 63; j < RANGE; j++) { @@ -6200,33 +6172,21 @@ public static void runCharM63() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP63(char[] data) { for (int j = 0; j < RANGE - 63; j++) { @@ -6244,33 +6204,21 @@ public static void runCharP63() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM64(char[] data) { for (int j = 64; j < RANGE; j++) { @@ -6288,33 +6236,37 @@ public static void runCharM64() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP64(char[] data) { for (int j = 0; j < RANGE - 64; j++) { @@ -6332,33 +6284,37 @@ public static void runCharP64() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM65(char[] data) { for (int j = 65; j < RANGE; j++) { @@ -6376,33 +6332,21 @@ public static void runCharM65() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP65(char[] data) { for (int j = 0; j < RANGE - 65; j++) { @@ -6420,33 +6364,21 @@ public static void runCharP65() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM128(char[] data) { for (int j = 128; j < RANGE; j++) { @@ -6464,33 +6396,37 @@ public static void runCharM128() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP128(char[] data) { for (int j = 0; j < RANGE - 128; j++) { @@ -6508,33 +6444,37 @@ public static void runCharP128() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM129(char[] data) { for (int j = 129; j < RANGE; j++) { @@ -6552,33 +6492,21 @@ public static void runCharM129() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP129(char[] data) { for (int j = 0; j < RANGE - 129; j++) { @@ -6596,33 +6524,21 @@ public static void runCharP129() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharM192(char[] data) { for (int j = 192; j < RANGE; j++) { @@ -6640,33 +6556,37 @@ public static void runCharM192() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 32 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 16 + // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testCharP192(char[] data) { for (int j = 0; j < RANGE - 192; j++) { @@ -6684,33 +6604,21 @@ public static void runCharP192() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP0(byte[] data) { for (int j = 0; j < RANGE; j++) { @@ -6728,33 +6636,37 @@ public static void runByteP0() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM1(byte[] data) { for (int j = 1; j < RANGE; j++) { @@ -6772,38 +6684,18 @@ public static void runByteM1() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 - // positive byte_offset 1 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 1"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 1"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 1 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 1"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 1"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 - // positive byte_offset 1 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 1"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 1"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 1 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 1"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 1"}, - applyIfCPUFeature = {"asimd", "true"}) + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // positive byte_offset 1 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 1 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 1 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 1 can lead to cyclic dependency + // No positive IR rule: conditions impossible. public static void testByteP1(byte[] data) { for (int j = 0; j < RANGE - 1; j++) { data[j + 1] = (byte)(data[j] * (byte)11); @@ -6820,33 +6712,37 @@ public static void runByteP1() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM2(byte[] data) { for (int j = 2; j < RANGE; j++) { @@ -6864,38 +6760,18 @@ public static void runByteM2() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 - // positive byte_offset 2 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 2 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 - // positive byte_offset 2 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 2 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 2"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 2"}, - applyIfCPUFeature = {"asimd", "true"}) + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // positive byte_offset 2 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 2 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 2 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 2 can lead to cyclic dependency + // No positive IR rule: conditions impossible. public static void testByteP2(byte[] data) { for (int j = 0; j < RANGE - 2; j++) { data[j + 2] = (byte)(data[j] * (byte)11); @@ -6912,33 +6788,37 @@ public static void runByteP2() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM3(byte[] data) { for (int j = 3; j < RANGE; j++) { @@ -6956,38 +6836,18 @@ public static void runByteM3() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 - // positive byte_offset 3 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 3"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 3"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 3 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 3"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 3"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 - // positive byte_offset 3 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 3"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 3"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 3 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 3"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 3"}, - applyIfCPUFeature = {"asimd", "true"}) + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // positive byte_offset 3 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 3 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 3 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 3 can lead to cyclic dependency + // No positive IR rule: conditions impossible. public static void testByteP3(byte[] data) { for (int j = 0; j < RANGE - 3; j++) { data[j + 3] = (byte)(data[j] * (byte)11); @@ -7004,33 +6864,21 @@ public static void runByteP3() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM4(byte[] data) { for (int j = 4; j < RANGE; j++) { @@ -7048,37 +6896,25 @@ public static void runByteM4() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 - // positive byte_offset 4 can lead to cyclic dependency + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 4 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 - // positive byte_offset 4 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 4 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 4 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP4(byte[] data) { for (int j = 0; j < RANGE - 4; j++) { @@ -7096,33 +6932,37 @@ public static void runByteP4() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM7(byte[] data) { for (int j = 7; j < RANGE; j++) { @@ -7140,37 +6980,25 @@ public static void runByteM7() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 - // positive byte_offset 7 can lead to cyclic dependency + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // positive byte_offset 7 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 7"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 7"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 7"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 7 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 7 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 7"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 7"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 7"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 - // positive byte_offset 7 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 7 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 7"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 7"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 7"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 7 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 7 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 7"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 7"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 7"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP7(byte[] data) { for (int j = 0; j < RANGE - 7; j++) { @@ -7188,33 +7016,21 @@ public static void runByteP7() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM8(byte[] data) { for (int j = 8; j < RANGE; j++) { @@ -7232,37 +7048,25 @@ public static void runByteM8() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP8(byte[] data) { for (int j = 0; j < RANGE - 8; j++) { @@ -7280,33 +7084,37 @@ public static void runByteP8() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM15(byte[] data) { for (int j = 15; j < RANGE; j++) { @@ -7324,37 +7132,25 @@ public static void runByteM15() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 - // positive byte_offset 15 can lead to cyclic dependency + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // positive byte_offset 15 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 15"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 15"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 15"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 15 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 15 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 15"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 15"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 15"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 - // positive byte_offset 15 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 15 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 15"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 15"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 15"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 15 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 15 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 15"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 15"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 15"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP15(byte[] data) { for (int j = 0; j < RANGE - 15; j++) { @@ -7372,33 +7168,21 @@ public static void runByteP15() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM16(byte[] data) { for (int j = 16; j < RANGE; j++) { @@ -7416,36 +7200,28 @@ public static void runByteM16() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, - applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP16(byte[] data) { for (int j = 0; j < RANGE - 16; j++) { @@ -7463,80 +7239,222 @@ public static void runByteP16() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testByteM31(byte[] data) { - for (int j = 31; j < RANGE; j++) { - data[j + -31] = (byte)(data[j] * (byte)11); + public static void testByteM18(byte[] data) { + for (int j = 18; j < RANGE; j++) { + data[j + -18] = (byte)(data[j] * (byte)11); } } - @Run(test = "testByteM31") + @Run(test = "testByteM18") @Warmup(0) - public static void runByteM31() { + public static void runByteM18() { byte[] data = new byte[RANGE]; init(data); - testByteM31(data); - verify("testByteM31", data, goldByteM31); + testByteM18(data); + verify("testByteM18", data, goldByteM18); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 18 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 18"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 18 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 18"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 18 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 18"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP18(byte[] data) { + for (int j = 0; j < RANGE - 18; j++) { + data[j + 18] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP18") + @Warmup(0) + public static void runByteP18() { + byte[] data = new byte[RANGE]; + init(data); + testByteP18(data); + verify("testByteP18", data, goldByteP18); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM20(byte[] data) { + for (int j = 20; j < RANGE; j++) { + data[j + -20] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM20") + @Warmup(0) + public static void runByteM20() { + byte[] data = new byte[RANGE]; + init(data); + testByteM20(data); + verify("testByteM20", data, goldByteM20); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 20 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 20"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 20 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 20"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 20 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 20"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteP20(byte[] data) { + for (int j = 0; j < RANGE - 20; j++) { + data[j + 20] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteP20") + @Warmup(0) + public static void runByteP20() { + byte[] data = new byte[RANGE]; + init(data); + testByteP20(data); + verify("testByteP20", data, goldByteP20); } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 31 can lead to cyclic dependency + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 31"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 31"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 - // positive byte_offset 31 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 31"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 31"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 31 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 31"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 31"}, + applyIf = {"AlignVector", "true"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testByteM31(byte[] data) { + for (int j = 31; j < RANGE; j++) { + data[j + -31] = (byte)(data[j] * (byte)11); + } + } + + @Run(test = "testByteM31") + @Warmup(0) + public static void runByteM31() { + byte[] data = new byte[RANGE]; + init(data); + testByteM31(data); + verify("testByteM31", data, goldByteM31); + } + + @Test + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 31 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 31"}, + applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 31 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 31"}, + applyIfCPUFeature = {"avx512bw", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 + // positive byte_offset 31 can lead to cyclic dependency + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 31"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP31(byte[] data) { for (int j = 0; j < RANGE - 31; j++) { @@ -7554,33 +7472,21 @@ public static void runByteP31() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM32(byte[] data) { for (int j = 32; j < RANGE; j++) { @@ -7598,34 +7504,34 @@ public static void runByteM32() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 - // positive byte_offset 32 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 32 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 32"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 32"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 32"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP32(byte[] data) { for (int j = 0; j < RANGE - 32; j++) { @@ -7643,33 +7549,37 @@ public static void runByteP32() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM63(byte[] data) { for (int j = 63; j < RANGE; j++) { @@ -7687,34 +7597,22 @@ public static void runByteM63() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 - // positive byte_offset 63 can lead to cyclic dependency + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 + // positive byte_offset 63 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 4", "MaxVectorSize", "<= 63"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 4", "MaxVectorSize", "> 63"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 63"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP63(byte[] data) { for (int j = 0; j < RANGE - 63; j++) { @@ -7732,33 +7630,21 @@ public static void runByteP63() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM64(byte[] data) { for (int j = 64; j < RANGE; j++) { @@ -7776,33 +7662,37 @@ public static void runByteM64() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP64(byte[] data) { for (int j = 0; j < RANGE - 64; j++) { @@ -7820,33 +7710,37 @@ public static void runByteP64() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM65(byte[] data) { for (int j = 65; j < RANGE; j++) { @@ -7864,33 +7758,21 @@ public static void runByteM65() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP65(byte[] data) { for (int j = 0; j < RANGE - 65; j++) { @@ -7908,33 +7790,21 @@ public static void runByteP65() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM128(byte[] data) { for (int j = 128; j < RANGE; j++) { @@ -7952,33 +7822,37 @@ public static void runByteM128() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP128(byte[] data) { for (int j = 0; j < RANGE - 128; j++) { @@ -7996,33 +7870,37 @@ public static void runByteP128() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM129(byte[] data) { for (int j = 129; j < RANGE; j++) { @@ -8040,33 +7918,21 @@ public static void runByteM129() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP129(byte[] data) { for (int j = 0; j < RANGE - 129; j++) { @@ -8084,33 +7950,21 @@ public static void runByteP129() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteM192(byte[] data) { for (int j = 192; j < RANGE; j++) { @@ -8128,33 +7982,37 @@ public static void runByteM192() { } @Test - // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 + // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // cpu: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 + // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // cpu: avx512bw -> vector_width: 64 -> elements in vector: 64 + // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 32 + // CPU: asimd -> vector_width: 32 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 4"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 4"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) public static void testByteP192(byte[] data) { for (int j = 0; j < RANGE - 192; j++) { @@ -8172,33 +8030,21 @@ public static void runByteP192() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP0(float[] data) { for (int j = 0; j < RANGE; j++) { @@ -8216,33 +8062,37 @@ public static void runFloatP0() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM1(float[] data) { for (int j = 1; j < RANGE; j++) { @@ -8260,38 +8110,18 @@ public static void runFloatM1() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 - // positive byte_offset 4 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 4"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 4 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 4"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 4"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 - // positive byte_offset 4 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 4"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 4"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 4 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 4"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 4"}, - applyIfCPUFeature = {"asimd", "true"}) + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // positive byte_offset 4 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 4 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 4 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 4 can lead to cyclic dependency + // No positive IR rule: conditions impossible. public static void testFloatP1(float[] data) { for (int j = 0; j < RANGE - 1; j++) { data[j + 1] = (float)(data[j] * (float)1.001f); @@ -8308,33 +8138,21 @@ public static void runFloatP1() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM2(float[] data) { for (int j = 2; j < RANGE; j++) { @@ -8352,37 +8170,25 @@ public static void runFloatM2() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 8"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 8 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 8 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP2(float[] data) { for (int j = 0; j < RANGE - 2; j++) { @@ -8400,33 +8206,37 @@ public static void runFloatP2() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM3(float[] data) { for (int j = 3; j < RANGE; j++) { @@ -8444,37 +8254,25 @@ public static void runFloatM3() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 - // positive byte_offset 12 can lead to cyclic dependency + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // positive byte_offset 12 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 12"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 12 can lead to cyclic dependency + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 12 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 12"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 - // positive byte_offset 12 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 12 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 12"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 12 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 12 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 12"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 12"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP3(float[] data) { for (int j = 0; j < RANGE - 3; j++) { @@ -8492,33 +8290,21 @@ public static void runFloatP3() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM4(float[] data) { for (int j = 4; j < RANGE; j++) { @@ -8536,36 +8322,28 @@ public static void runFloatM4() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 16"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP4(float[] data) { for (int j = 0; j < RANGE - 4; j++) { @@ -8583,33 +8361,37 @@ public static void runFloatP4() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM7(float[] data) { for (int j = 7; j < RANGE; j++) { @@ -8627,36 +8409,24 @@ public static void runFloatM7() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 28 can lead to cyclic dependency + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 28"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 - // positive byte_offset 28 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 28"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 - // positive byte_offset 28 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 28"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 28"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP7(float[] data) { for (int j = 0; j < RANGE - 7; j++) { @@ -8674,33 +8444,21 @@ public static void runFloatP7() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM8(float[] data) { for (int j = 8; j < RANGE; j++) { @@ -8718,34 +8476,34 @@ public static void runFloatM8() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 - // positive byte_offset 32 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 32 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 32"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 32"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 32"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP8(float[] data) { for (int j = 0; j < RANGE - 8; j++) { @@ -8763,33 +8521,37 @@ public static void runFloatP8() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM15(float[] data) { for (int j = 15; j < RANGE; j++) { @@ -8807,34 +8569,22 @@ public static void runFloatM15() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 - // positive byte_offset 60 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + // positive byte_offset 60 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 60"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 8", "MaxVectorSize", "> 60"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 60"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP15(float[] data) { for (int j = 0; j < RANGE - 15; j++) { @@ -8852,33 +8602,21 @@ public static void runFloatP15() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM16(float[] data) { for (int j = 16; j < RANGE; j++) { @@ -8896,33 +8634,37 @@ public static void runFloatM16() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP16(float[] data) { for (int j = 0; j < RANGE - 16; j++) { @@ -8940,33 +8682,169 @@ public static void runFloatP16() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM18(float[] data) { + for (int j = 18; j < RANGE; j++) { + data[j + -18] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM18") + @Warmup(0) + public static void runFloatM18() { + float[] data = new float[RANGE]; + init(data); + testFloatM18(data); + verify("testFloatM18", data, goldFloatM18); + } + + @Test + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP18(float[] data) { + for (int j = 0; j < RANGE - 18; j++) { + data[j + 18] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP18") + @Warmup(0) + public static void runFloatP18() { + float[] data = new float[RANGE]; + init(data); + testFloatP18(data); + verify("testFloatP18", data, goldFloatP18); + } + + @Test + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatM20(float[] data) { + for (int j = 20; j < RANGE; j++) { + data[j + -20] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatM20") + @Warmup(0) + public static void runFloatM20() { + float[] data = new float[RANGE]; + init(data); + testFloatM20(data); + verify("testFloatM20", data, goldFloatM20); + } + + @Test + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"avx512", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testFloatP20(float[] data) { + for (int j = 0; j < RANGE - 20; j++) { + data[j + 20] = (float)(data[j] * (float)1.001f); + } + } + + @Run(test = "testFloatP20") + @Warmup(0) + public static void runFloatP20() { + float[] data = new float[RANGE]; + init(data); + testFloatP20(data); + verify("testFloatP20", data, goldFloatP20); + } + + @Test + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM31(float[] data) { for (int j = 31; j < RANGE; j++) { @@ -8984,33 +8862,21 @@ public static void runFloatM31() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP31(float[] data) { for (int j = 0; j < RANGE - 31; j++) { @@ -9028,33 +8894,21 @@ public static void runFloatP31() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM32(float[] data) { for (int j = 32; j < RANGE; j++) { @@ -9072,33 +8926,37 @@ public static void runFloatM32() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP32(float[] data) { for (int j = 0; j < RANGE - 32; j++) { @@ -9116,33 +8974,37 @@ public static void runFloatP32() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM63(float[] data) { for (int j = 63; j < RANGE; j++) { @@ -9160,33 +9022,21 @@ public static void runFloatM63() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP63(float[] data) { for (int j = 0; j < RANGE - 63; j++) { @@ -9204,33 +9054,21 @@ public static void runFloatP63() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM64(float[] data) { for (int j = 64; j < RANGE; j++) { @@ -9248,33 +9086,37 @@ public static void runFloatM64() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP64(float[] data) { for (int j = 0; j < RANGE - 64; j++) { @@ -9292,33 +9134,37 @@ public static void runFloatP64() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM65(float[] data) { for (int j = 65; j < RANGE; j++) { @@ -9336,33 +9182,21 @@ public static void runFloatM65() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP65(float[] data) { for (int j = 0; j < RANGE - 65; j++) { @@ -9380,33 +9214,21 @@ public static void runFloatP65() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM128(float[] data) { for (int j = 128; j < RANGE; j++) { @@ -9424,33 +9246,37 @@ public static void runFloatM128() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP128(float[] data) { for (int j = 0; j < RANGE - 128; j++) { @@ -9468,33 +9294,37 @@ public static void runFloatP128() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM129(float[] data) { for (int j = 129; j < RANGE; j++) { @@ -9512,33 +9342,21 @@ public static void runFloatM129() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP129(float[] data) { for (int j = 0; j < RANGE - 129; j++) { @@ -9556,33 +9374,21 @@ public static void runFloatP129() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatM192(float[] data) { for (int j = 192; j < RANGE; j++) { @@ -9600,33 +9406,37 @@ public static void runFloatM192() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 4 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 8 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 16 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 8 + // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 8"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 8"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) public static void testFloatP192(float[] data) { for (int j = 0; j < RANGE - 192; j++) { @@ -9644,33 +9454,21 @@ public static void runFloatP192() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP0(double[] data) { for (int j = 0; j < RANGE; j++) { @@ -9688,33 +9486,37 @@ public static void runDoubleP0() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM1(double[] data) { for (int j = 1; j < RANGE; j++) { @@ -9732,38 +9534,18 @@ public static void runDoubleM1() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 - // positive byte_offset 8 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 - // positive byte_offset 8 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - // positive byte_offset 8 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, - applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - // positive byte_offset 8 can lead to cyclic dependency - @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 8"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 8"}, - applyIfCPUFeature = {"asimd", "true"}) + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // positive byte_offset 8 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 8 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 8 can lead to cyclic dependency + // No positive IR rule: conditions impossible. + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 8 can lead to cyclic dependency + // No positive IR rule: conditions impossible. public static void testDoubleP1(double[] data) { for (int j = 0; j < RANGE - 1; j++) { data[j + 1] = (double)(data[j] * (double)1.001); @@ -9780,33 +9562,21 @@ public static void runDoubleP1() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM2(double[] data) { for (int j = 2; j < RANGE; j++) { @@ -9824,36 +9594,28 @@ public static void runDoubleM2() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 16"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - // positive byte_offset 16 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 16 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16", "MaxVectorSize", "<= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP2(double[] data) { for (int j = 0; j < RANGE - 2; j++) { @@ -9871,33 +9633,37 @@ public static void runDoubleP2() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM3(double[] data) { for (int j = 3; j < RANGE; j++) { @@ -9915,36 +9681,24 @@ public static void runDoubleM3() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 - // positive byte_offset 24 can lead to cyclic dependency + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 24 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 24"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - // positive byte_offset 24 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 24 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 24"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 - // positive byte_offset 24 can lead to cyclic dependency + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 + // positive byte_offset 24 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 24"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16", "MaxVectorSize", "<= 24"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP3(double[] data) { for (int j = 0; j < RANGE - 3; j++) { @@ -9962,33 +9716,21 @@ public static void runDoubleP3() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM4(double[] data) { for (int j = 4; j < RANGE; j++) { @@ -10006,34 +9748,34 @@ public static void runDoubleM4() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - // positive byte_offset 32 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 32 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 32"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16", "MaxVectorSize", "<= 32"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 32"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP4(double[] data) { for (int j = 0; j < RANGE - 4; j++) { @@ -10051,33 +9793,37 @@ public static void runDoubleP4() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM7(double[] data) { for (int j = 7; j < RANGE; j++) { @@ -10095,34 +9841,22 @@ public static void runDoubleM7() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 - // positive byte_offset 56 can lead to cyclic dependency + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + // positive byte_offset 56 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"MaxVectorSize", ">= 16", "MaxVectorSize", "<= 56"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16", "MaxVectorSize", "<= 56"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIfOr = {"MaxVectorSize", "< 16", "MaxVectorSize", "> 56"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP7(double[] data) { for (int j = 0; j < RANGE - 7; j++) { @@ -10140,33 +9874,21 @@ public static void runDoubleP7() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM8(double[] data) { for (int j = 8; j < RANGE; j++) { @@ -10184,33 +9906,37 @@ public static void runDoubleM8() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP8(double[] data) { for (int j = 0; j < RANGE - 8; j++) { @@ -10228,33 +9954,37 @@ public static void runDoubleP8() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM15(double[] data) { for (int j = 15; j < RANGE; j++) { @@ -10272,33 +10002,21 @@ public static void runDoubleM15() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP15(double[] data) { for (int j = 0; j < RANGE - 15; j++) { @@ -10316,33 +10034,21 @@ public static void runDoubleP15() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM16(double[] data) { for (int j = 16; j < RANGE; j++) { @@ -10360,33 +10066,37 @@ public static void runDoubleM16() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP16(double[] data) { for (int j = 0; j < RANGE - 16; j++) { @@ -10404,33 +10114,181 @@ public static void runDoubleP16() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM18(double[] data) { + for (int j = 18; j < RANGE; j++) { + data[j + -18] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM18") + @Warmup(0) + public static void runDoubleM18() { + double[] data = new double[RANGE]; + init(data); + testDoubleM18(data); + verify("testDoubleM18", data, goldDoubleM18); + } + + @Test + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP18(double[] data) { + for (int j = 0; j < RANGE - 18; j++) { + data[j + 18] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP18") + @Warmup(0) + public static void runDoubleP18() { + double[] data = new double[RANGE]; + init(data); + testDoubleP18(data); + verify("testDoubleP18", data, goldDoubleP18); + } + + @Test + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleM20(double[] data) { + for (int j = 20; j < RANGE; j++) { + data[j + -20] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleM20") + @Warmup(0) + public static void runDoubleM20() { + double[] data = new double[RANGE]; + init(data); + testDoubleM20(data); + verify("testDoubleM20", data, goldDoubleM20); + } + + @Test + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"avx512", "true"}) + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, + applyIfCPUFeature = {"asimd", "true"}) + public static void testDoubleP20(double[] data) { + for (int j = 0; j < RANGE - 20; j++) { + data[j + 20] = (double)(data[j] * (double)1.001); + } + } + + @Run(test = "testDoubleP20") + @Warmup(0) + public static void runDoubleP20() { + double[] data = new double[RANGE]; + init(data); + testDoubleP20(data); + verify("testDoubleP20", data, goldDoubleP20); + } + + @Test + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM31(double[] data) { for (int j = 31; j < RANGE; j++) { @@ -10448,33 +10306,21 @@ public static void runDoubleM31() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP31(double[] data) { for (int j = 0; j < RANGE - 31; j++) { @@ -10492,33 +10338,21 @@ public static void runDoubleP31() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM32(double[] data) { for (int j = 32; j < RANGE; j++) { @@ -10536,33 +10370,37 @@ public static void runDoubleM32() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP32(double[] data) { for (int j = 0; j < RANGE - 32; j++) { @@ -10580,33 +10418,37 @@ public static void runDoubleP32() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM63(double[] data) { for (int j = 63; j < RANGE; j++) { @@ -10624,33 +10466,21 @@ public static void runDoubleM63() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP63(double[] data) { for (int j = 0; j < RANGE - 63; j++) { @@ -10668,33 +10498,21 @@ public static void runDoubleP63() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM64(double[] data) { for (int j = 64; j < RANGE; j++) { @@ -10712,33 +10530,37 @@ public static void runDoubleM64() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP64(double[] data) { for (int j = 0; j < RANGE - 64; j++) { @@ -10756,33 +10578,37 @@ public static void runDoubleP64() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM65(double[] data) { for (int j = 65; j < RANGE; j++) { @@ -10800,33 +10626,21 @@ public static void runDoubleM65() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP65(double[] data) { for (int j = 0; j < RANGE - 65; j++) { @@ -10844,33 +10658,21 @@ public static void runDoubleP65() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM128(double[] data) { for (int j = 128; j < RANGE; j++) { @@ -10888,33 +10690,37 @@ public static void runDoubleM128() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP128(double[] data) { for (int j = 0; j < RANGE - 128; j++) { @@ -10932,33 +10738,37 @@ public static void runDoubleP128() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) + // Strict alignment not possible. @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM129(double[] data) { for (int j = 129; j < RANGE; j++) { @@ -10976,33 +10786,21 @@ public static void runDoubleM129() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP129(double[] data) { for (int j = 0; j < RANGE - 129; j++) { @@ -11020,33 +10818,21 @@ public static void runDoubleP129() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, - applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, - applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleM192(double[] data) { for (int j = 192; j < RANGE; j++) { @@ -11064,33 +10850,37 @@ public static void runDoubleM192() { } @Test - // cpu: sse4.1 -> vector_width: 16 -> elements in vector: 2 + // CPU: sse4.1 -> vector_width: 16 -> elements in vector: 2 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // cpu: avx and avx2 -> vector_width: 32 -> elements in vector: 4 + // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // cpu: avx512 -> vector_width: 64 -> elements in vector: 8 + // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // cpu: asimd -> vector_width: 32 -> elements in vector: 4 + // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIf = {"MaxVectorSize", ">= 16"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"MaxVectorSize", "< 16"}, + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) public static void testDoubleP192(double[] data) { for (int j = 0; j < RANGE - 192; j++) { From fb7f6dd9fbc2a6086d2ad36e0681fbc9eff6c9a7 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Fri, 3 Mar 2023 08:31:48 +0100 Subject: [PATCH 30/34] TestOptionVectorizeIR.java: removed PopulateIndex IR rule - fails on x86 32bit - see Matcher::match_rule_supported --- .../jtreg/compiler/vectorization/TestOptionVectorizeIR.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java index d7f7716ed0068..8c5217c1d5121 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestOptionVectorizeIR.java @@ -212,8 +212,6 @@ public void runTest6() { } @Test - @IR(counts = {IRNode.POPULATE_INDEX, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfCPUFeatureOr = {"avx2", "true", "sve", "true"}) static void test1(int[] data) { for (int j = 0; j < RANGE; j++) { // Vectorizes even if it is not forced From 9e3d4805a89839569c2a5bfac62fdac7be65ddb6 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Wed, 8 Mar 2023 11:08:12 +0100 Subject: [PATCH 31/34] TestDependencyOffsets.java: parallelize it + various AVX settings --- .../superword/TestDependencyOffsets.java | 938 ++++++++++++------ 1 file changed, 654 insertions(+), 284 deletions(-) diff --git a/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java b/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java index 0e05e12840c9e..6828a5b72ec03 100644 --- a/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java +++ b/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java @@ -22,25 +22,16 @@ */ /* - * @test - * @bug 8298935 - * @summary Test SuperWord vectorization with different access offsets - * and various MaxVectorSize values, and +- AlignVector. - * Note: CompileCommand Option Vectorize is enabled. - * @requires vm.compiler2.enabled - * @library /test/lib / - * @run driver/timeout=400 compiler.loopopts.superword.TestDependencyOffsets - */ - -package compiler.loopopts.superword; -import compiler.lib.ir_framework.*; - -/* + * Summary: + * Test SuperWord vectorization with different access offsets + * and various MaxVectorSize values, and +- AlignVector. + * Note: CompileCommand Option Vectorize is enabled. + * * Note: this test is auto-generated. Please modify / generate with script: * https://bugs.openjdk.org/browse/JDK-8298935 * * Types: int, long, short, char, byte, float, double - * Offsets: 0, -1, 1, -2, 2, -3, 3, -4, 4, -7, 7, -8, 8, -15, 15, -16, 16, -18, 18, -20, 20, -31, 31, -32, 32, -63, 63, -64, 64, -65, 65, -128, 128, -129, 129, -192, 192 + * Offsets: 0, -1, 1, -2, 2, -3, 3, -4, 4, -7, 7, -8, 8, -14, 14, -16, 16, -18, 18, -20, 20, -31, 31, -32, 32, -63, 63, -64, 64, -65, 65, -128, 128, -129, 129, -192, 192 * * Checking if we should vectorize is a bit complicated. It depends on * Matcher::vector_width_in_bytes, of the respective platforms (eg. x86.ad) @@ -98,6 +89,373 @@ * */ +/* + * @test id=sse4-v016-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*sse4.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets sse4-v016-A + */ + +/* + * @test id=sse4-v016-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*sse4.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets sse4-v016-U + */ + +/* + * @test id=sse4-v008-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*sse4.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets sse4-v008-A + */ + +/* + * @test id=sse4-v008-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*sse4.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets sse4-v008-U + */ + +/* + * @test id=sse4-v004-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*sse4.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets sse4-v004-A + */ + +/* + * @test id=sse4-v004-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*sse4.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets sse4-v004-U + */ + +/* + * @test id=sse4-v002-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*sse4.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets sse4-v002-A + */ + +/* + * @test id=sse4-v002-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*sse4.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets sse4-v002-U + */ + +/* + * @test id=avx1-v032-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*avx.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets avx1-v032-A + */ + +/* + * @test id=avx1-v032-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*avx.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets avx1-v032-U + */ + +/* + * @test id=avx1-v016-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*avx.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets avx1-v016-A + */ + +/* + * @test id=avx1-v016-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*avx.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets avx1-v016-U + */ + +/* + * @test id=avx2-v032-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*avx2.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets avx2-v032-A + */ + +/* + * @test id=avx2-v032-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*avx2.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets avx2-v032-U + */ + +/* + * @test id=avx2-v016-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*avx2.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets avx2-v016-A + */ + +/* + * @test id=avx2-v016-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*avx2.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets avx2-v016-U + */ + +/* + * @test id=avx512-v064-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*avx512.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets avx512-v064-A + */ + +/* + * @test id=avx512-v064-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*avx512.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets avx512-v064-U + */ + +/* + * @test id=avx512-v032-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*avx512.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets avx512-v032-A + */ + +/* + * @test id=avx512-v032-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*avx512.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets avx512-v032-U + */ + +/* + * @test id=avx512bw-v064-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*avx512bw.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets avx512bw-v064-A + */ + +/* + * @test id=avx512bw-v064-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*avx512bw.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets avx512bw-v064-U + */ + +/* + * @test id=avx512bw-v032-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*avx512bw.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets avx512bw-v032-A + */ + +/* + * @test id=avx512bw-v032-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") + * @requires vm.cpu.features ~= ".*avx512bw.*" + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets avx512bw-v032-U + */ + +/* + * @test id=vec-v064-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch!="x86" & os.arch!="i386" & os.arch!="amd64" & os.arch!="x86_64") + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets vec-v064-A + */ + +/* + * @test id=vec-v064-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch!="x86" & os.arch!="i386" & os.arch!="amd64" & os.arch!="x86_64") + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets vec-v064-U + */ + +/* + * @test id=vec-v032-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch!="x86" & os.arch!="i386" & os.arch!="amd64" & os.arch!="x86_64") + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets vec-v032-A + */ + +/* + * @test id=vec-v032-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch!="x86" & os.arch!="i386" & os.arch!="amd64" & os.arch!="x86_64") + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets vec-v032-U + */ + +/* + * @test id=vec-v016-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch!="x86" & os.arch!="i386" & os.arch!="amd64" & os.arch!="x86_64") + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets vec-v016-A + */ + +/* + * @test id=vec-v016-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch!="x86" & os.arch!="i386" & os.arch!="amd64" & os.arch!="x86_64") + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets vec-v016-U + */ + +/* + * @test id=vec-v008-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch!="x86" & os.arch!="i386" & os.arch!="amd64" & os.arch!="x86_64") + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets vec-v008-A + */ + +/* + * @test id=vec-v008-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch!="x86" & os.arch!="i386" & os.arch!="amd64" & os.arch!="x86_64") + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets vec-v008-U + */ + +/* + * @test id=vec-v004-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch!="x86" & os.arch!="i386" & os.arch!="amd64" & os.arch!="x86_64") + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets vec-v004-A + */ + +/* + * @test id=vec-v004-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @requires (os.arch!="x86" & os.arch!="i386" & os.arch!="amd64" & os.arch!="x86_64") + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets vec-v004-U + */ + +package compiler.loopopts.superword; +import compiler.lib.ir_framework.*; + public class TestDependencyOffsets { static final int RANGE = 512; @@ -114,8 +472,8 @@ public class TestDependencyOffsets { static int[] goldIntP7 = new int[RANGE]; static int[] goldIntM8 = new int[RANGE]; static int[] goldIntP8 = new int[RANGE]; - static int[] goldIntM15 = new int[RANGE]; - static int[] goldIntP15 = new int[RANGE]; + static int[] goldIntM14 = new int[RANGE]; + static int[] goldIntP14 = new int[RANGE]; static int[] goldIntM16 = new int[RANGE]; static int[] goldIntP16 = new int[RANGE]; static int[] goldIntM18 = new int[RANGE]; @@ -151,8 +509,8 @@ public class TestDependencyOffsets { static long[] goldLongP7 = new long[RANGE]; static long[] goldLongM8 = new long[RANGE]; static long[] goldLongP8 = new long[RANGE]; - static long[] goldLongM15 = new long[RANGE]; - static long[] goldLongP15 = new long[RANGE]; + static long[] goldLongM14 = new long[RANGE]; + static long[] goldLongP14 = new long[RANGE]; static long[] goldLongM16 = new long[RANGE]; static long[] goldLongP16 = new long[RANGE]; static long[] goldLongM18 = new long[RANGE]; @@ -188,8 +546,8 @@ public class TestDependencyOffsets { static short[] goldShortP7 = new short[RANGE]; static short[] goldShortM8 = new short[RANGE]; static short[] goldShortP8 = new short[RANGE]; - static short[] goldShortM15 = new short[RANGE]; - static short[] goldShortP15 = new short[RANGE]; + static short[] goldShortM14 = new short[RANGE]; + static short[] goldShortP14 = new short[RANGE]; static short[] goldShortM16 = new short[RANGE]; static short[] goldShortP16 = new short[RANGE]; static short[] goldShortM18 = new short[RANGE]; @@ -225,8 +583,8 @@ public class TestDependencyOffsets { static char[] goldCharP7 = new char[RANGE]; static char[] goldCharM8 = new char[RANGE]; static char[] goldCharP8 = new char[RANGE]; - static char[] goldCharM15 = new char[RANGE]; - static char[] goldCharP15 = new char[RANGE]; + static char[] goldCharM14 = new char[RANGE]; + static char[] goldCharP14 = new char[RANGE]; static char[] goldCharM16 = new char[RANGE]; static char[] goldCharP16 = new char[RANGE]; static char[] goldCharM18 = new char[RANGE]; @@ -262,8 +620,8 @@ public class TestDependencyOffsets { static byte[] goldByteP7 = new byte[RANGE]; static byte[] goldByteM8 = new byte[RANGE]; static byte[] goldByteP8 = new byte[RANGE]; - static byte[] goldByteM15 = new byte[RANGE]; - static byte[] goldByteP15 = new byte[RANGE]; + static byte[] goldByteM14 = new byte[RANGE]; + static byte[] goldByteP14 = new byte[RANGE]; static byte[] goldByteM16 = new byte[RANGE]; static byte[] goldByteP16 = new byte[RANGE]; static byte[] goldByteM18 = new byte[RANGE]; @@ -299,8 +657,8 @@ public class TestDependencyOffsets { static float[] goldFloatP7 = new float[RANGE]; static float[] goldFloatM8 = new float[RANGE]; static float[] goldFloatP8 = new float[RANGE]; - static float[] goldFloatM15 = new float[RANGE]; - static float[] goldFloatP15 = new float[RANGE]; + static float[] goldFloatM14 = new float[RANGE]; + static float[] goldFloatP14 = new float[RANGE]; static float[] goldFloatM16 = new float[RANGE]; static float[] goldFloatP16 = new float[RANGE]; static float[] goldFloatM18 = new float[RANGE]; @@ -336,8 +694,8 @@ public class TestDependencyOffsets { static double[] goldDoubleP7 = new double[RANGE]; static double[] goldDoubleM8 = new double[RANGE]; static double[] goldDoubleP8 = new double[RANGE]; - static double[] goldDoubleM15 = new double[RANGE]; - static double[] goldDoubleP15 = new double[RANGE]; + static double[] goldDoubleM14 = new double[RANGE]; + static double[] goldDoubleP14 = new double[RANGE]; static double[] goldDoubleM16 = new double[RANGE]; static double[] goldDoubleP16 = new double[RANGE]; static double[] goldDoubleM18 = new double[RANGE]; @@ -389,10 +747,10 @@ public class TestDependencyOffsets { testIntM8(goldIntM8); init(goldIntP8); testIntP8(goldIntP8); - init(goldIntM15); - testIntM15(goldIntM15); - init(goldIntP15); - testIntP15(goldIntP15); + init(goldIntM14); + testIntM14(goldIntM14); + init(goldIntP14); + testIntP14(goldIntP14); init(goldIntM16); testIntM16(goldIntM16); init(goldIntP16); @@ -463,10 +821,10 @@ public class TestDependencyOffsets { testLongM8(goldLongM8); init(goldLongP8); testLongP8(goldLongP8); - init(goldLongM15); - testLongM15(goldLongM15); - init(goldLongP15); - testLongP15(goldLongP15); + init(goldLongM14); + testLongM14(goldLongM14); + init(goldLongP14); + testLongP14(goldLongP14); init(goldLongM16); testLongM16(goldLongM16); init(goldLongP16); @@ -537,10 +895,10 @@ public class TestDependencyOffsets { testShortM8(goldShortM8); init(goldShortP8); testShortP8(goldShortP8); - init(goldShortM15); - testShortM15(goldShortM15); - init(goldShortP15); - testShortP15(goldShortP15); + init(goldShortM14); + testShortM14(goldShortM14); + init(goldShortP14); + testShortP14(goldShortP14); init(goldShortM16); testShortM16(goldShortM16); init(goldShortP16); @@ -611,10 +969,10 @@ public class TestDependencyOffsets { testCharM8(goldCharM8); init(goldCharP8); testCharP8(goldCharP8); - init(goldCharM15); - testCharM15(goldCharM15); - init(goldCharP15); - testCharP15(goldCharP15); + init(goldCharM14); + testCharM14(goldCharM14); + init(goldCharP14); + testCharP14(goldCharP14); init(goldCharM16); testCharM16(goldCharM16); init(goldCharP16); @@ -685,10 +1043,10 @@ public class TestDependencyOffsets { testByteM8(goldByteM8); init(goldByteP8); testByteP8(goldByteP8); - init(goldByteM15); - testByteM15(goldByteM15); - init(goldByteP15); - testByteP15(goldByteP15); + init(goldByteM14); + testByteM14(goldByteM14); + init(goldByteP14); + testByteP14(goldByteP14); init(goldByteM16); testByteM16(goldByteM16); init(goldByteP16); @@ -759,10 +1117,10 @@ public class TestDependencyOffsets { testFloatM8(goldFloatM8); init(goldFloatP8); testFloatP8(goldFloatP8); - init(goldFloatM15); - testFloatM15(goldFloatM15); - init(goldFloatP15); - testFloatP15(goldFloatP15); + init(goldFloatM14); + testFloatM14(goldFloatM14); + init(goldFloatP14); + testFloatP14(goldFloatP14); init(goldFloatM16); testFloatM16(goldFloatM16); init(goldFloatP16); @@ -833,10 +1191,10 @@ public class TestDependencyOffsets { testDoubleM8(goldDoubleM8); init(goldDoubleP8); testDoubleP8(goldDoubleP8); - init(goldDoubleM15); - testDoubleM15(goldDoubleM15); - init(goldDoubleP15); - testDoubleP15(goldDoubleP15); + init(goldDoubleM14); + testDoubleM14(goldDoubleM14); + init(goldDoubleP14); + testDoubleP14(goldDoubleP14); init(goldDoubleM16); testDoubleM16(goldDoubleM16); init(goldDoubleP16); @@ -892,16 +1250,116 @@ public static void main(String args[]) { "-XX:CompileCommand=compileonly,compiler.loopopts.superword.TestDependencyOffsets::verify", "-XX:LoopUnrollLimit=250"); - int i = 0; - Scenario[] scenarios = new Scenario[16]; - for (int maxVectorSize : new int[] {1, 2, 4, 8, 16, 32, 64, 128}) { - for (String alignVectorSign : new String[] {"+", "-"}) { - scenarios[i] = new Scenario(i, "-XX:" + alignVectorSign + "AlignVector", - "-XX:MaxVectorSize=" + maxVectorSize); - i++; - } + if (args.length != 1) { + throw new RuntimeException("Test requires exactly one argument!"); + } + + switch (args[0]) { + case "sse4-v016-A": + framework.addFlags("-XX:UseSSE=4", "-XX:MaxVectorSize=16", "-XX:+AlignVector"); + break; + case "sse4-v016-U": + framework.addFlags("-XX:UseSSE=4", "-XX:MaxVectorSize=16", "-XX:-AlignVector"); + break; + case "sse4-v008-A": + framework.addFlags("-XX:UseSSE=4", "-XX:MaxVectorSize=8", "-XX:+AlignVector"); + break; + case "sse4-v008-U": + framework.addFlags("-XX:UseSSE=4", "-XX:MaxVectorSize=8", "-XX:-AlignVector"); + break; + case "sse4-v004-A": + framework.addFlags("-XX:UseSSE=4", "-XX:MaxVectorSize=4", "-XX:+AlignVector"); + break; + case "sse4-v004-U": + framework.addFlags("-XX:UseSSE=4", "-XX:MaxVectorSize=4", "-XX:-AlignVector"); + break; + case "sse4-v002-A": + framework.addFlags("-XX:UseSSE=4", "-XX:MaxVectorSize=4", "-XX:+AlignVector"); + break; + case "sse4-v002-U": + framework.addFlags("-XX:UseSSE=4", "-XX:MaxVectorSize=4", "-XX:-AlignVector"); + break; + case "avx1-v032-A": + framework.addFlags("-XX:UseAVX=1", "-XX:MaxVectorSize=32", "-XX:+AlignVector"); + break; + case "avx1-v032-U": + framework.addFlags("-XX:UseAVX=1", "-XX:MaxVectorSize=32", "-XX:-AlignVector"); + break; + case "avx1-v016-A": + framework.addFlags("-XX:UseAVX=1", "-XX:MaxVectorSize=16", "-XX:+AlignVector"); + break; + case "avx1-v016-U": + framework.addFlags("-XX:UseAVX=1", "-XX:MaxVectorSize=16", "-XX:-AlignVector"); + break; + case "avx2-v032-A": + framework.addFlags("-XX:UseAVX=2", "-XX:MaxVectorSize=32", "-XX:+AlignVector"); + break; + case "avx2-v032-U": + framework.addFlags("-XX:UseAVX=2", "-XX:MaxVectorSize=32", "-XX:-AlignVector"); + break; + case "avx2-v016-A": + framework.addFlags("-XX:UseAVX=2", "-XX:MaxVectorSize=16", "-XX:+AlignVector"); + break; + case "avx2-v016-U": + framework.addFlags("-XX:UseAVX=2", "-XX:MaxVectorSize=16", "-XX:-AlignVector"); + break; + case "avx512-v064-A": + framework.addFlags("-XX:UseAVX=3", "-XX:+UseKNLSetting", "-XX:MaxVectorSize=64", "-XX:+AlignVector"); + break; + case "avx512-v064-U": + framework.addFlags("-XX:UseAVX=3", "-XX:+UseKNLSetting", "-XX:MaxVectorSize=64", "-XX:-AlignVector"); + break; + case "avx512-v032-A": + framework.addFlags("-XX:UseAVX=3", "-XX:+UseKNLSetting", "-XX:MaxVectorSize=32", "-XX:+AlignVector"); + break; + case "avx512-v032-U": + framework.addFlags("-XX:UseAVX=3", "-XX:+UseKNLSetting", "-XX:MaxVectorSize=32", "-XX:-AlignVector"); + break; + case "avx512bw-v064-A": + framework.addFlags("-XX:UseAVX=3", "-XX:MaxVectorSize=64", "-XX:+AlignVector"); + break; + case "avx512bw-v064-U": + framework.addFlags("-XX:UseAVX=3", "-XX:MaxVectorSize=64", "-XX:-AlignVector"); + break; + case "avx512bw-v032-A": + framework.addFlags("-XX:UseAVX=3", "-XX:MaxVectorSize=32", "-XX:+AlignVector"); + break; + case "avx512bw-v032-U": + framework.addFlags("-XX:UseAVX=3", "-XX:MaxVectorSize=32", "-XX:-AlignVector"); + break; + case "vec-v064-A": + framework.addFlags("-XX:MaxVectorSize=64", "-XX:+AlignVector"); + break; + case "vec-v064-U": + framework.addFlags("-XX:MaxVectorSize=64", "-XX:-AlignVector"); + break; + case "vec-v032-A": + framework.addFlags("-XX:MaxVectorSize=32", "-XX:+AlignVector"); + break; + case "vec-v032-U": + framework.addFlags("-XX:MaxVectorSize=32", "-XX:-AlignVector"); + break; + case "vec-v016-A": + framework.addFlags("-XX:MaxVectorSize=16", "-XX:+AlignVector"); + break; + case "vec-v016-U": + framework.addFlags("-XX:MaxVectorSize=16", "-XX:-AlignVector"); + break; + case "vec-v008-A": + framework.addFlags("-XX:MaxVectorSize=8", "-XX:+AlignVector"); + break; + case "vec-v008-U": + framework.addFlags("-XX:MaxVectorSize=8", "-XX:-AlignVector"); + break; + case "vec-v004-A": + framework.addFlags("-XX:MaxVectorSize=4", "-XX:+AlignVector"); + break; + case "vec-v004-U": + framework.addFlags("-XX:MaxVectorSize=4", "-XX:-AlignVector"); + break; + default: + throw new RuntimeException("Test argument not recognized: " + args[0]); } - framework.addScenarios(scenarios); framework.start(); } @@ -1403,47 +1861,31 @@ public static void runIntP8() { @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // CPU: avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeature = {"avx512", "true"}) // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeature = {"asimd", "true"}) - public static void testIntM15(int[] data) { - for (int j = 15; j < RANGE; j++) { - data[j + -15] = (int)(data[j] * (int)-11); + public static void testIntM14(int[] data) { + for (int j = 14; j < RANGE; j++) { + data[j + -14] = (int)(data[j] * (int)-11); } } - @Run(test = "testIntM15") + @Run(test = "testIntM14") @Warmup(0) - public static void runIntM15() { + public static void runIntM14() { int[] data = new int[RANGE]; init(data); - testIntM15(data); - verify("testIntM15", data, goldIntM15); + testIntM14(data); + verify("testIntM14", data, goldIntM14); } @Test @@ -1456,27 +1898,27 @@ public static void runIntM15() { applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 - // positive byte_offset 60 can lead to cyclic dependency + // positive byte_offset 56 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 60"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 56"}, applyIfCPUFeature = {"avx512", "true"}) // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testIntP15(int[] data) { - for (int j = 0; j < RANGE - 15; j++) { - data[j + 15] = (int)(data[j] * (int)-11); + public static void testIntP14(int[] data) { + for (int j = 0; j < RANGE - 14; j++) { + data[j + 14] = (int)(data[j] * (int)-11); } } - @Run(test = "testIntP15") + @Run(test = "testIntP14") @Warmup(0) - public static void runIntP15() { + public static void runIntP14() { int[] data = new int[RANGE]; init(data); - testIntP15(data); - verify("testIntP15", data, goldIntP15); + testIntP14(data); + verify("testIntP14", data, goldIntP14); } @Test @@ -2836,47 +3278,31 @@ public static void runLongP8() { @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512", "false"}) // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeature = {"avx512", "true"}) // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.ADD_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeature = {"asimd", "true"}) - public static void testLongM15(long[] data) { - for (int j = 15; j < RANGE; j++) { - data[j + -15] = (long)(data[j] + (long)-11); + public static void testLongM14(long[] data) { + for (int j = 14; j < RANGE; j++) { + data[j + -14] = (long)(data[j] + (long)-11); } } - @Run(test = "testLongM15") + @Run(test = "testLongM14") @Warmup(0) - public static void runLongM15() { + public static void runLongM14() { long[] data = new long[RANGE]; init(data); - testLongM15(data); - verify("testLongM15", data, goldLongM15); + testLongM14(data); + verify("testLongM14", data, goldLongM14); } @Test @@ -2884,6 +3310,10 @@ public static void runLongM15() { @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // CPU: avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, @@ -2896,19 +3326,19 @@ public static void runLongM15() { @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.ADD_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testLongP15(long[] data) { - for (int j = 0; j < RANGE - 15; j++) { - data[j + 15] = (long)(data[j] + (long)-11); + public static void testLongP14(long[] data) { + for (int j = 0; j < RANGE - 14; j++) { + data[j + 14] = (long)(data[j] + (long)-11); } } - @Run(test = "testLongP15") + @Run(test = "testLongP14") @Warmup(0) - public static void runLongP15() { + public static void runLongP14() { long[] data = new long[RANGE]; init(data); - testLongP15(data); - verify("testLongP15", data, goldLongP15); + testLongP14(data); + verify("testLongP14", data, goldLongP14); } @Test @@ -4263,47 +4693,31 @@ public static void runShortP8() { @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeature = {"avx512bw", "true"}) // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeature = {"asimd", "true"}) - public static void testShortM15(short[] data) { - for (int j = 15; j < RANGE; j++) { - data[j + -15] = (short)(data[j] * (short)-11); + public static void testShortM14(short[] data) { + for (int j = 14; j < RANGE; j++) { + data[j + -14] = (short)(data[j] * (short)-11); } } - @Run(test = "testShortM15") + @Run(test = "testShortM14") @Warmup(0) - public static void runShortM15() { + public static void runShortM14() { short[] data = new short[RANGE]; init(data); - testShortM15(data); - verify("testShortM15", data, goldShortM15); + testShortM14(data); + verify("testShortM14", data, goldShortM14); } @Test @@ -4312,33 +4726,33 @@ public static void runShortM15() { applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 30 can lead to cyclic dependency + // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 28"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 30 can lead to cyclic dependency + // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 28"}, applyIfCPUFeature = {"avx512bw", "true"}) // CPU: asimd -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 30 can lead to cyclic dependency + // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 28"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testShortP15(short[] data) { - for (int j = 0; j < RANGE - 15; j++) { - data[j + 15] = (short)(data[j] * (short)-11); + public static void testShortP14(short[] data) { + for (int j = 0; j < RANGE - 14; j++) { + data[j + 14] = (short)(data[j] * (short)-11); } } - @Run(test = "testShortP15") + @Run(test = "testShortP14") @Warmup(0) - public static void runShortP15() { + public static void runShortP14() { short[] data = new short[RANGE]; init(data); - testShortP15(data); - verify("testShortP15", data, goldShortP15); + testShortP14(data); + verify("testShortP14", data, goldShortP14); } @Test @@ -5677,47 +6091,31 @@ public static void runCharP8() { @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"avx512bw", "true"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeature = {"avx512bw", "true"}) // CPU: asimd -> vector_width: 32 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeature = {"asimd", "true"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeature = {"asimd", "true"}) - public static void testCharM15(char[] data) { - for (int j = 15; j < RANGE; j++) { - data[j + -15] = (char)(data[j] * (char)-11); + public static void testCharM14(char[] data) { + for (int j = 14; j < RANGE; j++) { + data[j + -14] = (char)(data[j] * (char)-11); } } - @Run(test = "testCharM15") + @Run(test = "testCharM14") @Warmup(0) - public static void runCharM15() { + public static void runCharM14() { char[] data = new char[RANGE]; init(data); - testCharM15(data); - verify("testCharM15", data, goldCharM15); + testCharM14(data); + verify("testCharM14", data, goldCharM14); } @Test @@ -5726,33 +6124,33 @@ public static void runCharM15() { applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 30 can lead to cyclic dependency + // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 28"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // CPU: avx512bw -> vector_width: 64 -> elements in vector: 32 - // positive byte_offset 30 can lead to cyclic dependency + // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 28"}, applyIfCPUFeature = {"avx512bw", "true"}) // CPU: asimd -> vector_width: 32 -> elements in vector: 16 - // positive byte_offset 30 can lead to cyclic dependency + // positive byte_offset 28 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 30"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 28"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testCharP15(char[] data) { - for (int j = 0; j < RANGE - 15; j++) { - data[j + 15] = (char)(data[j] * (char)-11); + public static void testCharP14(char[] data) { + for (int j = 0; j < RANGE - 14; j++) { + data[j + 14] = (char)(data[j] * (char)-11); } } - @Run(test = "testCharP15") + @Run(test = "testCharP14") @Warmup(0) - public static void runCharP15() { + public static void runCharP14() { char[] data = new char[RANGE]; init(data); - testCharP15(data); - verify("testCharP15", data, goldCharP15); + testCharP14(data); + verify("testCharP14", data, goldCharP14); } @Test @@ -7116,55 +7514,55 @@ public static void runByteP8() { @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, applyIf = {"AlignVector", "true"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testByteM15(byte[] data) { - for (int j = 15; j < RANGE; j++) { - data[j + -15] = (byte)(data[j] * (byte)11); + public static void testByteM14(byte[] data) { + for (int j = 14; j < RANGE; j++) { + data[j + -14] = (byte)(data[j] * (byte)11); } } - @Run(test = "testByteM15") + @Run(test = "testByteM14") @Warmup(0) - public static void runByteM15() { + public static void runByteM14() { byte[] data = new byte[RANGE]; init(data); - testByteM15(data); - verify("testByteM15", data, goldByteM15); + testByteM14(data); + verify("testByteM14", data, goldByteM14); } @Test // CPU: sse4.1 to avx -> vector_width: 16 -> elements in vector: 16 - // positive byte_offset 15 can lead to cyclic dependency + // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 15"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx2", "false"}) // CPU: avx2 to avx512 without avx512bw -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 15 can lead to cyclic dependency + // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 15"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeatureAnd = {"avx2", "true", "avx512bw", "false"}) // CPU: avx512bw -> vector_width: 64 -> elements in vector: 64 - // positive byte_offset 15 can lead to cyclic dependency + // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 15"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeature = {"avx512bw", "true"}) // CPU: asimd -> vector_width: 32 -> elements in vector: 32 - // positive byte_offset 15 can lead to cyclic dependency + // positive byte_offset 14 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 15"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 4", "MaxVectorSize", "<= 14"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testByteP15(byte[] data) { - for (int j = 0; j < RANGE - 15; j++) { - data[j + 15] = (byte)(data[j] * (byte)11); + public static void testByteP14(byte[] data) { + for (int j = 0; j < RANGE - 14; j++) { + data[j + 14] = (byte)(data[j] * (byte)11); } } - @Run(test = "testByteP15") + @Run(test = "testByteP14") @Warmup(0) - public static void runByteP15() { + public static void runByteP14() { byte[] data = new byte[RANGE]; init(data); - testByteP15(data); - verify("testByteP15", data, goldByteP15); + testByteP14(data); + verify("testByteP14", data, goldByteP14); } @Test @@ -8525,47 +8923,31 @@ public static void runFloatP8() { @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"avx512", "true"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeature = {"avx512", "true"}) // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeature = {"asimd", "true"}) - public static void testFloatM15(float[] data) { - for (int j = 15; j < RANGE; j++) { - data[j + -15] = (float)(data[j] * (float)1.001f); + public static void testFloatM14(float[] data) { + for (int j = 14; j < RANGE; j++) { + data[j + -14] = (float)(data[j] * (float)1.001f); } } - @Run(test = "testFloatM15") + @Run(test = "testFloatM14") @Warmup(0) - public static void runFloatM15() { + public static void runFloatM14() { float[] data = new float[RANGE]; init(data); - testFloatM15(data); - verify("testFloatM15", data, goldFloatM15); + testFloatM14(data); + verify("testFloatM14", data, goldFloatM14); } @Test @@ -8578,27 +8960,27 @@ public static void runFloatM15() { applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // CPU: avx512 -> vector_width: 64 -> elements in vector: 16 - // positive byte_offset 60 can lead to cyclic dependency + // positive byte_offset 56 can lead to cyclic dependency @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, - applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 60"}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8", "MaxVectorSize", "<= 56"}, applyIfCPUFeature = {"avx512", "true"}) // CPU: asimd -> vector_width: 32 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 8"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testFloatP15(float[] data) { - for (int j = 0; j < RANGE - 15; j++) { - data[j + 15] = (float)(data[j] * (float)1.001f); + public static void testFloatP14(float[] data) { + for (int j = 0; j < RANGE - 14; j++) { + data[j + 14] = (float)(data[j] * (float)1.001f); } } - @Run(test = "testFloatP15") + @Run(test = "testFloatP14") @Warmup(0) - public static void runFloatP15() { + public static void runFloatP14() { float[] data = new float[RANGE]; init(data); - testFloatP15(data); - verify("testFloatP15", data, goldFloatP15); + testFloatP14(data); + verify("testFloatP14", data, goldFloatP14); } @Test @@ -9958,47 +10340,31 @@ public static void runDoubleP8() { @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeatureAnd = {"avx", "true", "avx512", "false"}) // CPU: avx512 -> vector_width: 64 -> elements in vector: 8 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"avx512", "true"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeature = {"avx512", "true"}) // CPU: asimd -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - // Strict alignment not possible. - @IR(failOn = {IRNode.LOAD_VECTOR, IRNode.MUL_V, IRNode.STORE_VECTOR}, - applyIf = {"AlignVector", "true"}, - applyIfCPUFeature = {"asimd", "true"}) - public static void testDoubleM15(double[] data) { - for (int j = 15; j < RANGE; j++) { - data[j + -15] = (double)(data[j] * (double)1.001); + public static void testDoubleM14(double[] data) { + for (int j = 14; j < RANGE; j++) { + data[j + -14] = (double)(data[j] * (double)1.001); } } - @Run(test = "testDoubleM15") + @Run(test = "testDoubleM14") @Warmup(0) - public static void runDoubleM15() { + public static void runDoubleM14() { double[] data = new double[RANGE]; init(data); - testDoubleM15(data); - verify("testDoubleM15", data, goldDoubleM15); + testDoubleM14(data); + verify("testDoubleM14", data, goldDoubleM14); } @Test @@ -10006,6 +10372,10 @@ public static void runDoubleM15() { @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) + // Vectorize when strict alignment guaranteed. + @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, + applyIfAnd = {"AlignVector", "true", "MaxVectorSize", ">= 16"}, + applyIfCPUFeatureAnd = {"sse4.1", "true", "avx", "false"}) // CPU: avx and avx2 -> vector_width: 32 -> elements in vector: 4 @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, @@ -10018,19 +10388,19 @@ public static void runDoubleM15() { @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">= 16"}, applyIfCPUFeature = {"asimd", "true"}) - public static void testDoubleP15(double[] data) { - for (int j = 0; j < RANGE - 15; j++) { - data[j + 15] = (double)(data[j] * (double)1.001); + public static void testDoubleP14(double[] data) { + for (int j = 0; j < RANGE - 14; j++) { + data[j + 14] = (double)(data[j] * (double)1.001); } } - @Run(test = "testDoubleP15") + @Run(test = "testDoubleP14") @Warmup(0) - public static void runDoubleP15() { + public static void runDoubleP14() { double[] data = new double[RANGE]; init(data); - testDoubleP15(data); - verify("testDoubleP15", data, goldDoubleP15); + testDoubleP14(data); + verify("testDoubleP14", data, goldDoubleP14); } @Test From a44082b61f22dcdee115697f34d39c1d8382a15d Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Wed, 8 Mar 2023 11:28:11 +0100 Subject: [PATCH 32/34] TestDependencyOffsets.java: add vanilla run --- .../superword/TestDependencyOffsets.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java b/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java index 6828a5b72ec03..9130571a406ac 100644 --- a/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java +++ b/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java @@ -89,6 +89,24 @@ * */ +/* + * @test id=vanilla-A + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets vanilla-A + */ + +/* + * @test id=vanilla-U + * @bug 8298935 + * @summary Test SuperWord: vector size, offsets, dependencies, alignment. + * @requires vm.compiler2.enabled + * @library /test/lib / + * @run driver compiler.loopopts.superword.TestDependencyOffsets vanilla-U + */ + /* * @test id=sse4-v016-A * @bug 8298935 @@ -1255,6 +1273,12 @@ public static void main(String args[]) { } switch (args[0]) { + case "vanilla-A": + framework.addFlags("-XX:+AlignVector"); + break; + case "vanilla-U": + framework.addFlags("-XX:-AlignVector"); + break; case "sse4-v016-A": framework.addFlags("-XX:UseSSE=4", "-XX:MaxVectorSize=16", "-XX:+AlignVector"); break; From 216bb1a02750ddacdbff5cfc6d7386cf0ce2bf22 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Thu, 9 Mar 2023 14:28:57 +0100 Subject: [PATCH 33/34] A little renaming and improved comments --- src/hotspot/share/opto/superword.cpp | 76 ++++++++++++++++------------ src/hotspot/share/opto/superword.hpp | 12 +++-- 2 files changed, 51 insertions(+), 37 deletions(-) diff --git a/src/hotspot/share/opto/superword.cpp b/src/hotspot/share/opto/superword.cpp index 3f453bd532089..76aa3e6784218 100644 --- a/src/hotspot/share/opto/superword.cpp +++ b/src/hotspot/share/opto/superword.cpp @@ -642,12 +642,10 @@ void SuperWord::find_adjacent_refs() { } } - // Create initial pack pairs of memory operations for which - // alignment is set and vectors will be aligned. - bool create_pack = is_mem_ref_alignment_ok(mem_ref, iv_adjustment, align_to_ref_p, - best_align_to_mem_ref, best_iv_adjustment, - align_to_refs); - if (create_pack) { + if (can_create_pairs(mem_ref, iv_adjustment, align_to_ref_p, + best_align_to_mem_ref, best_iv_adjustment, + align_to_refs)) { + // Create initial pack pairs of memory operations for which alignment was set. for (uint i = 0; i < memops.size(); i++) { Node* s1 = memops.at(i); int align = alignment(s1); @@ -667,7 +665,9 @@ void SuperWord::find_adjacent_refs() { } } } - } else { // Don't create unaligned pack + } else { + // Cannot create pairs for mem_ref. Reject all related memops forever. + // First, remove remaining memory ops of the same memory slice from the list. for (int i = memops.size() - 1; i >= 0; i--) { MemNode* s = memops.at(i)->as_Mem(); @@ -754,18 +754,24 @@ void SuperWord::find_adjacent_refs_trace_1(Node* best_align_to_mem_ref, int best } #endif -// Check if alignment of mem_ref permissible on hardware, and if it is consistent with -// the other packs of the same memory slice. -bool SuperWord::is_mem_ref_alignment_ok(MemNode* mem_ref, int iv_adjustment, SWPointer &align_to_ref_p, - MemNode* best_align_to_mem_ref, int best_iv_adjustment, - Node_List &align_to_refs) { +// Check if we can create the pack pairs for mem_ref: +// If required, enforce strict alignment requirements of hardware. +// Else, check that we create no pair over the "alignment boundary" of +// the memory slice, so that the indepencence of the pack is guaranteed. +bool SuperWord::can_create_pairs(MemNode* mem_ref, int iv_adjustment, SWPointer &align_to_ref_p, + MemNode* best_align_to_mem_ref, int best_iv_adjustment, + Node_List &align_to_refs) { bool is_aligned_with_best = memory_alignment(mem_ref, best_iv_adjustment) == 0; if (vectors_should_be_aligned()) { - // All vectors need to be vector length aligned. We use best_align_to_mem_ref to adjust - // the pre-loop limit such that all vector memory accesses are vector aligned. Hence, we - // must ensure that all mem_refs that we vectorize are aligned with best_align_to_mem_ref. - // These 3 conditions must be fulfilled: + // All vectors need to be memory aligned, modulo their vector_width. This is more strict + // than the hardware probably requires. Most hardware at most requires 4-byte alignment. + // + // In the pre-loop, we align best_align_to_mem_ref to its vector_length. To ensure that + // all mem_ref's are memory aligned modulo their vector_width, we only need to check that + // they are all aligned to best_align_to_mem_ref, modulo their vector_width. For that, + // we check the following 3 conditions. + // (1) All packs are aligned with best_align_to_mem_ref. if (!is_aligned_with_best) { return false; @@ -774,9 +780,8 @@ bool SuperWord::is_mem_ref_alignment_ok(MemNode* mem_ref, int iv_adjustment, SWP int vw = vector_width(mem_ref); int vw_best = vector_width(best_align_to_mem_ref); if (vw > vw_best) { - // Do not vectorize a memory access with more elements per vector - // if unaligned memory access is not allowed because number of - // iterations in pre-loop will be not enough to align it. + // We only align to vector_width of best_align_to_mem_ref during pre-loop. + // A mem_ref with a larger vector_width might thus not be vector_width aligned. return false; } // (3) Ensure that all vectors have the same invariant. We model memory accesses like this @@ -790,24 +795,31 @@ bool SuperWord::is_mem_ref_alignment_ok(MemNode* mem_ref, int iv_adjustment, SWP } return true; } else { - // Alignment is not required by the hardware. However, we still have to make sure that - // the memory accesses do not form a cyclic dependency. - - // We have a compiler hint, so do not check alignment with other packs. For now we trust - // the hint. We may create cyclic dependencies (packs that are not independent). Later - // we will filter out packs that are not internally independent. - // This allows us to vectorize cases like this (forward read): - // for (int i ...) { v[i] = v[i + 1] + 5; } - // And the filtering still removes non-vectorizable cases like this (forward write): - // for (int i ...) { v[i + 1] = v[i] + 5; } + // Alignment is not required by the hardware. + + // However, we need to ensure that the pack for mem_ref is independent, i.e. all members + // of the pack are mutually independent. + if (_do_vector_loop) { + // Wait until combine_packs to check independence of packs. For now we just know that + // the adjacent pairs are independent. This allows us to vectorize when we do not have + // alignment modulo vector_width. For example (forward read): + // for (int i ...) { v[i] = v[i + 1] + 5; } + // The following will be filtered out in combine_packs (forward write): + // for (int i ...) { v[i + 1] = v[i] + 5; } return true; } - // An easy way to prevent cyclic dependencies is to require all mem_refs of the same slice - // to be exactly aligned. This allows us to vectorize these cases: + // If all mem_ref's are modulo vector_width aligned with all other mem_ref's of their + // memory slice, then the VectorLoad / VectorStore regions are either exactly overlapping + // or completely non-overlapping. This ensures that there cannot be memory-dependencies + // between different vector "lanes". + // During SuperWord::filter_packs -> SuperWord::profitable -> SuperWord::is_vector_use, + // we check that all inputs are vectors that match on every element (with some reasonable + // exceptions). This ensures that every "lane" is isomorpic and independent to all other + // "lanes". This allows us to vectorize these cases: // for (int i ...) { v[i] = v[i] + 5; } // same alignment - // for (int i ...) { v[i] = v[i + 32] + 5; } // alignment modulo vector size + // for (int i ...) { v[i] = v[i + 32] + 5; } // alignment modulo vector_width if (same_memory_slice(mem_ref, best_align_to_mem_ref)) { return is_aligned_with_best; } else { diff --git a/src/hotspot/share/opto/superword.hpp b/src/hotspot/share/opto/superword.hpp index 539c9ae9ff046..a8b3c1e871cbb 100644 --- a/src/hotspot/share/opto/superword.hpp +++ b/src/hotspot/share/opto/superword.hpp @@ -476,11 +476,13 @@ class SuperWord : public ResourceObj { void find_adjacent_refs_trace_1(Node* best_align_to_mem_ref, int best_iv_adjustment); void print_loop(bool whole); #endif - // Check if alignment of mem_ref permissible on hardware, - // and if it is consistent with the other packs of the . - bool is_mem_ref_alignment_ok(MemNode* mem_ref, int iv_adjustment, SWPointer &align_to_ref_p, - MemNode* best_align_to_mem_ref, int best_iv_adjustment, - Node_List &align_to_refs); + // Check if we can create the pack pairs for mem_ref: + // If required, enforce strict alignment requirements of hardware. + // Else, check that we create no pair over the "alignment boundary" of + // the memory slice, so that the indepencence of the pack is guaranteed. + bool can_create_pairs(MemNode* mem_ref, int iv_adjustment, SWPointer &align_to_ref_p, + MemNode* best_align_to_mem_ref, int best_iv_adjustment, + Node_List &align_to_refs); // Check if alignment of mem_ref is consistent with the other packs of the same memory slice. bool is_mem_ref_aligned_with_same_memory_slice(MemNode* mem_ref, int iv_adjustment, Node_List &align_to_refs); // Find a memory reference to align the loop induction variable to. From ef61acd53f43505ec9f6dde9b66f096592f5b0a8 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Thu, 9 Mar 2023 14:40:21 +0100 Subject: [PATCH 34/34] Fixed wording from last commit --- src/hotspot/share/opto/superword.cpp | 4 ++-- src/hotspot/share/opto/superword.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hotspot/share/opto/superword.cpp b/src/hotspot/share/opto/superword.cpp index 76aa3e6784218..0a75262cdb86a 100644 --- a/src/hotspot/share/opto/superword.cpp +++ b/src/hotspot/share/opto/superword.cpp @@ -756,8 +756,8 @@ void SuperWord::find_adjacent_refs_trace_1(Node* best_align_to_mem_ref, int best // Check if we can create the pack pairs for mem_ref: // If required, enforce strict alignment requirements of hardware. -// Else, check that we create no pair over the "alignment boundary" of -// the memory slice, so that the indepencence of the pack is guaranteed. +// Else, only enforce alignment within a memory slice, so that there cannot be any +// memory-dependence between different vector "lanes". bool SuperWord::can_create_pairs(MemNode* mem_ref, int iv_adjustment, SWPointer &align_to_ref_p, MemNode* best_align_to_mem_ref, int best_iv_adjustment, Node_List &align_to_refs) { diff --git a/src/hotspot/share/opto/superword.hpp b/src/hotspot/share/opto/superword.hpp index a8b3c1e871cbb..4d9efe2eeb210 100644 --- a/src/hotspot/share/opto/superword.hpp +++ b/src/hotspot/share/opto/superword.hpp @@ -478,8 +478,8 @@ class SuperWord : public ResourceObj { #endif // Check if we can create the pack pairs for mem_ref: // If required, enforce strict alignment requirements of hardware. - // Else, check that we create no pair over the "alignment boundary" of - // the memory slice, so that the indepencence of the pack is guaranteed. + // Else, only enforce alignment within a memory slice, so that there cannot be any + // memory-dependence between different vector "lanes". bool can_create_pairs(MemNode* mem_ref, int iv_adjustment, SWPointer &align_to_ref_p, MemNode* best_align_to_mem_ref, int best_iv_adjustment, Node_List &align_to_refs);