aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2022-02-11 20:27:23 +0100
committerJakub Jelinek <jakub@redhat.com>2022-02-11 20:27:23 +0100
commit9355a8c35883b5125851bb9b4169a1a1cd8e343f (patch)
tree2b46e6c5c3b5318cb963db77da0ea979d6be4981 /gcc/testsuite
parentb56ad95854f0b007afda60c057f10b04666953c9 (diff)
downloadgcc-9355a8c35883b5125851bb9b4169a1a1cd8e343f.zip
gcc-9355a8c35883b5125851bb9b4169a1a1cd8e343f.tar.gz
gcc-9355a8c35883b5125851bb9b4169a1a1cd8e343f.tar.bz2
match.pd: Fix up (X & Y) CMP 0 -> X CMP2 ~Y simplifications [PR104499]
The following testcase ICEs on x86_64-linux, because match.pd emits there a NOP_EXPR cast from int*8 vector type with BLKmode to unsigned*8 vector type with BLKmode and vec-lowering isn't prepared to handle such casts. Fixed by using VIEW_CONVERT_EXPR instead. 2022-02-11 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/104499 * match.pd ((X & Y) CMP 0 -> X CMP2 ~Y): Use view_convert instead of convert. * gcc.c-torture/compile/pr104499.c: New test.
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr104499.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr104499.c b/gcc/testsuite/gcc.c-torture/compile/pr104499.c
new file mode 100644
index 0000000..e5d5cdd
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr104499.c
@@ -0,0 +1,11 @@
+/* PR tree-optimization/104499 */
+
+typedef int __attribute__((__vector_size__ (8 * sizeof (int)))) V;
+
+V v;
+
+void
+foo (void)
+{
+ v = ((1 | v) != 1);
+}