Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2217439/?format=api
{ "id": 2217439, "url": "http://patchwork.ozlabs.org/api/patches/2217439/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/ormrzr8bm5.fsf@lxoliva.fsfla.org/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api", "name": "GNU Compiler Collection", "link_name": "gcc", "list_id": "gcc-patches.gcc.gnu.org", "list_email": "gcc-patches@gcc.gnu.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<ormrzr8bm5.fsf@lxoliva.fsfla.org>", "list_archive_url": null, "date": "2026-03-29T05:10:10", "name": "testsuite: x86: vect_double should require SSE2", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "56dc23bc0db1a6b9eaea90d03b7485aaacce5df3", "submitter": { "id": 74937, "url": "http://patchwork.ozlabs.org/api/people/74937/?format=api", "name": "Alexandre Oliva", "email": "oliva@adacore.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/ormrzr8bm5.fsf@lxoliva.fsfla.org/mbox/", "series": [ { "id": 497906, "url": "http://patchwork.ozlabs.org/api/series/497906/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=497906", "date": "2026-03-29T05:10:10", "name": "testsuite: x86: vect_double should require SSE2", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/497906/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2217439/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2217439/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256\n header.s=google header.b=HyvQ+RLb;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org;\n\tdkim=pass (2048-bit key,\n secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256\n header.s=google header.b=HyvQ+RLb", "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=adacore.com", "sourceware.org; spf=pass smtp.mailfrom=adacore.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=209.85.222.44" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fk2YB2tchz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 29 Mar 2026 16:11:42 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 0626A4B9DB47\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 29 Mar 2026 05:11:40 +0000 (GMT)", "from mail-ua1-f44.google.com (mail-ua1-f44.google.com\n [209.85.222.44])\n by sourceware.org (Postfix) with ESMTPS id BAB1F4B9DB4A\n for <gcc-patches@gcc.gnu.org>; Sun, 29 Mar 2026 05:10:26 +0000 (GMT)", "by mail-ua1-f44.google.com with SMTP id\n a1e0cc1a2514c-953ad5a55b7so324395241.3\n for <gcc-patches@gcc.gnu.org>; Sat, 28 Mar 2026 22:10:26 -0700 (PDT)", "from free.home ([2804:14c:4d1:41a6::1455])\n by smtp.gmail.com with ESMTPSA id\n ada2fe7eead31-60512a1dc2asm4354602137.4.2026.03.28.22.10.24\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sat, 28 Mar 2026 22:10:25 -0700 (PDT)", "from livre (livre.home [172.31.160.2])\n by free.home (8.15.2/8.15.2) with ESMTPS id 62T5AAq0016850\n (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n Sun, 29 Mar 2026 02:10:11 -0300" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 0626A4B9DB47", "OpenDKIM Filter v2.11.0 sourceware.org BAB1F4B9DB4A" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org BAB1F4B9DB4A", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org BAB1F4B9DB4A", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774761026; cv=none;\n b=UApI9SNr7ssFiHPQ4B2CxKWJyB3Ue8ALGntKFkCW+JzJdoJ7WKNjXV7sjoKUoGXICJMxO3l1rKEfsKfCAtZHfQRyZapXzxwIrkdbWHedU3fgTX6YA50rPfC9/RIM+38zm0Q3uedUTmcZghBKWEHWg3Fs9oTy9PpB0deQC7NaApA=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1774761026; c=relaxed/simple;\n bh=Q3UH3ce7b1r7OTfNJbr9fm4N1g/pmlHASHrLSmLBDGE=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=ti6yZi+CsAGuiP/4Y+1TD0jWNjjeLK1ejemVUjcGi6m/huNJ58NvohB+cMwXDho28vC6rATpHYIX2orEjFTATMe3tATUOKaWU+kyEcTxJUfR3TjEx0qsp00gvEhMzIhNyLFdJ1/fxeVHjwuxjkVusbU0N5ajoKUjoWTSYr91/Ho=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=adacore.com; s=google; t=1774761026; x=1775365826; darn=gcc.gnu.org;\n h=mime-version:user-agent:message-id:date:organization:subject:cc:to\n :from:from:to:cc:subject:date:message-id:reply-to;\n bh=CZTrOgrbPKM0ZzejaRNJn7fl0wD2blgagiKYKr3ERUE=;\n b=HyvQ+RLb253WIaAAK3MydT8zlUn8upaVOXK1xMsZxw6qc63vAhy3KBSb+bYHBUr1GR\n Xwfvv3AymUHDm6f0jaiykat0l2Zk4x9hUOHNcZmDMbopdYFz80hN45sVngsUog9ewEn5\n /XoP5/4UO82yKPaO+atEJ2qjYDUm21awK/MeEoRR7N8KHepe4JGcL6aw3M/3eYofQ2Yo\n ejz/LEPXjtgcWSWDQsYVtyWTuAFvqgHBe1vZX3hKqzIOFaaU8lcsQ21VKcGAOP2EhGi7\n VSAFjfgN2s6PJ0N0QTSyV3WS9P/6TyvcsGGgPuKcrdejlBrcuGaLl3xnwbjNRImk0Gdn\n a2fA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774761026; x=1775365826;\n h=mime-version:user-agent:message-id:date:organization:subject:cc:to\n :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=CZTrOgrbPKM0ZzejaRNJn7fl0wD2blgagiKYKr3ERUE=;\n b=UGrPiK2JXEX5+K26ZvzwGBPzvj0218fqBNb/2RdFC3mfUvWUGxWRwM3gHPuRk/STGl\n 2NheRWT98K7aNFutaajMD48KTl5RGAsMTl8s+n7Y4eX/U7NnSHm6BTPj6qN+03XDnmcm\n 0vegRl1puaAYiLQFpGjrIFUbkIbhIrCFKYbJS9C97tYTwjt6nPBaQ1bx6lxlYV3JyMhT\n zIH0BMXyvtLIV+xbTLVG0A5DhsUKXbBmJiKfSsqknl0JR2o+NCkD3F8VTezzGuWtMTTi\n fqGVirEzFovGvZl8vNOUdURdbNwrWX4OB5Z8zy8ogvpahhByA9JZgyiy7sEDYH6JHlCt\n 1Meg==", "X-Gm-Message-State": "AOJu0YwhYEr7/oZ32E3HDWSVJYDwlrkS9Kzc3t0JpUxWbNnR0cXn1ZAm\n qxqIhOO6N1RXLM8bm4aoGK4L7DTEZ8DLmsJhQs4OOYfmD1twdNmibl8qDgCwgt8lkPuDgbG1W2P\n A7bo=", "X-Gm-Gg": "ATEYQzy8WRuh4ehAhoEYta+Pnm4yuxMG33SIzTy25mzjVSFJJVsaLu1j7mOfu+ZO8+y\n LtymuDtVALMtZ21gV11puc8g2h4x3RBdDn4lJtQ1mrFRlGAYlQpaynWxkDknBTnNJ+kN8ewQotD\n 0jfB3iwiSybLJYPvZBbEEREaL0hjWNmgFSKBieZABKyui2vTY2sVUHW7n/PSuptgWzkcdX7WVL6\n J4xpFCpW1WB+XUhuwIF0VNK4wUXdzrq0VD4qSOYeCuxUYCo1ELp6auf2sKqjujE68W8toPvRzJt\n yAhnItD5KQ535MJBRFzK+nnASfye3tismL4P+l7Y2uCC4trsPwlUQKP8Fx7S6TOW1/QmQkrkE04\n qgKmF62t1s6BnEBF9UglFX/3oPyAMIQOndAGxEv3Jr5+zR5iVM0oXv24FrO/Td84JkAYhyIXs99\n A=", "X-Received": "by 2002:a05:6102:54a9:b0:604:e315:6eb1 with SMTP id\n ada2fe7eead31-604f912e352mr3484907137.14.1774761025848;\n Sat, 28 Mar 2026 22:10:25 -0700 (PDT)", "From": "Alexandre Oliva <oliva@adacore.com>", "To": "gcc-patches@gcc.gnu.org", "Cc": "Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>, Mike Stump\n <mikestump@comcast.net>, Jan Hubicka <hubicka@ucw.cz>,\n Uros Bizjak <ubizjak@gmail.com>, Richard Biener <rguenther@suse.de>,\n Tamar Christina <tamar.christina@arm.com>, Zdenek Dvorak <ook@ucw.cz>", "Subject": "[PATCH] testsuite: x86: vect_double should require SSE2", "Organization": "Free thinker, does not speak for AdaCore", "Date": "Sun, 29 Mar 2026 02:10:10 -0300", "Message-ID": "<ormrzr8bm5.fsf@lxoliva.fsfla.org>", "User-Agent": "Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Scanned-By": "MIMEDefang 2.84", "X-BeenThere": "gcc-patches@gcc.gnu.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Gcc-patches mailing list <gcc-patches.gcc.gnu.org>", "List-Unsubscribe": "<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>", "List-Archive": "<https://gcc.gnu.org/pipermail/gcc-patches/>", "List-Post": "<mailto:gcc-patches@gcc.gnu.org>", "List-Help": "<mailto:gcc-patches-request@gcc.gnu.org?subject=help>", "List-Subscribe": "<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>", "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org" }, "content": "g++.dg/alias-checks.C requires vect_double outside vect.exp, where\n-msse2 would have got enabled, but that effective_target passes even\nwhen SSE2 is indeed disabled and we're testing on ancient 32-bit\nhardware that doesn't even support SSE2. Without SSE2, vectors of\ndoubles aren't really available, and so we don't get the expected\nvectorizations and the test fails.\n\nISTM, from the way vect_double is documented, that testing for\nsse2_runtime would be called for, but that feels excessive: since\nvect.exp enables -msse2 for compile-time vect tests, even when runtime\nsupport is not present, we should ideally be able to exercise\ncompile-time vect_double tests. But we can't test for (let alone\ncache results) with test- or testset compiler flags, or with compiler\nmacros they'd define, or even depending on whether we're running a\ncompile- or run-time test. (The preexisting tests for __tune_atom__\nmake me uncomfortable already.)\n\nSo I'm sticking to the documented behavior of vect_double, even if\nthat will lose us some compile-time vect_double testing on targets\nthat can't run SSE2 code. Most x86 variants in use have SSE2 anyway,\nso it's probably not a significant loss.\n\nI've amended vect_doubleint_cvt and vect_intdouble_cvt while at that,\nthough there aren't any failing uses thereof AFAICT.\n\nBut then, when we attempt to test alias-checks.C on a target that\nsupports SSE2, but doesn't have it enabled, vect_double passes and we\nstill don't get the desired vectorization, because we haven't enabled\nit. Instead of adding machine-specific options to alias-checks.C, I'm\nmoving it under g++.dg/vect/ and renaming it so that it gets, and\ndoesn't override, the default vector options for each platform.\n\nRegstrapped on x86_64-linux-gnu. Also tested with ppc-vx7r2,\nppc64-vx7r2, arm-vx7r2, aarch64-vx7r2, x86_64-vx7r2, and x86-vx7r2. Ok\nto install?\n\n\nfor gcc/testsuite/ChangeLog\n\n\t* lib/target-supports.exp\n\t(check_effective_target_vect_double): Check for sse2_runtime.\n\t(check_effective_target_vect_doubleint_cvt): Likewise.\n\t(check_effective_target_vect_intdouble_cvt): Likewise.\n\t* g++.dg/alias-checks.C: Rename to...\n\t* g++.dg/vect/vect-alias-checks.C: ... this. Don't override\n\tvector options.\n---\n gcc/testsuite/g++.dg/alias-checks.C | 86 -------------------------\n gcc/testsuite/g++.dg/vect/vect-alias-checks.C | 86 +++++++++++++++++++++++++\n gcc/testsuite/lib/target-supports.exp | 3 +\n 3 files changed, 89 insertions(+), 86 deletions(-)\n delete mode 100644 gcc/testsuite/g++.dg/alias-checks.C\n create mode 100644 gcc/testsuite/g++.dg/vect/vect-alias-checks.C", "diff": "diff --git a/gcc/testsuite/g++.dg/alias-checks.C b/gcc/testsuite/g++.dg/alias-checks.C\ndeleted file mode 100644\nindex b8ff3ad605c23..0000000000000\n--- a/gcc/testsuite/g++.dg/alias-checks.C\n+++ /dev/null\n@@ -1,86 +0,0 @@\n-\n-// { dg-do compile }\n-// { dg-require-effective-target c++17 }\n-// { dg-require-effective-target vect_double }\n-// { dg-options \"-O3 -fdump-tree-vect-all\" }\n-// { dg-skip-if \"required hosted libstdc++ for cmath and iostream\" { ! hostedlib } }\n-\n-#include <cstdlib>\n-#include <cmath>\n-#include <iostream>\n-void DoIfClause(double *l, double *r, const double *m2, const double *m1,\n- const double *c, const double *p1, const double *p2, int istart, int iend)\n-{\n- constexpr double w5alpha[3][3] = {{1.0 / 3.0, -7.0 / 6.0, 11.0 / 6.0},\n- {-1.0 / 6.0, 5.0 / 6.0, 1.0 / 3.0},\n- {1.0 / 3.0, 5.0 / 6.0, -1.0 / 6.0}};\n- constexpr double w5gamma[3] = {0.1, 0.6, 0.3};\n- constexpr double eps = 1e-100;\n- constexpr double thirteen_thirds = 13.0 / 3.0;\n-\n- for (int i = istart; i <= iend; ++i) {\n- const double q0 = m2[i];\n- const double q1 = m1[i];\n- const double q2 = c[i];\n- const double q3 = p1[i];\n- const double q4 = p2[i];\n- double &ql = l[i];\n- double &qr = r[i];\n- double a = q0 - 2 * q1 + q2;\n- double b = q0 - 4.0 * q1 + 3.0 * q2;\n- double beta0 = thirteen_thirds * a * a + b * b + eps;\n- a = q1 - 2.0 * q2 + q3;\n- b = q3 - q1;\n- double beta1 = thirteen_thirds * a * a + b * b + eps;\n- a = q2 - 2.0 * q3 + q4;\n- b = q4 - 4.0 * q3 + 3.0 * q2;\n- double beta2 = thirteen_thirds * a * a + b * b + eps;\n- const double tau5 = std::abs(beta2 - beta0);\n-\n- beta0 = (beta0 + tau5) / beta0;\n- beta1 = (beta1 + tau5) / beta1;\n- beta2 = (beta2 + tau5) / beta2;\n-\n- double w0 = w5gamma[0] * beta0 + eps;\n- double w1 = w5gamma[1] * beta1 + eps;\n- double w2 = w5gamma[2] * beta2 + eps;\n- double wsum = 1.0 / (w0 + w1 + w2);\n- ql = w0 * (w5alpha[0][0] * q0 + w5alpha[0][1] * q1 + w5alpha[0][2] * q2);\n- ql += w1 * (w5alpha[1][0] * q1 + w5alpha[1][1] * q2 + w5alpha[1][2] * q3);\n- ql += w2 * (w5alpha[2][0] * q2 + w5alpha[2][1] * q3 + w5alpha[2][2] * q4);\n- ql *= wsum;\n- const double alpha_l = 3.0 * wsum * w0 * w1 * w2 /\n- (w5gamma[2] * w0 * w1 + w5gamma[1] * w0 * w2 +\n- w5gamma[0] * w1 * w2) +\n- eps;\n-\n- w0 = w5gamma[0] * beta2 + eps;\n- w1 = w5gamma[1] * beta1 + eps;\n- w2 = w5gamma[2] * beta0 + eps;\n- wsum = 1.0 / (w0 + w1 + w2);\n- qr = w0 * (w5alpha[0][0] * q4 + w5alpha[0][1] * q3 + w5alpha[0][2] * q2);\n- qr += w1 * (w5alpha[1][0] * q3 + w5alpha[1][1] * q2 + w5alpha[1][2] * q1);\n- qr += w2 * (w5alpha[2][0] * q2 + w5alpha[2][1] * q1 + w5alpha[2][2] * q0);\n- qr *= wsum;\n- const double alpha_r = 3.0 * wsum * w0 * w1 * w2 /\n- (w5gamma[2] * w0 * w1 + w5gamma[1] * w0 * w2 +\n- w5gamma[0] * w1 * w2) +\n- eps;\n-\n- double dq = q3 - q2;\n- {\n- const double dm = q2 - q1;\n- const double dp = dq;\n- const double dc = (dm * dp > 0.0) * 0.5 * (dm + dp);\n- dq = 0.5 * std::copysign(\n- std::min(std::fabs(dc),\n- 2.0 * std::min(std::fabs(dm), std::fabs(dp))),\n- dc);\n- }\n-\n- const double alpha_lin = 2.0 * alpha_l * alpha_r / (alpha_l + alpha_r);\n- ql = alpha_lin * ql + (1.0 - alpha_lin) * (q2 + dq);\n- qr = alpha_lin * qr + (1.0 - alpha_lin) * (q2 - dq);\n- }\n-}\n-/* { dg-final { scan-tree-dump \"LOOP VECTORIZED\" \"vect\" } } */\ndiff --git a/gcc/testsuite/g++.dg/vect/vect-alias-checks.C b/gcc/testsuite/g++.dg/vect/vect-alias-checks.C\nnew file mode 100644\nindex 0000000000000..97c97d2c99e0d\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/vect/vect-alias-checks.C\n@@ -0,0 +1,86 @@\n+\n+// { dg-do compile }\n+// { dg-require-effective-target c++17 }\n+// { dg-require-effective-target vect_double }\n+// { dg-additional-options \"-O3 -fdump-tree-vect-all\" }\n+// { dg-skip-if \"required hosted libstdc++ for cmath and iostream\" { ! hostedlib } }\n+\n+#include <cstdlib>\n+#include <cmath>\n+#include <iostream>\n+void DoIfClause(double *l, double *r, const double *m2, const double *m1,\n+ const double *c, const double *p1, const double *p2, int istart, int iend)\n+{\n+ constexpr double w5alpha[3][3] = {{1.0 / 3.0, -7.0 / 6.0, 11.0 / 6.0},\n+ {-1.0 / 6.0, 5.0 / 6.0, 1.0 / 3.0},\n+ {1.0 / 3.0, 5.0 / 6.0, -1.0 / 6.0}};\n+ constexpr double w5gamma[3] = {0.1, 0.6, 0.3};\n+ constexpr double eps = 1e-100;\n+ constexpr double thirteen_thirds = 13.0 / 3.0;\n+\n+ for (int i = istart; i <= iend; ++i) {\n+ const double q0 = m2[i];\n+ const double q1 = m1[i];\n+ const double q2 = c[i];\n+ const double q3 = p1[i];\n+ const double q4 = p2[i];\n+ double &ql = l[i];\n+ double &qr = r[i];\n+ double a = q0 - 2 * q1 + q2;\n+ double b = q0 - 4.0 * q1 + 3.0 * q2;\n+ double beta0 = thirteen_thirds * a * a + b * b + eps;\n+ a = q1 - 2.0 * q2 + q3;\n+ b = q3 - q1;\n+ double beta1 = thirteen_thirds * a * a + b * b + eps;\n+ a = q2 - 2.0 * q3 + q4;\n+ b = q4 - 4.0 * q3 + 3.0 * q2;\n+ double beta2 = thirteen_thirds * a * a + b * b + eps;\n+ const double tau5 = std::abs(beta2 - beta0);\n+\n+ beta0 = (beta0 + tau5) / beta0;\n+ beta1 = (beta1 + tau5) / beta1;\n+ beta2 = (beta2 + tau5) / beta2;\n+\n+ double w0 = w5gamma[0] * beta0 + eps;\n+ double w1 = w5gamma[1] * beta1 + eps;\n+ double w2 = w5gamma[2] * beta2 + eps;\n+ double wsum = 1.0 / (w0 + w1 + w2);\n+ ql = w0 * (w5alpha[0][0] * q0 + w5alpha[0][1] * q1 + w5alpha[0][2] * q2);\n+ ql += w1 * (w5alpha[1][0] * q1 + w5alpha[1][1] * q2 + w5alpha[1][2] * q3);\n+ ql += w2 * (w5alpha[2][0] * q2 + w5alpha[2][1] * q3 + w5alpha[2][2] * q4);\n+ ql *= wsum;\n+ const double alpha_l = 3.0 * wsum * w0 * w1 * w2 /\n+ (w5gamma[2] * w0 * w1 + w5gamma[1] * w0 * w2 +\n+ w5gamma[0] * w1 * w2) +\n+ eps;\n+\n+ w0 = w5gamma[0] * beta2 + eps;\n+ w1 = w5gamma[1] * beta1 + eps;\n+ w2 = w5gamma[2] * beta0 + eps;\n+ wsum = 1.0 / (w0 + w1 + w2);\n+ qr = w0 * (w5alpha[0][0] * q4 + w5alpha[0][1] * q3 + w5alpha[0][2] * q2);\n+ qr += w1 * (w5alpha[1][0] * q3 + w5alpha[1][1] * q2 + w5alpha[1][2] * q1);\n+ qr += w2 * (w5alpha[2][0] * q2 + w5alpha[2][1] * q1 + w5alpha[2][2] * q0);\n+ qr *= wsum;\n+ const double alpha_r = 3.0 * wsum * w0 * w1 * w2 /\n+ (w5gamma[2] * w0 * w1 + w5gamma[1] * w0 * w2 +\n+ w5gamma[0] * w1 * w2) +\n+ eps;\n+\n+ double dq = q3 - q2;\n+ {\n+ const double dm = q2 - q1;\n+ const double dp = dq;\n+ const double dc = (dm * dp > 0.0) * 0.5 * (dm + dp);\n+ dq = 0.5 * std::copysign(\n+ std::min(std::fabs(dc),\n+ 2.0 * std::min(std::fabs(dm), std::fabs(dp))),\n+ dc);\n+ }\n+\n+ const double alpha_lin = 2.0 * alpha_l * alpha_r / (alpha_l + alpha_r);\n+ ql = alpha_lin * ql + (1.0 - alpha_lin) * (q2 + dq);\n+ qr = alpha_lin * qr + (1.0 - alpha_lin) * (q2 - dq);\n+ }\n+}\n+/* { dg-final { scan-tree-dump \"LOOP VECTORIZED\" \"vect\" } } */\ndiff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp\nindex 3653f322dc3bc..8a8bc8b50df28 100644\n--- a/gcc/testsuite/lib/target-supports.exp\n+++ b/gcc/testsuite/lib/target-supports.exp\n@@ -4840,6 +4840,7 @@ proc check_effective_target_vect_intfloat_cvt { } {\n proc check_effective_target_vect_doubleint_cvt { } {\n return [check_cached_effective_target vect_doubleint_cvt {\n expr { ([check_effective_target_x86]\n+\t && [check_effective_target_sse2_runtime]\n \t && [check_no_compiler_messages vect_doubleint_cvt assembly {\n \t\t #ifdef __tune_atom__\n \t\t # error No double vectorizer support.\n@@ -4863,6 +4864,7 @@ proc check_effective_target_vect_doubleint_cvt { } {\n proc check_effective_target_vect_intdouble_cvt { } {\n return [check_cached_effective_target vect_intdouble_cvt {\n expr { ([check_effective_target_x86]\n+\t && [check_effective_target_sse2_runtime]\n \t && [check_no_compiler_messages vect_intdouble_cvt assembly {\n \t\t #ifdef __tune_atom__\n \t\t # error No double vectorizer support.\n@@ -8473,6 +8475,7 @@ proc check_effective_target_vect_float_strict { } {\n proc check_effective_target_vect_double { } {\n return [check_cached_effective_target vect_double {\n \texpr { ([check_effective_target_x86]\n+\t\t&& [check_effective_target_sse2_runtime]\n \t\t&& [check_no_compiler_messages vect_double assembly {\n \t\t #ifdef __tune_atom__\n \t\t # error No double vectorizer support.\n", "prefixes": [] }