public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] testsuite: Add testcase for already fixed PR112518
@ 2023-11-22 10:34 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2023-11-22 10:34 UTC (permalink / raw)
  To: gcc-patches

Hi!

This PR has been fixed by the PR112526 fix.

Tested on x86_64-linux and i686-linux, committed to trunk as obvious.

2023-11-22  Jakub Jelinek  <jakub@redhat.com>

	PR target/65368
	* gcc.target/i386/bmi2-pr112518.c: New test.

--- gcc/testsuite/gcc.target/i386/bmi2-pr112518.c.jj	2023-11-21 19:55:21.948132480 +0100
+++ gcc/testsuite/gcc.target/i386/bmi2-pr112518.c	2023-11-21 19:57:13.694570877 +0100
@@ -0,0 +1,25 @@
+/* PR target/65368 */
+/* { dg-do run { target { bmi2 && int128 } } } */
+/* { dg-options "-Os -mbmi2" } */
+
+#include "bmi2-check.h"
+
+unsigned u;
+int g;
+
+unsigned long long
+foo (int i)
+{
+  unsigned long long x = u;
+  g = __builtin_mul_overflow_p (u, ((unsigned __int128) 4292468825) << 64 | 150, 0);
+  x |= g % i;
+  return x;
+}
+
+static __attribute__((noipa)) void
+bmi2_test ()
+{
+  unsigned long long x = foo (3);
+  if (x)
+    __builtin_abort ();
+}

	Jakub


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-22 10:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-22 10:34 [committed] testsuite: Add testcase for already fixed PR112518 Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).