public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8838] middle-end: add additional runtime test for [PR113467]
@ 2024-02-07 10:57 Tamar Christina
0 siblings, 0 replies; only message in thread
From: Tamar Christina @ 2024-02-07 10:57 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:194d0956ef5992d4e453bde3eb5772dc077f610c
commit r14-8838-g194d0956ef5992d4e453bde3eb5772dc077f610c
Author: Tamar Christina <tamar.christina@arm.com>
Date: Wed Feb 7 10:57:05 2024 +0000
middle-end: add additional runtime test for [PR113467]
This just adds an additional runtime testcase for the fixed issue.
gcc/testsuite/ChangeLog:
PR tree-optimization/113467
* gcc.dg/vect/vect-early-break_110-pr113467.c: New test.
Diff:
---
.../gcc.dg/vect/vect-early-break_110-pr113467.c | 52 ++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_110-pr113467.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_110-pr113467.c
new file mode 100644
index 000000000000..1e2c47be5fdf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_110-pr113467.c
@@ -0,0 +1,52 @@
+/* { dg-add-options vect_early_break } */
+/* { dg-require-effective-target vect_early_break } */
+/* { dg-require-effective-target vect_long_long } */
+
+/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */
+
+#include "tree-vect.h"
+#include <stdint.h>
+
+typedef struct gcry_mpi *gcry_mpi_t;
+struct gcry_mpi {
+ int nlimbs;
+ unsigned long *d;
+};
+
+long gcry_mpi_add_ui_up;
+void gcry_mpi_add_ui(gcry_mpi_t w, gcry_mpi_t u, unsigned v) {
+ gcry_mpi_add_ui_up = *w->d;
+ if (u) {
+ uint64_t *res_ptr = w->d, *s1_ptr = w->d;
+ int s1_size = u->nlimbs;
+ unsigned s2_limb = v, x = *s1_ptr++;
+ s2_limb += x;
+ *res_ptr++ = s2_limb;
+ if (x)
+ while (--s1_size) {
+ x = *s1_ptr++ + 1;
+ *res_ptr++ = x;
+ if (x) {
+ break;
+ }
+ }
+ }
+}
+
+int main()
+{
+ check_vect ();
+
+ static struct gcry_mpi sv;
+ static uint64_t vals[] = {4294967288ULL, 191ULL, 4160749568ULL, 4294963263ULL,
+ 127ULL, 4294950912ULL, 255ULL, 4294901760ULL,
+ 534781951ULL, 33546240ULL, 4294967292ULL, 4294960127ULL,
+ 4292872191ULL, 4294967295ULL, 4294443007ULL, 3ULL};
+ gcry_mpi_t v = &sv;
+ v->nlimbs = 16;
+ v->d = vals;
+
+ gcry_mpi_add_ui(v, v, 8);
+ if (v->d[1] != 192)
+ __builtin_abort();
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-07 10:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-07 10:57 [gcc r14-8838] middle-end: add additional runtime test for [PR113467] Tamar Christina
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).