[PATCH, committed] [libphobos] Update MERGE file, remove ill-formatted changelog entry

2019-03-23 Thread Johannes Pfau
This cleans up un uneeded changelog entry, as entries are not required for 
upstream merges.
Also updates the MERGE file which I forgot in the last backport commit.

Commited as obvious.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269887 
138bc75d-0d04-0410-961f-82ee72b054a4
---
 libphobos/ChangeLog | 5 -
 libphobos/src/MERGE | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/libphobos/ChangeLog b/libphobos/ChangeLog
index fc91bb63985..a2ccba0cddb 100644
--- a/libphobos/ChangeLog
+++ b/libphobos/ChangeLog
@@ -1,8 +1,3 @@
-2019-03-02  Johannes Pfau  
-
-   * src/std/digest/murmurhash.d: PR d/89177: Backport from upstream.
-   Fixes unaligned data access (PR d/89177).
-
 2019-02-19  Bernd Edlinger  
 
* src/Makefile.am: Avoid the -D option which is not available
diff --git a/libphobos/src/MERGE b/libphobos/src/MERGE
index 61c42525d44..63bd46834c5 100644
--- a/libphobos/src/MERGE
+++ b/libphobos/src/MERGE
@@ -1,4 +1,4 @@
-791c5d2407e500bb4e777d6a90fc96cf250ba2f6
+ef07932811de50a1d5810ea23462d127a60574a6
 
 The first line of this file holds the git revision number of the last
 merge done from the dlang/phobos repository.
-- 
2.19.2



Re: [Patch] Bug85667-(x86_64) ms_abi rules aren't followed when returning short structs with float values(32-bit)

2019-03-23 Thread Eric Botcazou
> The attached patch (pr85667.patch) fixes the subjected issue for 32-bit.
> Please let me know your thoughts on the patch.

IMO you ought not to duplicate most of function_value_32 here.

-- 
Eric Botcazou


[PATCH] [libphobos] Update info about required autotools versions

2019-03-23 Thread Johannes Pfau
Updates the comment in configure.ac to use the correct autotools version.
Committed as obvious.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269888 
138bc75d-0d04-0410-961f-82ee72b054a4
---
 libphobos/ChangeLog|  4 
 libphobos/configure.ac | 10 +-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/libphobos/ChangeLog b/libphobos/ChangeLog
index a2ccba0cddb..13b93352918 100644
--- a/libphobos/ChangeLog
+++ b/libphobos/ChangeLog
@@ -1,3 +1,7 @@
+2019-03-23  Johannes Pfau  
+
+   * configure.ac: Update autotool version comment.
+
 2019-02-19  Bernd Edlinger  
 
* src/Makefile.am: Avoid the -D option which is not available
diff --git a/libphobos/configure.ac b/libphobos/configure.ac
index 96010333a39..8cc735563cb 100644
--- a/libphobos/configure.ac
+++ b/libphobos/configure.ac
@@ -18,12 +18,12 @@
 # This requires that you have your environment set-up to use explicit
 # versions of automake and autoconf.
 #
-#export ACLOCAL=/usr/bin/aclocal-1.11
-#export AUTOMAKE=/usr/bin/automake-1.11
-#export AUTOM4TE=/usr/bin/autom4te2.64
-#export AUTOCONF=/usr/bin/autoconf2.64
+#export ACLOCAL=/usr/bin/aclocal-1.15
+#export AUTOMAKE=/usr/bin/automake-1.15
+#export AUTOM4TE=/usr/bin/autom4te2.69
+#export AUTOCONF=/usr/bin/autoconf2.69
 #
-#autoreconf2.64
+#autoreconf2.69
 #
 
 AC_INIT(package-unused, version-unused,, libphobos)
-- 
2.19.2



Please help me to review the patch about improve cse optimization for insn with inout ops

2019-03-23 Thread 钟云德
hi, all
   I am a new guy work on this GCC Bugzilla,  and need some help to review 
patch detailed showed on
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83855, thanks!

[PATCH] rs6000: Fix _mm_movemask_pi8 emulation for 32 bit

