parent
b3fb15ac59
commit
85591675cb
@ -0,0 +1,48 @@
|
||||
2022-04-01 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/105123
|
||||
* config/i386/i386-expand.c (ix86_expand_vector_init_general): Avoid
|
||||
using word as target for expand_simple_binop when doing ASHIFT and
|
||||
IOR.
|
||||
|
||||
* gcc.target/i386/pr105123.c: New test.
|
||||
|
||||
--- gcc/config/i386/i386-expand.c.jj 2022-03-19 13:52:53.000000000 +0100
|
||||
+++ gcc/config/i386/i386-expand.c 2022-04-01 16:51:27.253154191 +0200
|
||||
@@ -14479,9 +14479,9 @@ quarter:
|
||||
else
|
||||
{
|
||||
word = expand_simple_binop (word_mode, ASHIFT, word, shift,
|
||||
- word, 1, OPTAB_LIB_WIDEN);
|
||||
+ NULL_RTX, 1, OPTAB_LIB_WIDEN);
|
||||
word = expand_simple_binop (word_mode, IOR, word, elt,
|
||||
- word, 1, OPTAB_LIB_WIDEN);
|
||||
+ NULL_RTX, 1, OPTAB_LIB_WIDEN);
|
||||
}
|
||||
}
|
||||
|
||||
--- gcc/testsuite/gcc.target/i386/pr105123.c.jj 2022-04-01 16:56:44.549625810 +0200
|
||||
+++ gcc/testsuite/gcc.target/i386/pr105123.c 2022-04-01 16:56:33.569782511 +0200
|
||||
@@ -0,0 +1,22 @@
|
||||
+/* PR target/105123 */
|
||||
+/* { dg-do run { target sse2_runtime } } */
|
||||
+/* { dg-options "-msse2" } */
|
||||
+/* { dg-additional-options "-mtune=i686" { target ia32 } } */
|
||||
+
|
||||
+typedef unsigned short __attribute__((__vector_size__ (4 * sizeof (unsigned short)))) V;
|
||||
+
|
||||
+V
|
||||
+foo (unsigned short u, V v)
|
||||
+{
|
||||
+ return __builtin_shuffle (u * v, v);
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ V x = foo (1, (V) { 0, 1, 2, 3 });
|
||||
+ for (unsigned i = 0; i < 4; i++)
|
||||
+ if (x[i] != i)
|
||||
+ __builtin_abort ();
|
||||
+ return 0;
|
||||
+}
|
@ -1,33 +0,0 @@
|
||||
2022-04-21 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/105331
|
||||
* config/i386/i386.c (ix86_gimplify_va_arg): Mark va_arg_tmp
|
||||
temporary TREE_ADDRESSABLE before trying to gimplify ADDR_EXPR
|
||||
of it.
|
||||
|
||||
* gcc.dg/pr105331.c: New test.
|
||||
|
||||
--- gcc/config/i386/i386.c.jj 2022-04-12 09:20:07.566662842 +0200
|
||||
+++ gcc/config/i386/i386.c 2022-04-21 12:03:32.201951522 +0200
|
||||
@@ -4891,6 +4891,7 @@ ix86_gimplify_va_arg (tree valist, tree
|
||||
{
|
||||
int i, prev_size = 0;
|
||||
tree temp = create_tmp_var (type, "va_arg_tmp");
|
||||
+ TREE_ADDRESSABLE (temp) = 1;
|
||||
|
||||
/* addr = &temp; */
|
||||
t = build1 (ADDR_EXPR, build_pointer_type (type), temp);
|
||||
--- gcc/testsuite/gcc.dg/pr105331.c.jj 2022-04-21 12:09:34.398906718 +0200
|
||||
+++ gcc/testsuite/gcc.dg/pr105331.c 2022-04-21 12:09:07.304283903 +0200
|
||||
@@ -0,0 +1,11 @@
|
||||
+/* PR target/105331 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O -Wuninitialized" } */
|
||||
+
|
||||
+#include <stdarg.h>
|
||||
+
|
||||
+int
|
||||
+foo (va_list *va)
|
||||
+{
|
||||
+ return va_arg (*va, double _Complex); /* { dg-bogus "may be used uninitialized" } */
|
||||
+}
|
Loading…
Reference in new issue