summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2017-04-04 15:30:30 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2017-04-04 15:30:30 +0000
commit1f716a8dbf51115b029863c96de1c2e2cd7f1ae0 (patch)
tree2783bdd517b78d6a7888e6b330b6530af2bd5508
parent03719af81d81a96aeec4921e0989e589d42bae68 (diff)
downloadgcc-1f716a8dbf51115b029863c96de1c2e2cd7f1ae0.tar.gz
* config/mips/mips.c (mips_multi_add): Zero initialize the newly
added member. (mips_expand_vec_perm_const): Initialize elements in orig_perm that are not set by the loop over the elements. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246681 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/mips/mips.c6
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 66d6cb719b3..c2075882484 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2017-04-04 Jeff Law <law@redhat.com>
+
+ * config/mips/mips.c (mips_multi_add): Zero initialize the newly
+ added member.
+ (mips_expand_vec_perm_const): Initialize elements in orig_perm
+ that are not set by the loop over the elements.
+
2017-04-04 Jakub Jelinek <jakub@redhat.com>
PR target/80286
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 42943e01908..b35fba7e2ad 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -4574,12 +4574,13 @@ mips_multi_start (void)
mips_multi_num_insns = 0;
}
-/* Add a new, uninitialized member to the current multi-insn sequence. */
+/* Add a new, zero initialized member to the current multi-insn sequence. */
static struct mips_multi_member *
mips_multi_add (void)
{
mips_multi_member empty;
+ memset (&empty, 0, sizeof (empty));
return mips_multi_members.safe_push (empty);
}
@@ -21355,6 +21356,9 @@ mips_expand_vec_perm_const (rtx operands[4])
d.nelt = nelt = GET_MODE_NUNITS (d.vmode);
d.testing_p = false;
+ /* This is overly conservative, but ensures we don't get an
+ uninitialized warning on ORIG_PERM. */
+ memset (&orig_perm[nelt], 0, MAX_VECT_LEN);
for (i = which = 0; i < nelt; ++i)
{
rtx e = XVECEXP (sel, 0, i);