2019-03-23 Thread Segher Boessenkool
David noticed this failing on AIX.  It doesn't work on any 32-bit BE,
not so easily noticed because BE Linux will not run these tests (many
of the tests require a Power8 although the test does not need it, and
there aren't many BE Linux Power8 installations).

It turns out the 32-bit implementation of this function is for LE only.
This patch fixes it.  Tested on Linux, and by David on AIX.  Installing.


Segher


2019-03-23  Segher Boessenkool  

* config/rs6000/xmmintrin.h (_mm_movemask_pi8): Implement for 32-bit
big endian.

---
 gcc/config/rs6000/xmmintrin.h | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/gcc/config/rs6000/xmmintrin.h b/gcc/config/rs6000/xmmintrin.h
index 71e4bd4..f9474b6 100644
--- a/gcc/config/rs6000/xmmintrin.h
+++ b/gcc/config/rs6000/xmmintrin.h
@@ -1586,9 +1586,15 @@ _mm_movemask_pi8 (__m64 __A)
 #endif
   return __builtin_bpermd (p, __A);
 #else
+#ifdef __LITTLE_ENDIAN__
   unsigned int mask = 0x20283038UL;
   unsigned int r1 = __builtin_bpermd (mask, __A) & 0xf;
   unsigned int r2 = __builtin_bpermd (mask, __A >> 32) & 0xf;
+#else
+  unsigned int mask = 0x38302820UL;
+  unsigned int r1 = __builtin_bpermd (mask, __A >> 32) & 0xf;
+  unsigned int r2 = __builtin_bpermd (mask, __A) & 0xf;
+#endif
   return (r2 << 4) | r1;
 #endif
 }
-- 
1.8.3.1



[PATCH] rs6000: Make CSE'ing __tls_get_addr calls possible

2019-03-23 Thread Segher Boessenkool
CSE does not consider calls, not even const calls.  This patch puts a
REG_EQUAL note on the pseudo we assign the __tls_get_addr result to,
so that those pseudos can be CSE'd and the extra calls deleted as dead
code.

CSE should really handle const calls directly, but it is stage 4.

Tested on powerpc64-linux {-m32,-m64}.  I'll also test on powerpc64le-linux,
and will commit it to trunk if that works.


Segher


2019-03-23  Segher Boessenkool  

* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Add REG_EQUAL
notes for the result of the __tls_get_addr calls.
* config/rs6000/rs6000.md (unspec UNSPEC_TLS_GET_ADDR): New.

---
 gcc/config/rs6000/rs6000.c  | 10 ++
 gcc/config/rs6000/rs6000.md |  1 +
 2 files changed, 11 insertions(+)

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 15811bd..35aedf4 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -8661,6 +8661,11 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model 
model)
  else
emit_library_call_value (tga, dest, LCT_CONST, Pmode);
  global_tlsarg = NULL_RTX;
+
+ /* Make a note so that the result of this call can be CSEd.  */
+ rtvec vec = gen_rtvec (1, copy_rtx (arg));
+ rtx uns = gen_rtx_UNSPEC (Pmode, vec, UNSPEC_TLS_GET_ADDR);
+ set_unique_reg_note (get_last_insn (), REG_EQUAL, uns);
}
   else if (model == TLS_MODEL_LOCAL_DYNAMIC)
{
@@ -8679,6 +8684,11 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model 
model)
emit_library_call_value (tga, tmp1, LCT_CONST, Pmode);
  global_tlsarg = NULL_RTX;
 
+ /* Make a note so that the result of this call can be CSEd.  */
+ rtvec vec = gen_rtvec (1, copy_rtx (arg));
+ rtx uns = gen_rtx_UNSPEC (Pmode, vec, UNSPEC_TLS_GET_ADDR);
+ set_unique_reg_note (get_last_insn (), REG_EQUAL, uns);
+
  if (rs6000_tls_size == 16)
{
  if (TARGET_64BIT)
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index f2faef8..815077c 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -79,6 +79,7 @@ (define_c_enum "unspec"
UNSPEC_MPIC_CORRECT ; macho_correct_pic
UNSPEC_TLSGD
UNSPEC_TLSLD
+   UNSPEC_TLS_GET_ADDR
UNSPEC_MOVESI_FROM_CR
UNSPEC_MOVESI_TO_CR
UNSPEC_TLSDTPREL
-- 
1.8.3.1



Re: [patch] Fix wrong code for boolean negation in condition at -O

2019-03-23 Thread Eric Botcazou
> Umm, did you look at ssa_name_has_boolean_range?  Isn't the problem that
> Ada's BOOLEAN_TYPE has a wider range than [0..1] and thus this is the
> wrong bit of code:
> 
>   /* Boolean types always have a range [0..1].  */
>   if (TREE_CODE (TREE_TYPE (op)) == BOOLEAN_TYPE)
> return true;

You seem to be discovering that boolean types can have a precision > 1; that's 
the case in Ada and Fortran.  They are indeed a bit delicate to handle but the 
invariant is that the 0-or-1 value must be preserved for them too, i.e. you 
cannot create another value out of thin air.

> IIRC there are other places that have similar logic and rely on
> ssa_name_has_boolean_range to filter out anything undesirable.

The other places are more careful, i.e. they explicitly test for 0 or 1.

-- 
Eric Botcazou