aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2023-06-28 00:21:08 -0700
committerAndrew Pinski <apinski@marvell.com>2023-06-28 00:24:05 -0700
commit857e1f93ff8e3b93a7a3dcca9e50fe32a4c93950 (patch)
tree2b235e86bd1e3007b2abe829c2d99cffb8d37082
parentfe48f2651334bc4d96b6df6b2bb6b29fcb732a83 (diff)
downloadgcc-857e1f93ff8e3b93a7a3dcca9e50fe32a4c93950.zip
gcc-857e1f93ff8e3b93a7a3dcca9e50fe32a4c93950.tar.gz
gcc-857e1f93ff8e3b93a7a3dcca9e50fe32a4c93950.tar.bz2
Add testcase for PR 110444
This testcase was fixed after r14-2135-gd915762ea9043da85 and there was no testcase for it before so adding one is a good thing. Committed as obvious after testing the testcase to make sure it works. gcc/testsuite/ChangeLog: PR tree-optimization/110444 * gcc.c-torture/compile/pr110444-1.c: New test.
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr110444-1.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr110444-1.c b/gcc/testsuite/gcc.c-torture/compile/pr110444-1.c
new file mode 100644
index 0000000..1cdb400
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr110444-1.c
@@ -0,0 +1,11 @@
+/* This used to ICE after SLP during match-and-simplify
+ as real_can_shorten_arithmetic was called with the vector
+ mode. */
+void f(float *a, float *b, float *c, int size)
+{
+ float t[2];
+ t[0] = b[0] - (float)__builtin_pow(c[0], 2);
+ t[1] = b[1] - (float)__builtin_pow(c[1], 2);
+ a[0] = t[0];
+ a[1] = t[1];
+}