[Bug debug/91231] ICE in dwarf2out_inline_entry, at dwarf2out.c:27642

2019-07-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91231

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Richard Biener  ---
Fixed.

[Bug debug/91231] ICE in dwarf2out_inline_entry, at dwarf2out.c:27642

2019-07-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91231

--- Comment #5 from Richard Biener  ---
Author: rguenth
Date: Tue Jul 23 12:14:27 2019
New Revision: 273736

URL: https://gcc.gnu.org/viewcvs?rev=273736=gcc=rev
Log:
2019-07-23  Richard Biener  

PR debug/91231
* lto-streamer-in.c (input_function): Drop inline-entry markers
that ended up with an unknown location block.

Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/lto-streamer-in.c

[Bug debug/91231] ICE in dwarf2out_inline_entry, at dwarf2out.c:27642

2019-07-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91231

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Tue Jul 23 11:17:37 2019
New Revision: 273734

URL: https://gcc.gnu.org/viewcvs?rev=273734=gcc=rev
Log:
2019-07-23  Richard Biener  

PR debug/91231
* lto-streamer-in.c (input_function): Drop inline-entry markers
that ended up with an unknown location block.

Modified:
branches/gcc-9-branch/gcc/ChangeLog
branches/gcc-9-branch/gcc/lto-streamer-in.c

[Bug debug/91231] ICE in dwarf2out_inline_entry, at dwarf2out.c:27642

2019-07-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91231

--- Comment #3 from Richard Biener  ---
Author: rguenth
Date: Tue Jul 23 10:45:59 2019
New Revision: 273733

URL: https://gcc.gnu.org/viewcvs?rev=273733=gcc=rev
Log:
2019-07-23  Richard Biener  

PR debug/91231
* lto-streamer-in.c (input_function): Drop inline-entry markers
that ended up with an unknown location block.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/lto-streamer-in.c

[Bug tree-optimization/83518] [8/9 Regression] Missing optimization: useless instructions should be dropped

2019-07-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83518

Richard Biener  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #17 from Richard Biener  ---
Fixed.

[Bug tree-optimization/83518] [8/9 Regression] Missing optimization: useless instructions should be dropped

2019-07-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83518

--- Comment #18 from Richard Biener  ---
Author: rguenth
Date: Tue Jul 23 10:00:24 2019
New Revision: 273732

URL: https://gcc.gnu.org/viewcvs?rev=273732=gcc=rev
Log:
2019-07-23  Richard Biener  

PR tree-optimization/83518
* tree-ssa-sccvn.c (vn_reference_lookup_3): Handle aggregate
init from a constant even when partial defs are already recorded.

c/
* gimple-parser.c (c_parser_parse_gimple_body): When we have
a CFG also rebuild cgraph edges.

* gcc.dg/tree-ssa/ssa-fre-79.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-79.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c/ChangeLog
trunk/gcc/c/gimple-parser.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-sccvn.c

[Bug c/91232] Adding -fPIC with optimization level > 0 resulting a busy hang in my program

2019-07-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91232

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #5 from Richard Biener  ---
It's the 0 - src computation that invokes undefined behavior and things go
downhill from there.  Use 0 - (uint32_t)src here.

[Bug debug/91231] ICE in dwarf2out_inline_entry, at dwarf2out.c:27642

2019-07-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91231

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||aoliva at gcc dot gnu.org,
   ||dmalcolm at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org

--- Comment #2 from Richard Biener  ---
So the location of the NOTE_INSN_INLINE_ENTRY BLOCK is zero.

# DEBUG INLINE_ENTRY __conv_op 

and the BLOCKs location is streamed as '2', when the location cache is applied
it becomes zero here:

  if (current_file == loc.file && current_line == loc.line
  && current_col == loc.col)
*loc.loc = current_loc;
  else
current_loc = *loc.loc = linemap_position_for_column (line_table,
  loc.col);

line changes.  Then linemap_position_for_column returns zero, current_loc
is 1879048191.

(gdb) p set->max_column_hint 
$43 = 0

still we're running into

  /* Otherwise, attempt to start a new line that can hold TO_COLUMN,
 with some space to spare.  This may or may not lead to a new
 linemap being created.  */
  line_map_ordinary *map = LINEMAPS_LAST_ORDINARY_MAP (set);
  r = linemap_line_start (set, SOURCE_LINE (map, r), to_column + 50);

and in linemap_line_start end up with add_map = true because
effective_column_bits is zero.

That is, the ultimative issue is that we run out of linemap space
(for no good reason in this case) which leads to some locations becoming
zero which we do not expect.

We can fixup at GIMPLE stmt stream-in time and drop the debug stmts which
make no sense anymore due to this and first and foremost fix the above
bug by not attempting to allocate space for 50 columns if max_column_hint
is zero and the actual column is zero as well.  Hmm, I guess it isn't
a global hint and LTO is really special by dropping column info...  Maybe
we shouldn't call linemap_position_for_column at all...

Anyway.  The following fixes the issue (yes, we do stream inline-entry
markers with NULL block):

Index: gcc/lto-streamer-in.c
===
--- gcc/lto-streamer-in.c   (revision 273718)
+++ gcc/lto-streamer-in.c   (working copy)
@@ -1140,6 +1140,14 @@ input_function (tree fn_decl, struct dat
  ? !MAY_HAVE_DEBUG_MARKER_STMTS
  : !MAY_HAVE_DEBUG_BIND_STMTS))
remove = true;
+ /* In case the linemap overflows locations can be dropped
+to zero.  Thus do not keep nonsensical inline entry markers
+we'd later ICE on.  */
+ tree block;
+ if (gimple_debug_inline_entry_p (stmt)
+ && (block = gimple_block (stmt))
+ && !inlined_function_outer_scope_p (block))
+   remove = true;
  if (is_gimple_call (stmt)
  && gimple_call_internal_p (stmt))
{

As for the linemap issue we might be able to optimize the + 50 for LTO
somehow either by a new global parameter we set or by looking at past
column uses [of the same file]?

[Bug tree-optimization/91227] pointer relational expression not folded but equivalent inequality is

2019-07-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91227

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-07-23
 Ever confirmed|0   |1

--- Comment #3 from Richard Biener  ---
Hmm, non-equality compares of different objects produce unspecified results,
no?
In those cases we usally are simply conservative...

Otherwise we could simply fold all relations of non-aliasing pointers to false.
Thus p >= a || p < a -> false.  GIGO.

[Bug lto/91228] [10 regression] Removing gnu_lto_v1 symbol name breaks LTO with Solaris ld

2019-07-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91228

--- Comment #3 from Richard Biener  ---
I think I warned you in a followup to your mail(In reply to Martin Liška from
comment #1)
> Obviously mine.
> @Richi: Have you seen anything similar to this?

I think I warned you in a followup to your mail that likely the renaming
is going to break since the first zero byte is the same as "no name" which
both Solaris and HPUX don't like.  I suggested to change

  /* Find the first '\0' in strings.  */
  zero_byte = (char *) memchr (strings, '\0', strsz);

to

  /* Find the first '\0' in strings.  */
  zero_byte = (char *) memchr (strings + 1, '\0', strsz);

but then Jeff approved the original...

See all the glory details in PR83452 which you now uncovered again.

Note that a way out would be to append 'gnu_lto_v1' to .strings and
use the same name as before.  As said, eventually an empty name does it
(but you can't use the empty name at offset zero).

> @Rainer: About what linker are we talking?

[Bug tree-optimization/91221] [10 Regression] ICE in get_int_cst_ext_nunits, at tree.c:1299 since r273548

2019-07-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91221

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Mon Jul 22 11:18:55 2019
New Revision: 273667

URL: https://gcc.gnu.org/viewcvs?rev=273667=gcc=rev
Log:
2019-07-22  Richard Biener  

PR tree-optimization/91221
* tree-ssa-sccvn.c (vn_reference_lookup_3): Appropriately
restrict partial-def handling of empty constructors and
memset to refs with known offset.

* g++.dg/pr91221.C: New testcase.

Added:
trunk/gcc/testsuite/g++.dg/pr91221.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-sccvn.c

[Bug tree-optimization/91221] [10 Regression] ICE in get_int_cst_ext_nunits, at tree.c:1299 since r273548

2019-07-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91221

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Richard Biener  ---
Fixed.

[Bug rtl-optimization/91137] [7/8/9 Regression] Wrong code with -O3

2019-07-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91137

Richard Biener  changed:

   What|Removed |Added

  Known to work||10.0
Summary|[7/8/9/10 Regression] Wrong |[7/8/9 Regression] Wrong
   |code with -O3   |code with -O3

--- Comment #12 from Richard Biener  ---
(In reply to bin cheng from comment #11)
> Hi, suppose this patch should be backported to 8/7 if no further issues.

Yes, please do the backport to GCC 9 reasonably quickly and 8/7 later if
the GCC 9 one doesn't show any issues.

[Bug tree-optimization/91221] [10 Regression] ICE in get_int_cst_ext_nunits, at tree.c:1299 since r273548

2019-07-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91221

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org

--- Comment #2 from Richard Biener  ---
Mine.

[Bug rtl-optimization/91213] Missed optimization: (sub X Y) -> (xor X Y) when Y <= X and isPowerOf2(X + 1)

2019-07-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91213

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Target||x86_64-*-*, i?86-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-07-22
  Component|tree-optimization   |rtl-optimization
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed.

[Bug c++/91217] [8/9/10 Regression] Returning std::array from lambda results in an extra copy step on return

2019-07-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91217

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-07-22
   Target Milestone|--- |8.4
Summary|Returning std::array from   |[8/9/10 Regression]
   |lambda results in an extra  |Returning std::array from
   |copy step on return |lambda results in an extra
   ||copy step on return
 Ever confirmed|0   |1

--- Comment #3 from Richard Biener  ---
I can confirm that with -O2 and GCC 8 there is

hello_1 ()
{
..
   [local count: 12777528]:
  return ;
}

while

hello_2 ()
{
...
   [local count: 1073741826]:
  .m_data = ret;
  ret ={v} {CLOBBER};
  return ;
}

with GCC 9 TestB::TestB isn't inlined in addition (-O3 helps for that but
not the other issue).

GCC 7 manages to produce the code as hello_1 in both cases.

[Bug rtl-optimization/91154] [10 Regression] 456.hmmer regression on Haswell caused by r272922

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91154

--- Comment #16 from Richard Biener  ---
Ah, because x86_64_general_operand allows memory but the v alternative not
and reloading that is appearantly more expensive than not doing that and
reloading the general reg later.  Fun.  Changing that to
x86_64_nonmemory_operand
makes the whole thing work nearly fully (for this testcase, breaking everything
else of course), there's one gpr op remaining again because we get memory,
this time in the first operand which I kept as nonimmediate_operand.
Not sure how we make RA happier to reload a memory operand for the v,v,v
alternative without doing that elsewhere.

movl$-987654321, %r10d
vmovd   (%rdi), %xmm0
leal-1(%r8), %r9d
xorl%eax, %eax
vmovd   %r10d, %xmm1
.p2align 4,,10
.p2align 3
.L3:
vmovd   (%rdx,%rax,4), %xmm2
vpaddd  %xmm2, %xmm0, %xmm0
vmovd   %xmm0, 4(%rdi,%rax,4)
movl(%rcx,%rax,4), %r8d
addl(%rsi,%rax,4), %r8d
vmovd   %r8d, %xmm3
movq%rax, %r8
vpmaxsd %xmm0, %xmm3, %xmm0
vpmaxsd %xmm1, %xmm0, %xmm0
vmovd   %xmm0, 4(%rdi,%rax,4)
addq$1, %rax
cmpq%r9, %r8
jne .L3

[Bug tree-optimization/91211] [10 Regression] wrong code with __builtin_memset() and __builtin_memcpy() at -O1 and above

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91211

--- Comment #3 from Richard Biener  ---
Author: rguenth
Date: Fri Jul 19 16:19:39 2019
New Revision: 273605

URL: https://gcc.gnu.org/viewcvs?rev=273605=gcc=rev
Log:
2019-07-19  Richard Biener  

PR tree-optimization/91211
* tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Fix
memset encoding size.

* gcc.dg/torture/pr91211.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr91211.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-sccvn.c

[Bug tree-optimization/91211] [10 Regression] wrong code with __builtin_memset() and __builtin_memcpy() at -O1 and above

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91211

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Richard Biener  ---
Fixed.

[Bug rtl-optimization/91154] [10 Regression] 456.hmmer regression on Haswell caused by r272922

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91154

--- Comment #15 from Richard Biener  ---
So another idea would be to provide [us]{min,max} patterns for integer modes
that split after reload into a compare or jumpy sequence if allocated
using GPR regs but also allow SSE reg alternatives which would fit into
existing SSE code if we'd allow SI-WITH-SSE similar to how we do
TARGET_MMX_WITH_SSE operations.  We already seem to have movsi patterns
{r,m}<->v so that part is done, for the testcase that would leave
addsi3 plus appropriate costing of the min/max case.

The smaxsi3 "splitter" (well ;)) is

Index: gcc/config/i386/i386.md
===
--- gcc/config/i386/i386.md (revision 273592)
+++ gcc/config/i386/i386.md (working copy)
@@ -1881,6 +1881,27 @@ (define_expand "mov"
   ""
   "ix86_expand_move (mode, operands); DONE;")

+(define_insn "smaxsi3"
+ [(set (match_operand:SI 0 "register_operand" "=r,x")
+   (smax:SI (match_operand:SI 1 "register_operand" "%0,x")
+(match_operand:SI 2 "register_operand" "r,x")))
+  (clobber (reg:CC FLAGS_REG))]
+  "TARGET_AVX2"
+{
+  switch (get_attr_type (insn))
+{
+case TYPE_SSEADD:
+  return "vpmaxsd\t{%2, %1, %0|%0, %1, %2}";
+case TYPE_ICMOV:
+  return "cmpl\t{%2, %0|%0, %2}\n"
+"cmovl\t{%2, %0|%0, %2}";
+default:
+  gcc_unreachable ();
+}
+}
+  [(set_attr "isa" "noavx,avx")
+   (set_attr "type" "icmov,sseadd")])
+
 (define_insn "*mov_xor"
   [(set (match_operand:SWI48 0 "register_operand" "=r")
(match_operand:SWI48 1 "const0_operand"))

with that we get the elision of the zeroing between the vpmaxsd but even
-mtune=bdver2 doesn't disparage the cross-unit moves enough for the
RA to choose the first alternative.  Huh.  But it then goes through the
stack...

.L3:
vmovd   %xmm0, %r8d
addl(%rdx,%rax,4), %r8d
movl%r8d, 4(%rdi,%rax,4)
movl(%rcx,%rax,4), %r9d
addl(%rsi,%rax,4), %r9d
movl%r9d, -4(%rsp)
vmovd   -4(%rsp), %xmm2
movl%r8d, -4(%rsp)
movq%rax, %r8
vmovd   -4(%rsp), %xmm3
vpmaxsd %xmm3, %xmm2, %xmm0
vpmaxsd %xmm1, %xmm0, %xmm0
vmovd   %xmm0, 4(%rdi,%rax,4)
incq%rax
cmpq%r8, %r10
jne .L3

not sure why RA selected the 2nd alternative at all... but yes, we'd
want to slightly prefer it.  But I expected the inter-unit moves to
push us to the first alternative.

As you can see we can automatically handle stores of SImode in SSE
regs and I verified we can also handle loads by slightly altering the
testcase.  That leaves implementing the addsi3 alternative for SSE regs,
like the following quite incomplete hack

Index: gcc/config/i386/i386.md
===
--- gcc/config/i386/i386.md (revision 273592)
+++ gcc/config/i386/i386.md (working copy)
@@ -5368,10 +5389,10 @@ (define_insn_and_split "*add3_doubl
 })

 (define_insn "*add_1"
-  [(set (match_operand:SWI48 0 "nonimmediate_operand" "=rm,r,r,r")
+  [(set (match_operand:SWI48 0 "nonimmediate_operand" "=rm,r,r,r,v")
(plus:SWI48
- (match_operand:SWI48 1 "nonimmediate_operand" "%0,0,r,r")
- (match_operand:SWI48 2 "x86_64_general_operand" "re,m,0,le")))
+ (match_operand:SWI48 1 "nonimmediate_operand" "%0,0,r,r,v")
+ (match_operand:SWI48 2 "x86_64_general_operand" "re,m,0,le,v")))
(clobber (reg:CC FLAGS_REG))]
   "ix86_binary_operator_ok (PLUS, mode, operands)"
 {
@@ -5390,6 +5411,9 @@ (define_insn "*add_1"
   return "dec{}\t%0";
}

+ case TYPE_SSEADD:
+   return "vpaddd\t{%2, %1, %0|%0, %1, %2}";
+
 default:
   /* For most processors, ADD is faster than LEA.  This alternative
 was added to use ADD as much as possible.  */
@@ -5406,6 +5430,8 @@ (define_insn "*add_1"
   [(set (attr "type")
  (cond [(eq_attr "alternative" "3")
   (const_string "lea")
+   (eq_attr "alternative" "4")
+ (const_string "sseadd")
(match_operand:SWI48 2 "incdec_operand")
  (const_string "incdec")
   ]

but somehow that doesn't trigger for me.

[Bug tree-optimization/91200] ICE on valid code at -O1: verify_ssa failed

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91200

--- Comment #3 from Richard Biener  ---
Author: rguenth
Date: Fri Jul 19 12:24:53 2019
New Revision: 273602

URL: https://gcc.gnu.org/viewcvs?rev=273602=gcc=rev
Log:
2019-07-19  Richard Biener  

PR tree-optimization/91200
* tree-ssa-phiopt.c (cond_store_replacement): Check we have
no PHI nodes in middle-bb.

* gcc.dg/torture/pr91200.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr91200.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-phiopt.c

[Bug tree-optimization/91211] [10 Regression] wrong code with __builtin_memset() and __builtin_memcpy() at -O1 and above

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91211

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-07-19
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
   Target Milestone|--- |10.0
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
I bet this is again mine.

[Bug tree-optimization/91178] [9 Regression] Infinite recursion in split_constant_offset in slp after r260289

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91178

--- Comment #7 from Richard Biener  ---
Author: rguenth
Date: Fri Jul 19 08:47:41 2019
New Revision: 273593

URL: https://gcc.gnu.org/viewcvs?rev=273593=gcc=rev
Log:
2019-07-19  Richard Biener  

PR tree-optimization/91207
Revert
2019-07-17  Richard Biener  

PR tree-optimization/91178
* tree-vect-stmts.c (get_group_load_store_type): For SLP
loads with a gap larger than the vector size always use
VMAT_STRIDED_SLP.
(vectorizable_load): For VMAT_STRIDED_SLP with a permutation
avoid loading vectors that are only contained in the gap
and thus are not needed.

* gcc.dg/torture/pr91207.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr91207.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-stmts.c

[Bug tree-optimization/91207] [10 Regression] Wrong code with -O3

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91207

--- Comment #3 from Richard Biener  ---
Author: rguenth
Date: Fri Jul 19 08:47:41 2019
New Revision: 273593

URL: https://gcc.gnu.org/viewcvs?rev=273593=gcc=rev
Log:
2019-07-19  Richard Biener  

PR tree-optimization/91207
Revert
2019-07-17  Richard Biener  

PR tree-optimization/91178
* tree-vect-stmts.c (get_group_load_store_type): For SLP
loads with a gap larger than the vector size always use
VMAT_STRIDED_SLP.
(vectorizable_load): For VMAT_STRIDED_SLP with a permutation
avoid loading vectors that are only contained in the gap
and thus are not needed.

* gcc.dg/torture/pr91207.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr91207.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-stmts.c

[Bug tree-optimization/91178] [9 Regression] Infinite recursion in split_constant_offset in slp after r260289

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91178
Bug 91178 depends on bug 91207, which changed state.

Bug 91207 Summary: [10 Regression] Wrong code with -O3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91207

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

[Bug tree-optimization/91207] [10 Regression] Wrong code with -O3

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91207

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Richard Biener  ---
Fixed.

[Bug bootstrap/91208] [10 Regression] bootstrap comparison failure for objc and obj-c++

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91208

Richard Biener  changed:

   What|Removed |Added

 Target||x86-64-linux
  Component|objc|bootstrap
   Target Milestone|--- |10.0

[Bug tree-optimization/91207] [10 Regression] Wrong code with -O3

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91207

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
  Known to work||9.1.0
   Last reconfirmed||2019-07-19
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Blocks||91178
 Ever confirmed|0   |1
Summary|Wrong code with -O3 |[10 Regression] Wrong code
   ||with -O3
   Target Milestone|--- |10.0

--- Comment #1 from Richard Biener  ---
Confirmed.  Works on the GCC 9 branch.

Caused by the fix for PR91178.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91178
[Bug 91178] [9 Regression] Infinite recursion in split_constant_offset in slp
after r260289

[Bug target/91204] [10 Regression] ICE in expand_expr_real_2, at expr.c:9215 with -O3

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91204

--- Comment #4 from Richard Biener  ---
(In reply to Jakub Jelinek from comment #3)
> --- gcc/optabs.c.jj   2019-07-15 10:53:10.743205405 +0200
> +++ gcc/optabs.c  2019-07-19 00:38:20.271852242 +0200
> @@ -2972,6 +2972,17 @@ expand_unop (machine_mode mode, optab un
>return target;
>  }
>  
> +  /* Emit ~op0 as op0 ^ -1.  */
> +  if (unoptab == one_cmpl_optab
> +  && (SCALAR_INT_MODE_P (mode) || GET_MODE_CLASS (mode) ==
> MODE_VECTOR_INT)
> +  && optab_handler (xor_optab, mode) != CODE_FOR_nothing)
> +{
> +  temp = expand_binop (mode, xor_optab, op0, CONSTM1_RTX (mode),
> +target, unsignedp, OPTAB_DIRECT);
> +  if (temp)
> + return temp;
> +}
> +
>if (optab_to_code (unoptab) == NEG)
>  {
>/* Try negating floating point values by flipping the sign bit.  */
> 
> seems to work for me.  Or of course something similar can be done in
> config/i386/mmx.md, basically copy the sse.md one_cmpl2 pattern to
> mmx.md with TARGET_MMX_WITH_SSE and MMXMODEI iterator.

Doing it in the middle-end is better IMHO.  But yeah, we're somewhat sloppy
with vector optabs checks in match.pd where it seems "obvious" targets need
to have support...

[Bug middle-end/91202] Unnecessary promotion of shift operands

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91202

Richard Biener  changed:

   What|Removed |Added

 Target|x86 |x86_64-*-* i?86-*-*
 CC||jakub at gcc dot gnu.org,
   ||rguenth at gcc dot gnu.org
  Component|c   |middle-end

--- Comment #3 from Richard Biener  ---
If you use singed adds it makes a semantic difference and we narrow it to
(unsigned char)a + (unsigned char)b to make it well-defined in case of
overflow.  I think the same issue applies for the shift where
C says that a >> b is really (int)a >> b and thus it is well-defined if
b == 24.  If we write it as gimple (char)a >> b then we conclude b
has to be in the range [0, 7] which would be wrong.

So on GIMPLE we'd need to do (char)a >> (b&7) which I think wouldn't
be nicely canonical.

So this is probably best fixed at RTL expansion time or somewhen
shortly before RTL expansion in a "narrowing/widening" pass taking
into account target capabilities (and ABIs).

I think the vectorizer has similar tricks in the pattern recognizer.

[Bug tree-optimization/91201] [7/8/9/10 Regression] SIMD not generated for horizontal sum of bytes in array

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91201

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-07-19
 Blocks||53947
   Target Milestone|--- |7.5
Summary|[7~9 Regression] SIMD not   |[7/8/9/10 Regression] SIMD
   |generated for horizontal|not generated for
   |sum of bytes in array   |horizontal sum of bytes in
   ||array
 Ever confirmed|0   |1

--- Comment #2 from Richard Biener  ---
Thus confirmed.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations

[Bug tree-optimization/91200] ICE on valid code at -O1: verify_ssa failed

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91200

--- Comment #2 from Richard Biener  ---
So we're applying cselim to

  if (a.0_1 != 0)
goto ; [50.00%]
  else
goto ; [50.00%]

   [local count: 766958447]:
  # i_20 = PHI 
  h[i_20] = 

   [local count: 168730858]:
  # i_21 = PHI 

where bb3 has only a single stmt but the PHI node precludes simply inserting
the stmt elsewhere.

The PHI node is left from non-iterating FRE which isn't able to do all
simplification in one go.

[Bug tree-optimization/91200] ICE on valid code at -O1: verify_ssa failed

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91200

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-07-19
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Latent issue - mine.

[Bug tree-optimization/91198] GCC not generating AVX-512 compress/expand instructions

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91198

Richard Biener  changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org
 Blocks||53947

--- Comment #3 from Richard Biener  ---
How would a vectorized version with the intrinsic look like?  I can see
how it works for the first 16 floats (the first input vector) but
after that?  How does the compression work when it crosses vector size
boundary?

And yes, this isn't implemented yet, I wasn't even aware of such instructions.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations

[Bug other/91197] [8,9 regression] alignment test program used in perl does not work with -O2 anymore

2019-07-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91197

Richard Biener  changed:

   What|Removed |Added

 Target||i?86-*-*
 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2019-07-19
 Ever confirmed|0   |1

--- Comment #2 from Richard Biener  ---
Not sure what this progam wants to test but I see it passing (exit code zero,
no prints).

Why is returning 0 wrong?

[Bug rtl-optimization/91154] [10 Regression] 456.hmmer regression on Haswell caused by r272922

2019-07-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91154

--- Comment #14 from Richard Biener  ---
With

Index: gcc/config/i386/i386.md
===
--- gcc/config/i386/i386.md (revision 273567)
+++ gcc/config/i386/i386.md (working copy)
@@ -17681,6 +17681,23 @@ (define_insn "3"
(set_attr "type" "sseadd")
(set_attr "mode" "")])

+(define_expand "smaxsi3"
+ [(set (match_operand:SI 0 "register_operand")
+   (smax:SI
+(match_operand:SI 1 "register_operand")
+   (match_operand:SI 2 "register_operand")))]
+ ""
+{
+  rtx vop1 = gen_reg_rtx (V4SImode);
+  rtx vop2 = gen_reg_rtx (V4SImode);
+  emit_insn (gen_vec_setv4si_0 (vop1, CONST0_RTX (V4SImode), operands[1]));
+  emit_insn (gen_vec_setv4si_0 (vop2, CONST0_RTX (V4SImode), operands[2]));
+  rtx tem = gen_reg_rtx (V4SImode);
+  emit_insn (gen_smaxv4si3 (tem, vop1, vop2));
+  emit_move_insn (operands[0], lowpart_subreg (SImode, tem, V4SImode));
+  DONE;
+})
+
 ;; These versions of the min/max patterns implement exactly the operations
 ;;   min = (op1 < op2 ? op1 : op2)
 ;;   max = (!(op1 < op2) ? op1 : op2)


we generate

.L3:
addl(%rdx,%r8,4), %r9d
movl(%rcx,%r8,4), %eax
addl(%rsi,%r8,4), %eax
vmovd   %r9d, %xmm1
vmovd   %eax, %xmm0
movq%r8, %rax
vpmaxsd %xmm1, %xmm0, %xmm0
vinsertps   $0xe, %xmm0, %xmm0, %xmm0
vpmaxsd %xmm2, %xmm0, %xmm0
vmovd   %xmm0, 4(%rdi,%r8,4)
vmovd   %xmm0, %r9d
incq%r8
cmpq%rax, %r10
jne .L3

so we manage to catch the store as well but somehow

(insn:TI 35 27 37 4 (set (reg:V4SI 20 xmm0 [114])
(vec_merge:V4SI (vec_duplicate:V4SI (reg:SI 20 xmm0 [107]))
(const_vector:V4SI [
(const_int 0 [0]) repeated x4
])
(const_int 1 [0x1]))) 2740 {vec_setv4si_0}
 (nil))

fails to be elided.  Maybe vec_setv4si_0 isn't the optimal representation
choice.  Ah, of course the zeros might end up invalidated by the earlier
max...  we can't say in RTL that we actually do not care about the
upper bits - can we?

Anyhow, while the above would fix the regression on Haswell we'd degrade
on Zen and in more isolated cmov cases it's clearly not going to be a win
as well.

[Bug rtl-optimization/91154] [10 Regression] 456.hmmer regression on Haswell caused by r272922

2019-07-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91154

--- Comment #13 from Richard Biener  ---
Testcase for the loop in question:

void foo (int *dc, int *mc, int *tpdd, int *tpmd, int M)
{
  int sc;
  int k;
  for (k = 1; k <= M; k++)
{
  dc[k] = dc[k-1] + tpdd[k-1];
  if ((sc = mc[k-1] + tpmd[k-1]) > dc[k]) dc[k] = sc;
  if (dc[k] < -987654321) dc[k] = -987654321;
}
}

[Bug libstdc++/91170] [9/10 Regression] Crash in pdns resolver

2019-07-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91170

--- Comment #4 from Richard Biener  ---
In the end the issue may have been caused by building with LTO.

[Bug ipa/91194] A suspicious condition in recursive_inlining

2019-07-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91194

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-07-18
 CC||hubicka at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Looks like so.  Honza?

[Bug middle-end/91195] [10 regression] incorrect may be used uninitialized smw (272711, 273474]

2019-07-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91195

Richard Biener  changed:

   What|Removed |Added

   Keywords||diagnostic,
   ||missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-07-18
 Blocks||24639
   Target Milestone|--- |10.0
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
The uninit predicate analysis definitely doesn't handle the connection between
num == 0 and !m1.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639
[Bug 24639] [meta-bug] bug to track all Wuninitialized issues

[Bug rtl-optimization/91154] [10 Regression] 456.hmmer regression on Haswell caused by r272922

2019-07-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91154

--- Comment #12 from Richard Biener  ---
On Skylake (Coffeelake actually) with the same binary (built for Haswell), the
improvement is down to 5%.

On Haswell, when I just replace the second conditional move like

vmovd  %ebx, %xmm12
.p2align 4,,10
.p2align 3
.L34:
...
cmpl%eax, %esi
cmovge  %esi, %eax
movl%ecx, %esi
#   cmpl%ebx, %eax
#   cmovl   %ebx, %eax
vmovd   %eax, %xmm10
vpmaxsd %xmm12, %xmm10, %xmm10
vmovd   %xmm10, %eax
movl%eax, -4(%r13,%rcx,4)
...

this doesn't make a difference.  Replacing both, like

movl-8(%r8,%rcx,4), %esi
addl-8(%rdx,%rcx,4), %esi
#   cmpl%eax, %esi
#   cmovge  %esi, %eax
vmovd   %eax, %xmm10
vmovd   %esi, %xmm11
vpmaxsd %xmm11, %xmm10, %xmm10
movl%ecx, %esi
#   cmpl%ebx, %eax
#   cmovl   %ebx, %eax
vpmaxsd %xmm12, %xmm10, %xmm10
vmovd   %xmm10, %eax
movl%eax, -4(%r13,%rcx,4)

makes runtime improve to within 1% of fixing the regression.
I guess that's the best a insn-localized "fix" (provide a smax pattern for
SImode) would get to here.  As expected on Zen this localized "fix" is a loss
(additional 11% regression, tested same Haswell tuned binary) while
the full SSE variant is also a lot faster - 35% so compared to the code
with two cmovs and 17% compared to the good r272921 code.

So it seems important to avoid crossing the gpr/xmm domain here.  When
I go through the stack for all three GPR<->XMM moves the situation
gets even (much) worse.

Overall this means enhancing STV to seed itself on conditional moves
that match max/min _and_ that can avoid GPR <-> XMM moves would be quite
a big win here.

[Bug rtl-optimization/91154] [10 Regression] 456.hmmer regression on Haswell caused by r272922

2019-07-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91154

--- Comment #11 from Richard Biener  ---
One could in some awkward way also rewrite the loop to use integer SSE (so
we have access to min/max), relying on zero-filling scalar moves into %xmm
and then using vector integer operations.  Need to split the loads from
the arithmetic for that of course.  With that IACA is more happy (14 uops
for Haswell, throughput 3.5 cycles vs. 4 before).  But this is quite
aggressive "STV".

vmovd  %eax, %xmm10
vmovd  %ebx, %xmm12
.p2align 4,,10
.p2align 3
.L34:
#   addl-8(%r9,%rcx,4), %eax
vmovd   -8(%r9,%rcx,4), %xmm13
vpaddd  %xmm13, %xmm10, %xmm10
#   movl%eax, -4(%r13,%rcx,4)
vmovd   %xmm10, -4(%r13,%rcx,4)
#   movl-8(%r8,%rcx,4), %esi
vmovd   -8(%r8,%rcx,4), %xmm11
#   addl-8(%rdx,%rcx,4), %esi
vmovd   -8(%rdx,%rcx,4), %xmm13
vpaddd  %xmm13, %xmm11, %xmm11
#   cmpl%eax, %esi
#   cmovge  %esi, %eax
vpmaxsd %xmm11, %xmm10, %xmm10
movl%ecx, %esi
#   cmpl%ebx, %eax
#   cmovl   %ebx, %eax
vpmaxsd %xmm12, %xmm10, %xmm10
#   movl%eax, -4(%r13,%rcx,4)
vmovd   %xmm10, -4(%r13,%rcx,4)
incq%rcx
cmpq%rcx, %rdi
jne .L34

Interesting fact is that doing this _improves_ 456.hmmer 9% beyond fixing
the original regression...!

Note I carefully avoided crossing integer/vector boundaries and thus didn't
try to just do the max operation in the vector domain.  At least on AMD
CPUs moving data between integer and FP/vector is slow (IIRC Intel doesn't
care).  With AVX512 can we even do vpadd %eax, %xmm0, %xmm0 (don't care
if %eax is splat or just in lane zero) - IIRC there was support for
'scalar' operands on some ops.

The above experiment also clearly shows integer max/min operations are
desperately missing and cmp + cmov or cmp + branch + move isn't a good
substitute.

Now - isn't STV supposed to handle exactly cases like this?  Well, it
seems it only looks for TImode operations.

Note ICC when tuning for Haswell produces exactly the code we are producing
now (which is slow):

..B1.80:# Preds ..B1.80 ..B1.79
# Execution count [1.25e+01]
movl  4(%r15,%rdi,4), %eax  #146.10
movl  4(%rsi,%rdi,4), %edx  #147.12
addl  4(%r13,%rdi,4), %eax  #146.19
addl  4(%r11,%rdi,4), %edx  #147.20
cmpl  %edx, %eax#149.2
cmovge%eax, %edx#149.2
addl  4(%rbx,%rdi,4), %edx  #148.2
cmpl  $-987654321, %edx #149.2
cmovl %r14d, %edx   #149.2
movl  %edx, 4(%r8,%rdi,4)   #149.26
incq  %rdi  #133.5
cmpq  %rcx, %rdi#133.5
jb..B1.80   # Prob 82%  #133.5

it everywhere uses cmov quite aggressively it seems...

[Bug tree-optimization/91191] vrp and boolean arguments

2019-07-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91191

--- Comment #2 from Richard Biener  ---
Created attachment 46610
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46610=edit
untested patch

[Bug tree-optimization/91191] vrp and boolean arguments

2019-07-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91191

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-07-18
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
The issue is that VRP doesn't handle the way we optimize the union punning:

   :
  _6 = VIEW_CONVERT_EXPR(b_4(D));
  if (_6 > 1)

if we decide to rely on appropriate sign/zero-extending of sub-size precision
entities (otherwise we'd have simplified the VIEW_CONVERT to a simple
conversion) the attached fixes the missed optimzation.

[Bug preprocessor/91192] [9/10 regression] non-deterministic ICE on invalid

2019-07-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91192

Richard Biener  changed:

   What|Removed |Added

   Keywords||error-recovery,
   ||ice-on-invalid-code
   Target Milestone|--- |9.2
Summary|[9 regression]  |[9/10 regression]
   |non-deterministic ICE on|non-deterministic ICE on
   |invalid |invalid

[Bug c/91193] [8 regression] ICE on invalid: tree check: expected class ‘type’, have ‘declaration’ (function_decl) in grokdeclarator, at c/c-decl.c:5956

2019-07-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91193

Richard Biener  changed:

   What|Removed |Added

   Keywords||error-recovery,
   ||ice-on-invalid-code
   Target Milestone|--- |8.4

[Bug rtl-optimization/91154] [10 Regression] 456.hmmer regression on Haswell caused by r272922

2019-07-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91154

--- Comment #10 from Richard Biener  ---
Note that on Haswell the conditional moves are two uops while on Broadwell and
up
they are only one uop (overall loop 16 uops vs. 18 uops).  IACA doesn't show
any particular issue (the iterations shoud neatly interleave w/o inter
iteration
dependences), but it says the throughput bottleneck is dependency chains
(not sure if it models conditional moves very well).

[Bug rtl-optimization/91154] [10 Regression] 456.hmmer regression on Haswell caused by r272922

2019-07-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91154

Richard Biener  changed:

   What|Removed |Added

 Blocks||85559

--- Comment #9 from Richard Biener  ---
(In reply to Richard Biener from comment #8)
> (In reply to Jakub Jelinek from comment #6)
> > So pretty much undo all ifcvt into conditional moves (aka pretend the target
> > doesn't have cmov) or something else?
> > The problem is that cmov isn't unconditionally bad or unconditionally good
> > and moving in either direction usually results in significant regressions. 
> > cmov is good if the branch will be often badly predicted, so when the branch
> > prediction is close to 50%, and is bad when it is usually well predicted.
> 
> I'd only do it for MAX and MIN. 
> There's
> also another conditional move a few instructions up, not sure if cmove
> density would be another thing to key on.

And if I read the refrenced PR56309 then the issue might be that for

cmpl%eax, %esi
cmovge  %esi, %eax
movl%ecx, %esi
cmpl%ebx, %eax
cmovl   %ebx, %eax

the second compare uses the cmov destination.  But todays micro architectures
are too complex to really tell what the issue is (still constraining a
peephole quite strictly could be possible, on either or both of the
patterns that appear here).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85559
[Bug 85559] [meta-bug] Improve conditional move

[Bug rtl-optimization/91154] [10 Regression] 456.hmmer regression on Haswell caused by r272922

2019-07-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91154

--- Comment #8 from Richard Biener  ---
(In reply to Jakub Jelinek from comment #6)
> So pretty much undo all ifcvt into conditional moves (aka pretend the target
> doesn't have cmov) or something else?
> The problem is that cmov isn't unconditionally bad or unconditionally good
> and moving in either direction usually results in significant regressions. 
> cmov is good if the branch will be often badly predicted, so when the branch
> prediction is close to 50%, and is bad when it is usually well predicted.

I'd only do it for MAX and MIN.  There's
also another conditional move a few instructions up, not sure if cmove
density would be another thing to key on.

If target costing generally favors the cmp + if-then-else then we may also
simply advertise [us]{min,max} patterns here?  That said, RTL expansion
doesn't look at cost but only asks can_conditionally_move_p (mode) but
hopefully if-conversion considers actual rtx-cost.

Other ideas welcome of course.

[Bug rtl-optimization/91154] [10 Regression] 456.hmmer regression on Haswell caused by r272922

2019-07-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91154

Richard Biener  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org,
   ||uros at gcc dot gnu.org

--- Comment #5 from Richard Biener  ---
One x86 option is to peephole

(insn 635 632 637 17 (set (reg:CCGC 17 flags)
(compare:CCGC (reg:SI 0 ax [1735])
(const_int -987654321 [0xc521974f]))) 11 {*cmpsi_1}
 (nil))
(insn 637 635 638 17 (set (reg:SI 0 ax [1737])
(if_then_else:SI (ge (reg:CCGC 17 flags)
(const_int 0 [0]))
(reg:SI 0 ax [1735])
(reg:SI 3 bx [2395]))) 947 {*movsicc_noc}
 (expr_list:REG_DEAD (reg:CCGC 17 flags)
(expr_list:REG_EQUAL (if_then_else:SI (ge (reg:CCGC 17 flags)
(const_int 0 [0]))
(reg:SI 0 ax [1735])
(const_int -987654321 [0xc521974f]))
(nil

into a compare-and-jump sequence.

Benchmarking on a more recent microarchitecture is probably also in order.

[Bug tree-optimization/91178] [9 Regression] Infinite recursion in split_constant_offset in slp after r260289

2019-07-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91178

--- Comment #6 from Richard Biener  ---
Author: rguenth
Date: Wed Jul 17 11:21:49 2019
New Revision: 273550

URL: https://gcc.gnu.org/viewcvs?rev=273550=gcc=rev
Log:
2019-07-17  Richard Biener  

PR tree-optimization/91178
* tree-ssa.c (release_defs_bitset): Iterate from higher to
lower SSA names to avoid quadratic behavior in the common case.
* tree-data-ref.c (split_constant_offset): Add limit argument
and pass it down.  Initialize it from PARAM_SSA_NAME_DEF_CHAIN_LIMIT.
(split_constant_offset_1): Add limit argument and use it to
limit SSA def walking.  Optimize the common plus/minus case.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-data-ref.c
trunk/gcc/tree-ssa.c

[Bug tree-optimization/91178] [9/10 Regression] Infinite recursion in split_constant_offset in slp after r260289

2019-07-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91178

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Wed Jul 17 10:26:25 2019
New Revision: 273549

URL: https://gcc.gnu.org/viewcvs?rev=273549=gcc=rev
Log:
2019-07-17  Richard Biener  

PR tree-optimization/91178
* tree-vect-stmts.c (get_group_load_store_type): For SLP
loads with a gap larger than the vector size always use
VMAT_STRIDED_SLP.
(vectorizable_load): For VMAT_STRIDED_SLP with a permutation
avoid loading vectors that are only contained in the gap
and thus are not needed.

* gcc.dg/torture/pr91178.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr91178.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-stmts.c

[Bug tree-optimization/91178] [9 Regression] Infinite recursion in split_constant_offset in slp after r260289

2019-07-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91178

Richard Biener  changed:

   What|Removed |Added

  Known to work||10.0
Summary|[9/10 Regression] Infinite  |[9 Regression] Infinite
   |recursion in|recursion in
   |split_constant_offset in|split_constant_offset in
   |slp after r260289   |slp after r260289
  Known to fail|10.0|9.1.0

--- Comment #5 from Richard Biener  ---
Fixed on trunk sofar.

[Bug rtl-optimization/91154] [10 Regression] 456.hmmer regression on Haswell caused by r272922

2019-07-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91154

Richard Biener  changed:

   What|Removed |Added

   Keywords|needs-bisection |
 Status|ASSIGNED|NEW
  Component|tree-optimization   |rtl-optimization
   Assignee|rguenth at gcc dot gnu.org |unassigned at gcc dot 
gnu.org
Summary|[10 Regression] 456.hmmer   |[10 Regression] 456.hmmer
   |regression on Haswell   |regression on Haswell
   ||caused by r272922

--- Comment #4 from Richard Biener  ---
For the Jul 1st regression the DOM change causes us to recognize MIN/MAX
patterns
way earlier (they are exposed by conditional store elimination).  While before
the change we have to if-convert 5 loops of P7Viterbi after the change only
one is remaining.  This naturally affects the scalar fallback.  perf shows
(base is r272921, peak is r272922)

  41.37%611991  hmmer_peak.amd6  hmmer_peak.amd64-m64-gcc42-nn  [.]
P7Viterbi
  29.84%441484  hmmer_base.amd6  hmmer_base.amd64-m64-gcc42-nn  [.]
P7Viterbi
  15.32%226646  hmmer_base.amd6  hmmer_base.amd64-m64-gcc42-nn  [.]
P7Viterbi.cold
   6.74% 99771  hmmer_peak.amd6  hmmer_peak.amd64-m64-gcc42-nn  [.]
P7Viterbi.cold

so the cold part is way faster but somehow the hot part quite a bit slower,
I suspect profile changes in the end, sums are 668130 vs. 711762 samples.
-fopt-info-loop doesn't show any changes, vectorizer cost-model estimates
(and thus runtime niter checks) are the same.

Note the Jul 1st regression is in the range PR90911 was present which should
be the observed Jun 13th regression (r272239).

perf points to a sequence of two cmovs being slow compared to one cmove
and a conditional branch.  Fast:

   │dc[k] = dc[k-1] + tpdd[k-1];
  7.42 │ fd0:   mov-0x80(%rbp),%rbx 
  0.08 │add-0x8(%rbx,%rax,4),%ecx   
   │if ((sc = mc[k-1] + tpmd[k-1]) > dc[k]) dc[k] = sc; 
  0.24 │mov-0xa0(%rbp),%rbx 
   │dc[k] = dc[k-1] + tpdd[k-1];
  0.07 │mov%ecx,-0x4(%rdx,%rax,4)   
   │if ((sc = mc[k-1] + tpmd[k-1]) > dc[k]) dc[k] = sc; 
  7.41 │mov-0x8(%r15,%rax,4),%esi   
  2.69 │add-0x8(%rbx,%rax,4),%esi   
  3.31 │cmp%ecx,%esi
  2.85 │cmovge %esi,%ecx
 12.17 │mov%ecx,-0x4(%rdx,%rax,4)   
   │if (dc[k] < -INFTY) dc[k] = -INFTY; 
  7.43 │cmp$0xc521974f,%ecx 
   │jge1060 
  0.01 │movl   $0xc521974f,-0x4(%rdx,%rax,4)
   │  for (k = 1; k <= M; k++) {
  0.02 │mov%eax,%esi
  0.02 │inc%rax 
  0.01 │cmp%rax,%rdi
   │je 106e 
   │if (dc[k] < -INFTY) dc[k] = -INFTY; 
  0.01 │mov$0xc521974f,%ecx 
  0.01 │jmpfd0
...
  0.00 │1060:   mov%eax,%esi
  0.03 │inc%rax 
  0.00 │cmp%rdi,%rax
  0.00 │jnefd0 
  0.06 │106e:   cmp-0x64(%rbp),%esi 
   │jg 1508  

slow:

   │dc[k] = dc[k-1] + tpdd[k-1];
  0.06 │13b0:   add-0x8(%r9,%rcx,4),%eax
  0.07 │mov%eax,-0x4(%r13,%rcx,4)   
   │if ((sc = mc[k-1] + tpmd[k-1]) > dc[k]) dc[k] = sc; 
  6.81 │mov-0x8(%r8,%rcx,4),%esi
  0.04 │add-0x8(%rdx,%rcx,4),%esi   
  1.46 │cmp%eax,%esi
  0.29 │  

[Bug tree-optimization/91180] [10 Regression] wrong code at -O and above with __builtin_memset()

2019-07-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91180

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Richard Biener  ---
Fixed.

[Bug tree-optimization/91180] [10 Regression] wrong code at -O and above with __builtin_memset()

2019-07-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91180

--- Comment #3 from Richard Biener  ---
Author: rguenth
Date: Wed Jul 17 09:35:04 2019
New Revision: 273548

URL: https://gcc.gnu.org/viewcvs?rev=273548=gcc=rev
Log:
2019-07-17  Richard Biener  

PR tree-optimization/91180
* tree-ssa-sccvn.c (vn_reference_lookup_3): Fix offset
computation for memset partial defs.

* gcc.dg/torture/pr91180.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr91180.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-sccvn.c

[Bug tree-optimization/91181] [10 Regression] Failing as_as type conversion in vect_build_slp_tree_1

2019-07-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91181

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Wed Jul 17 07:07:21 2019
New Revision: 273542

URL: https://gcc.gnu.org/viewcvs?rev=273542=gcc=rev
Log:
2019-07-17  Richard Biener  

PR tree-optimization/91181
* tree-vect-slp.c (vect_build_slp_tree_1): Do not compare
IFN_LOADs as calls.

* gcc.dg/pr91181.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/pr91181.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-slp.c

[Bug tree-optimization/91181] [10 Regression] Failing as_as type conversion in vect_build_slp_tree_1

2019-07-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91181

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Richard Biener  ---
Fixed.

[Bug tree-optimization/91180] [10 Regression] wrong code at -O and above with __builtin_memset()

2019-07-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91180

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-07-16
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
   Target Milestone|--- |10.0
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Mine (partial def support).

[Bug tree-optimization/91181] [10 Regression] Failing as_as type conversion in vect_build_slp_tree_1

2019-07-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91181

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
  Known to work||9.1.1
   Keywords||needs-bisection
   Last reconfirmed||2019-07-16
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Ever confirmed|0   |1
Summary|Failing as_as type  |[10 Regression] Failing
   |conversion in   |as_as type conversion in
   |vect_build_slp_tree_1   |vect_build_slp_tree_1
   Target Milestone|--- |10.0

--- Comment #1 from Richard Biener  ---
I will have a look.

We have

860   if (rhs_code == CALL_EXPR)
861 {
862   if (!compatible_calls_p (as_a  (stmts[0]->stmt),
863as_a  (stmt)))
864 {

and

(gdb) p debug_gimple_stmt (stmts[0]->stmt)
# VUSE <.MEM_44>
a_36 = *_6;
$2 = void
(gdb) p debug_gimple_stmt (stmt)
# VUSE <.MEM_37>
_19 = .MASK_LOAD (_18, 32B, _47);
$3 = void

so likely caused by the SLP support for masked loads patch.

[Bug libstdc++/91170] [9/10 Regression] Crash in pdns resolver

2019-07-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91170

--- Comment #3 from Richard Biener  ---
(In reply to Jonathan Wakely from comment #2)
> That mostly just adds static_assert checks, which can't change anything at
> runtime.

It changes how we get to keys/values besides moving static asserts but I
know nothing about this code so cannot assess whether the change does
anything.  At least it's the only change in the revision range that looks
remotely related to the backtrace (maybe the tuples change as well).

But I haven't yet tried to reproduce either.

[Bug tree-optimization/91178] [9/10 Regression] Infinite recursion in split_constant_offset in slp after r260289

2019-07-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91178

--- Comment #3 from Richard Biener  ---
The main issue is that loop vectorization creates a chain of increments

  # vectp_f.21_116 = PHI 
  vect__16.23_118 = MEM  [(int *)vectp_f.21_116];
  vectp_f.21_119 = vectp_f.21_116 + 16;
  vectp_f.21_121 = vectp_f.21_119 + 16;
  vectp_f.21_123 = vectp_f.21_121 + 16;
  vectp_f.21_125 = vectp_f.21_123 + 16;
...
  vectp_f.21_182363 = vectp_f.21_182361 + 16;
  vectp_f.21_182365 = vectp_f.21_182363 + 16;
  vectp_f.21_182367 = vectp_f.21_182365 + 16;
  vect__16.91149_182369 = VEC_PERM_EXPR ;
  vect__16.91150_182370 = VEC_PERM_EXPR ;
  vect__16.91151_182371 = VEC_PERM_EXPR ;
  vect__16.91152_182372 = VEC_PERM_EXPR ;
  vect__16.91153_182373 = VEC_PERM_EXPR ;
  vect__16.91154_182374 = VEC_PERM_EXPR ;
  vect__16.91155_182375 = VEC_PERM_EXPR ;
  vect__16.91156_182376 = VEC_PERM_EXPR ;
  vect__16.91157_182377 = VEC_PERM_EXPR ;
  vect__73.91158_182378 = vect__73.20_106 - vect__16.91149_182369;
  vect__73.91158_182379 = vect__73.20_107 - vect__16.91150_182370;
  vect__73.91158_182380 = vect__73.20_108 - vect__16.91151_182371;
  vect__73.91158_182381 = vect__73.20_109 - vect__16.91152_182372;
  vect__73.91158_182382 = vect__73.20_110 - vect__16.91153_182373;
  vect__73.91158_182383 = vect__73.20_111 - vect__16.91154_182374;
  vect__73.91158_182384 = vect__73.20_112 - vect__16.91155_182375;
  vect__73.91158_182385 = vect__73.20_113 - vect__16.91156_182376;
  vect__73.91158_182386 = vect__73.20_114 - vect__16.91157_182377;
  vectp_f.21_117 = vectp_f.21_182367 + 16;
  ivtmp_182463 = ivtmp_182462 + 1;
  if (ivtmp_182463 < bnd.17_102)
goto ; [0.00%]
  else
goto ; [100.00%]

where it first generates one load for each of the increments and then
the permutation makes most of them dead.  For interleaving we have some
cut-off to avoid this kind of code-gen but for SLP we don't.
DR group size is 91126 here and gap 91125 (aka single element interleaving).

[Bug rtl-optimization/91173] [9/10 Regression] ICE: in int_mode_for_mode, at stor-layout.c:403

2019-07-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91173

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug testsuite/91175] [9 regression] g++.old-deja/g++.pt/instantiate4.C fails starting with r273489

2019-07-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91175

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-07-16
  Known to work||9.1.0
   Target Milestone|--- |9.2
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed.

[Bug bootstrap/91176] [10 regression] AArch64 bootstrap fails since r273479

2019-07-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91176

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |10.0

[Bug tree-optimization/91178] [9/10 Regression] Infinite recursion in split_constant_offset in slp after r260289

2019-07-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91178

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
   Target Milestone|--- |9.2

--- Comment #2 from Richard Biener  ---
I will have a look.  The function is prone to exponential behavior.

[Bug tree-optimization/91154] [10 Regression] 456.hmmer regression on Haswell

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91154

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-07-15
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #3 from Richard Biener  ---
The Jul 1st regression looks like it is r272922 (mine :/).

Still need to bisect the older one.

[Bug go/91172] go1: error: control reaches end of non-void function in libgo/go/cmd/cgo/gcc.go

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91172

--- Comment #1 from Richard Biener  ---
Sounds like global initializers to me.

Btw, -Wreturn-type isn't a Go FE warning, and it's initialized to -1,
so I wonder why go1 accepts it or has it > 0 (the warning is emitted from
pass_warn_function_return).

[Bug tree-optimization/91162] [9 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.c:86 (error: invalid 'PHI' argument)

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91162

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
  Known to work||10.0
Summary|[9/10 Regression] ICE: tree |[9 Regression] ICE: tree
   |check: expected class   |check: expected class
   |'type', have 'exceptional'  |'type', have 'exceptional'
   |(error_mark) in |(error_mark) in
   |useless_type_conversion_p,  |useless_type_conversion_p,
   |at gimple-expr.c:86 (error: |at gimple-expr.c:86 (error:
   |invalid 'PHI' argument) |invalid 'PHI' argument)
  Known to fail|10.0|

--- Comment #5 from Richard Biener  ---
Fixed on trunk sofar.

[Bug tree-optimization/91162] [9/10 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.c:86 (error: invalid 'PHI' argument

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91162

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Mon Jul 15 12:48:47 2019
New Revision: 273492

URL: https://gcc.gnu.org/viewcvs?rev=273492=gcc=rev
Log:
2019-07-15  Richard Biener  

PR middle-end/91162
* tree-cfg.c (move_block_to_fn): When releasing a virtual PHI
node make sure to replace all uses with something valid.

* gcc.dg/autopar/pr91162.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/autopar/pr91162.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-cfg.c

[Bug libstdc++/91170] [9/10 Regression] Crash in pdns resolver

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91170

Richard Biener  changed:

   What|Removed |Added

 CC||redi at gcc dot gnu.org
   Target Milestone|--- |9.2

--- Comment #1 from Richard Biener  ---
Possible culplrit could be the PR85965 backport changes?

[Bug libstdc++/91170] New: [9/10 Regression] Crash in pdns resolver

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91170

Bug ID: 91170
   Summary: [9/10 Regression] Crash in pdns resolver
   Product: gcc
   Version: 9.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

pdns reportedly now crashes like the following after known good r271393
and with known bad r272147

#0  0x559ab4f0 in std::_Rb_tree >, std::_Select1st > >, std::less,
std::allocator > >
>::_M_get_insert_unique_pos(vState const&) [clone .constprop.0] ()
#1  0x5568bf8f in std::_Rb_tree >, std::_Select1st > >, std::less,
std::allocator > >
>::_M_get_insert_hint_unique_pos (this=0x55a7cbc8 ,
__k=@0x70003880: Insecure, __position=...) at
/usr/include/c++/9/bits/stl_tree.h:2233
#2  std::_Rb_tree >,
std::_Select1st > >,
std::less, std::allocator > > >::_M_emplace_hint_unique, std::tuple<>
>(std::_Rb_tree_const_iterator > >, std::piecewise_construct_t const&, std::tuple&&,
std::tuple<>&&) [clone .constprop.0] (__pos=..., this=0x55a7cbc8
) at /usr/include/c++/9/bits/stl_tree.h:2459
#3  0x5569a70c in std::map,
std::less, std::allocator > > >::operator[](vState&&) [clone .constprop.0] (
__k=@0x768bdef0: Insecure, this=) at
/usr/include/c++/9/bits/stl_map.h:518
#4  0x55740cff in registerAllStats () at rec_channel_rec.cc:1033
#5  0x5577743c in recursorThread (n=, worker=) at pdns_recursor.cc:3437
#6  0x77362e40 in std::execute_native_thread_routine
(__p=0x55c91050) at ../../../../../libstdc++-v3/src/c++11/thread.cc:80
#7  0x77112faa in start_thread (arg=) at
pthread_create.c:486
#8  0x77eed73f in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95


/etc/pdns/recursor.conf:

```
forward-zones=cubes.nordisch.org=172.16.16.1 16.172.in-addr.arpa=172.16.16.1
allow-from=127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12
export-etc-hosts
dnssec=validate
local-address=0.0.0.0,::
local-port=1154
setgid=pdns
setuid=pdns
```

it should be reproducible with

gdb --args /usr/sbin/pdns_recursor --daemon=no --write-pid=no --disable-syslog
--log-timestamp=no

[Bug tree-optimization/91154] [10 Regression] 456.hmmer regression on Haswell

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91154

--- Comment #2 from Richard Biener  ---
Bisecting the Jul 1st regression now.

[Bug rtl-optimization/91164] [10 Regression] ICE in verify_dominators, at dominance.c:1184 (error: dominator of 114 should be 112, not 16)

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91164

--- Comment #5 from Richard Biener  ---
I think callers are expected to drop dominators if they do not keep them
up-to-date.  In fact elsewhere we assume there are no unreachable blocks iff
dominators
are present(?).

We've fixed quite a few places in the RTL pipeline already (I remember
mode-switching.c).

Checking what GIMPLE cfg-cleanup does it now is implemented as part of
cleanup_control_flow_pre ():

  /* Remove all now (and previously) unreachable blocks.  */
  for (int i = NUM_FIXED_BLOCKS; i < last_basic_block_for_fn (cfun); ++i)
{
  basic_block bb = BASIC_BLOCK_FOR_FN (cfun, i);
  if (bb && !bitmap_bit_p (visited, bb->index))
{
  if (!retval)
free_dominance_info (CDI_DOMINATORS);

so IMHO we could mimick that.   Note GIMPLE cleanup-cfg (re-)computes
dominators
(since it needs them itself) after that.

And no, there's no less expensive way in general.

[Bug middle-end/91166] [SVE] Unfolded ZIPs of constants

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91166

--- Comment #2 from Richard Biener  ---
Awww.

tree
fold_vec_perm (tree type, tree arg0, tree arg1, const vec_perm_indices )
{
  unsigned int i;
  unsigned HOST_WIDE_INT nelts;
  bool need_ctor = false;

  if (!sel.length ().is_constant ())
return NULL_TREE;

;)

[Bug middle-end/91166] [SVE] Unfolded ZIPs of constants

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91166

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-07-15
  Component|tree-optimization   |middle-end
Version|unknown |10.0
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
  _4 = VEC_PERM_EXPR <{ 0, ... }, { 0, ... }, { 0, POLY_INT_CST [2, 2], 1,
POLY_INT_CST [3, 2], 2, POLY_INT_CST [4, 2], ... }>;
  _35 = VEC_PERM_EXPR <_4, _4, { 0, 0, 1, 1, 2, 2, ... }>;
  _14 = VEC_PERM_EXPR <_4, _4, { POLY_INT_CST [1, 1], POLY_INT_CST [1, 1],
POLY_INT_CST [2, 1], POLY_INT_CST [2, 1], POLY_INT_CST [3, 1], POLY_INT_CST [3,
1], ... }>;

I guess?  Note the vectorizer shouldn't generate unfolded permutes.  Note
even forwprop doesn't do anything to the above.

I somehow expected that two the permute with two uniform same vectors
would be constant folded indeed, but somehow

  _4 = VEC_PERM_EXPR <{ 0, ... }, { 0, ... }, { 0, POLY_INT_CST [2, 2], 1,
POLY_INT_CST [3, 2], 2, POLY_INT_CST [4, 2], ... }>;

isn't folded.  It should work even for (some) non-uniform vectors to permute,
no?

[Bug tree-optimization/91162] [9/10 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.c:86 (error: invalid 'PHI' argument

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91162

--- Comment #3 from Richard Biener  ---
So somehow autopar doesn't deal with virtual operands being live across the
moved region.  move_block_to_fn simply releases virtual PHI defs which leaves
uses of it in the IL.  It later calls update_ssa anyways so replacing the
defs uses with its bare symbol will do the correct thing.

[Bug tree-optimization/91154] [10 Regression] 456.hmmer regression on Haswell

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91154

Richard Biener  changed:

   What|Removed |Added

   Keywords||needs-bisection

--- Comment #1 from Richard Biener  ---
Jul 1st regression: last known good is r272839, first known bad r272955.
June 13th regression: last known good is r272230, first known bad r272280.

[Bug rtl-optimization/91164] [10 Regression] ICE in verify_dominators, at dominance.c:1184 (error: dominator of 114 should be 112, not 16)

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91164

--- Comment #2 from Richard Biener  ---
Looks like a latent issue to me...

[Bug tree-optimization/91162] [9/10 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.c:86 (error: invalid 'PHI' argument

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91162

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org

--- Comment #2 from Richard Biener  ---
I will have a look.

[Bug rtl-optimization/91161] [9/10 Regression] ICE in begin_move_insn, at sched-ebb.c:175

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91161

Richard Biener  changed:

   What|Removed |Added

   Keywords|ice-on-invalid-code |ice-on-valid-code
   Priority|P3  |P2
Summary|[10 Regression] ICE in  |[9/10 Regression] ICE in
   |begin_move_insn, at |begin_move_insn, at
   |sched-ebb.c:175 |sched-ebb.c:175

[Bug tree-optimization/91157] [10 Regression] ICE: verify_gimple failed (error: position plus size exceeds size of referenced object in 'bit_field_ref')

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91157

Richard Biener  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-07-15
 CC||rguenth at gcc dot gnu.org
   Target Milestone|--- |10.0
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed.  Vector lowering doesn't seem to know how to deal with

 
unit-size 
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x76a2c2a0 precision:2 min  max >
QI size  unit-size 
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x76a2c348 nunits:4>
visited
def_stmt _1 = _5;
version:1>

defs.  Or rather with VEC_COND_EXPR lowering since seemingly the
comparison itself is fine (resulting in this vector type).

  vector(4)  D.2953;
  vector(4)  _1;
  vector(4) __int128 _2;
  vector(4) long double _3;
  vector(4)  _5;

   :
  _5 = gl_4(D) == { 0.0, 0.0, 0.0, 0.0 };
  _1 = _5;
  _2 = VEC_COND_EXPR <_1, { -1, -1, -1, -1 }, { 0, 0, 0, 0 }>;
  _3 = VIEW_CONVERT_EXPR(_2);
   = _3;

w/o the exception stuff the comparison is moved inside the VEC_COND_EXPR
and everything is supported by the target.

I guess moving this out is premature and the root-cause of the issue
(still the lowering is broken).  Note the need to factor out the
compare is for IL consistency wrt exceptions but ultimatively it is
a target dependency of whether the condition evaluation is a separate
instruction from the VEC_COND_EXPR.

enum gimplify_status
gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
   bool (*gimple_test_f) (tree), fallback_t fallback)
{
...
case VEC_COND_EXPR:
  {
enum gimplify_status r0, r1, r2;

r0 = gimplify_expr (_OPERAND (*expr_p, 0), pre_p,
post_p, is_gimple_condexpr, fb_rvalue);

the re-use of is_gimple_condexpr might not be the best idea.

[Bug c++/91155] [9/10 Regression] __PRETTY_FUNCTION__ gets truncated when char template parameter is '\0'

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91155

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
   Target Milestone|--- |9.2

[Bug tree-optimization/87981] ICE: Segmentation fault (in add_phi_arg)

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87981

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||10.0
 Resolution|--- |FIXED

--- Comment #3 from Richard Biener  ---
It's actually "fixed" since we now build a CFG if the testcase is properly
annotated.

[Bug tree-optimization/91151] new test case gcc.dg/tree-ssa/vector-7.c fails with its introduction in r273435

2019-07-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91151

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Richard Biener  ---
Fixed with

2019-07-12  Bill Seurer  

* gcc.dg/tree-ssa/vector-7.c: Fix typo.

[Bug tree-optimization/91151] new test case gcc.dg/tree-ssa/vector-7.c fails with its introduction in r273435

2019-07-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91151

--- Comment #4 from Richard Biener  ---
(In reply to seurer from comment #3)
> #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
>   (v4si) { 0x01020304, 0x05060708, 0x090a0b0c, 0x0d0e0f01 }[i]
> #elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
>   (v4si) { 0x04030201, 0x08070605, 0x0c0b0a09, 0x100f0e0d }[i]
> 
> 
> It looks like just a typo in the test case for BE.  
> 
> 0x0d0e0f01 should be 0x0d0e0f10 based on the LE code.
> 
> Tried that and ... it works.

oops - yes.  care to commit?

[Bug tree-optimization/91154] [10 Regression] 456.hmmer regression on Haswell

2019-07-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91154

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Target||x86_64-*-*
   Target Milestone|--- |10.0

[Bug tree-optimization/91154] New: [10 Regression] 456.hmmer regression on Haswell

2019-07-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91154

Bug ID: 91154
   Summary: [10 Regression] 456.hmmer regression on Haswell
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

https://gcc.opensuse.org/gcc-old/SPEC/CINT/sb-czerny-head-64-2006/456_hmmer_big.png

shows two recent regressions, one around June 13th and one around Jul 3th.

[Bug target/91150] [10 Regression] wrong code with -O -mavx512vbmi due to wrong writemask

2019-07-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91150

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |10.0

[Bug tree-optimization/91151] new test case gcc.dg/tree-ssa/vector-7.c fails with its introduction in r273435

2019-07-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91151

--- Comment #2 from Richard Biener  ---
Bah, I didn't actually test the BIG_ENDIAN case ... can you maybe check it and
fix it up or report whether it actually miscompiles?

[Bug middle-end/90982] [9 Regression] ICE in make_decl_rtl, at varasm.c:1344

2019-07-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90982

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||9.1.1
 Resolution|--- |FIXED

--- Comment #8 from Richard Biener  ---
Fixed.

[Bug target/90972] [9 Regression] ICE in fold_convert_loc, at fold-const.c:2429

2019-07-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90972

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||9.1.1
 Resolution|--- |FIXED
  Known to fail|9.1.1   |9.1.0

--- Comment #7 from Richard Biener  ---
Fixed.

[Bug debug/90914] [9 Regression] ICE in schedule_generic_params_dies_gen, at dwarf2out.c:27153

2019-07-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90914

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||9.1.1
 Resolution|--- |FIXED

--- Comment #8 from Richard Biener  ---
Fixed.

[Bug lto/90369] error: could not unlink output file

2019-07-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90369

--- Comment #5 from Richard Biener  ---
Author: rguenth
Date: Fri Jul 12 14:42:14 2019
New Revision: 273446

URL: https://gcc.gnu.org/viewcvs?rev=273446=gcc=rev
Log:
2019-07-12  Richard Biener  

Backport from mainline
2019-07-04  Jakub Jelinek  

PR tree-optimization/91063
* tree-vect-stmts.c (vect_init_vector): Call gsi_remove to remove
stmt from stmts sequence before calling vect_init_vector_1.
Formatting fix.

* gcc.dg/gomp/pr91063.c: New test.

2019-07-04  Richard Biener  

PR ipa/91062
* tree-pass.h (execute_all_ipa_transforms): Add a flag
parameter whether to disable GC collection.
* passes.c (execute_one_ipa_transform_pass): Likewise, and
honor it.
(execute_all_ipa_transforms): Likewise and pass it down.
* cgraph.c (cgraph_node::get_body): Do not invoke garbage
collection from applying IPA transforms.
* cgraphunit.c (cgraph_node::expand): Allow garbage collection
from applying IPA transforms.

2019-06-27  Richard Biener  

PR testsuite/91004
* g++.dg/torture/pr34850.C: Fix overly reduced testcase.

2019-06-26  Richard Biener  

PR ipa/90982
* tree-inline.c (remap_ssa_name): Copy SSA range info.

* g++.dg/torture/pr90982.C: New testcase.

2019-06-24  Richard Biener  

PR tree-optimization/90972
* tree-vect-stmts.c (vect_init_vector): Handle CONSTANT_CLASS_P
in common code, dealing with STRING_CST properly.

* gcc.dg/torture/pr90972.c: New testcase.

2019-06-21  Richard Biener  

PR debug/90914
* dwarf2out.c (prune_unused_types_walk): Always consider
function-local extern declarations as used.

* g++.dg/debug/pr90914.C: New testcase.

2019-06-18  Richard Biener  

PR debug/90900
* cfgexpand.c (expand_debug_expr): Treat NOTE_P DECL_RTL
as if optimized away.

* gcc.dg/gomp/pr90900.c: New testcase.

2019-05-07  Richard Biener  

PR lto/90369
* lto-wrapper.c (debug_objcopy): Use the original filename
including archive offset for the filename used for -save-temps.

Added:
branches/gcc-9-branch/gcc/testsuite/g++.dg/debug/pr90914.C
branches/gcc-9-branch/gcc/testsuite/g++.dg/torture/pr90982.C
branches/gcc-9-branch/gcc/testsuite/gcc.dg/gomp/pr90900.c
branches/gcc-9-branch/gcc/testsuite/gcc.dg/gomp/pr91063.c
branches/gcc-9-branch/gcc/testsuite/gcc.dg/torture/pr90972.c
Modified:
branches/gcc-9-branch/gcc/ChangeLog
branches/gcc-9-branch/gcc/cfgexpand.c
branches/gcc-9-branch/gcc/cgraph.c
branches/gcc-9-branch/gcc/cgraphunit.c
branches/gcc-9-branch/gcc/dwarf2out.c
branches/gcc-9-branch/gcc/lto-wrapper.c
branches/gcc-9-branch/gcc/passes.c
branches/gcc-9-branch/gcc/testsuite/ChangeLog
branches/gcc-9-branch/gcc/testsuite/g++.dg/torture/pr34850.C
branches/gcc-9-branch/gcc/tree-inline.c
branches/gcc-9-branch/gcc/tree-pass.h
branches/gcc-9-branch/gcc/tree-vect-stmts.c

[Bug target/90972] [9 Regression] ICE in fold_convert_loc, at fold-const.c:2429

2019-07-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90972

--- Comment #6 from Richard Biener  ---
Author: rguenth
Date: Fri Jul 12 14:42:14 2019
New Revision: 273446

URL: https://gcc.gnu.org/viewcvs?rev=273446=gcc=rev
Log:
2019-07-12  Richard Biener  

Backport from mainline
2019-07-04  Jakub Jelinek  

PR tree-optimization/91063
* tree-vect-stmts.c (vect_init_vector): Call gsi_remove to remove
stmt from stmts sequence before calling vect_init_vector_1.
Formatting fix.

* gcc.dg/gomp/pr91063.c: New test.

2019-07-04  Richard Biener  

PR ipa/91062
* tree-pass.h (execute_all_ipa_transforms): Add a flag
parameter whether to disable GC collection.
* passes.c (execute_one_ipa_transform_pass): Likewise, and
honor it.
(execute_all_ipa_transforms): Likewise and pass it down.
* cgraph.c (cgraph_node::get_body): Do not invoke garbage
collection from applying IPA transforms.
* cgraphunit.c (cgraph_node::expand): Allow garbage collection
from applying IPA transforms.

2019-06-27  Richard Biener  

PR testsuite/91004
* g++.dg/torture/pr34850.C: Fix overly reduced testcase.

2019-06-26  Richard Biener  

PR ipa/90982
* tree-inline.c (remap_ssa_name): Copy SSA range info.

* g++.dg/torture/pr90982.C: New testcase.

2019-06-24  Richard Biener  

PR tree-optimization/90972
* tree-vect-stmts.c (vect_init_vector): Handle CONSTANT_CLASS_P
in common code, dealing with STRING_CST properly.

* gcc.dg/torture/pr90972.c: New testcase.

2019-06-21  Richard Biener  

PR debug/90914
* dwarf2out.c (prune_unused_types_walk): Always consider
function-local extern declarations as used.

* g++.dg/debug/pr90914.C: New testcase.

2019-06-18  Richard Biener  

PR debug/90900
* cfgexpand.c (expand_debug_expr): Treat NOTE_P DECL_RTL
as if optimized away.

* gcc.dg/gomp/pr90900.c: New testcase.

2019-05-07  Richard Biener  

PR lto/90369
* lto-wrapper.c (debug_objcopy): Use the original filename
including archive offset for the filename used for -save-temps.

Added:
branches/gcc-9-branch/gcc/testsuite/g++.dg/debug/pr90914.C
branches/gcc-9-branch/gcc/testsuite/g++.dg/torture/pr90982.C
branches/gcc-9-branch/gcc/testsuite/gcc.dg/gomp/pr90900.c
branches/gcc-9-branch/gcc/testsuite/gcc.dg/gomp/pr91063.c
branches/gcc-9-branch/gcc/testsuite/gcc.dg/torture/pr90972.c
Modified:
branches/gcc-9-branch/gcc/ChangeLog
branches/gcc-9-branch/gcc/cfgexpand.c
branches/gcc-9-branch/gcc/cgraph.c
branches/gcc-9-branch/gcc/cgraphunit.c
branches/gcc-9-branch/gcc/dwarf2out.c
branches/gcc-9-branch/gcc/lto-wrapper.c
branches/gcc-9-branch/gcc/passes.c
branches/gcc-9-branch/gcc/testsuite/ChangeLog
branches/gcc-9-branch/gcc/testsuite/g++.dg/torture/pr34850.C
branches/gcc-9-branch/gcc/tree-inline.c
branches/gcc-9-branch/gcc/tree-pass.h
branches/gcc-9-branch/gcc/tree-vect-stmts.c

[Bug debug/90914] [9 Regression] ICE in schedule_generic_params_dies_gen, at dwarf2out.c:27153

2019-07-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90914

--- Comment #7 from Richard Biener  ---
Author: rguenth
Date: Fri Jul 12 14:42:14 2019
New Revision: 273446

URL: https://gcc.gnu.org/viewcvs?rev=273446=gcc=rev
Log:
2019-07-12  Richard Biener  

Backport from mainline
2019-07-04  Jakub Jelinek  

PR tree-optimization/91063
* tree-vect-stmts.c (vect_init_vector): Call gsi_remove to remove
stmt from stmts sequence before calling vect_init_vector_1.
Formatting fix.

* gcc.dg/gomp/pr91063.c: New test.

2019-07-04  Richard Biener  

PR ipa/91062
* tree-pass.h (execute_all_ipa_transforms): Add a flag
parameter whether to disable GC collection.
* passes.c (execute_one_ipa_transform_pass): Likewise, and
honor it.
(execute_all_ipa_transforms): Likewise and pass it down.
* cgraph.c (cgraph_node::get_body): Do not invoke garbage
collection from applying IPA transforms.
* cgraphunit.c (cgraph_node::expand): Allow garbage collection
from applying IPA transforms.

2019-06-27  Richard Biener  

PR testsuite/91004
* g++.dg/torture/pr34850.C: Fix overly reduced testcase.

2019-06-26  Richard Biener  

PR ipa/90982
* tree-inline.c (remap_ssa_name): Copy SSA range info.

* g++.dg/torture/pr90982.C: New testcase.

2019-06-24  Richard Biener  

PR tree-optimization/90972
* tree-vect-stmts.c (vect_init_vector): Handle CONSTANT_CLASS_P
in common code, dealing with STRING_CST properly.

* gcc.dg/torture/pr90972.c: New testcase.

2019-06-21  Richard Biener  

PR debug/90914
* dwarf2out.c (prune_unused_types_walk): Always consider
function-local extern declarations as used.

* g++.dg/debug/pr90914.C: New testcase.

2019-06-18  Richard Biener  

PR debug/90900
* cfgexpand.c (expand_debug_expr): Treat NOTE_P DECL_RTL
as if optimized away.

* gcc.dg/gomp/pr90900.c: New testcase.

2019-05-07  Richard Biener  

PR lto/90369
* lto-wrapper.c (debug_objcopy): Use the original filename
including archive offset for the filename used for -save-temps.

Added:
branches/gcc-9-branch/gcc/testsuite/g++.dg/debug/pr90914.C
branches/gcc-9-branch/gcc/testsuite/g++.dg/torture/pr90982.C
branches/gcc-9-branch/gcc/testsuite/gcc.dg/gomp/pr90900.c
branches/gcc-9-branch/gcc/testsuite/gcc.dg/gomp/pr91063.c
branches/gcc-9-branch/gcc/testsuite/gcc.dg/torture/pr90972.c
Modified:
branches/gcc-9-branch/gcc/ChangeLog
branches/gcc-9-branch/gcc/cfgexpand.c
branches/gcc-9-branch/gcc/cgraph.c
branches/gcc-9-branch/gcc/cgraphunit.c
branches/gcc-9-branch/gcc/dwarf2out.c
branches/gcc-9-branch/gcc/lto-wrapper.c
branches/gcc-9-branch/gcc/passes.c
branches/gcc-9-branch/gcc/testsuite/ChangeLog
branches/gcc-9-branch/gcc/testsuite/g++.dg/torture/pr34850.C
branches/gcc-9-branch/gcc/tree-inline.c
branches/gcc-9-branch/gcc/tree-pass.h
branches/gcc-9-branch/gcc/tree-vect-stmts.c

[Bug testsuite/91004] [10 regression] Excess errors in g++.dg/torture/pr34850.C starting with r272688

2019-07-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91004

--- Comment #6 from Richard Biener  ---
Author: rguenth
Date: Fri Jul 12 14:42:14 2019
New Revision: 273446

URL: https://gcc.gnu.org/viewcvs?rev=273446=gcc=rev
Log:
2019-07-12  Richard Biener  

Backport from mainline
2019-07-04  Jakub Jelinek  

PR tree-optimization/91063
* tree-vect-stmts.c (vect_init_vector): Call gsi_remove to remove
stmt from stmts sequence before calling vect_init_vector_1.
Formatting fix.

* gcc.dg/gomp/pr91063.c: New test.

2019-07-04  Richard Biener  

PR ipa/91062
* tree-pass.h (execute_all_ipa_transforms): Add a flag
parameter whether to disable GC collection.
* passes.c (execute_one_ipa_transform_pass): Likewise, and
honor it.
(execute_all_ipa_transforms): Likewise and pass it down.
* cgraph.c (cgraph_node::get_body): Do not invoke garbage
collection from applying IPA transforms.
* cgraphunit.c (cgraph_node::expand): Allow garbage collection
from applying IPA transforms.

2019-06-27  Richard Biener  

PR testsuite/91004
* g++.dg/torture/pr34850.C: Fix overly reduced testcase.

2019-06-26  Richard Biener  

PR ipa/90982
* tree-inline.c (remap_ssa_name): Copy SSA range info.

* g++.dg/torture/pr90982.C: New testcase.

2019-06-24  Richard Biener  

PR tree-optimization/90972
* tree-vect-stmts.c (vect_init_vector): Handle CONSTANT_CLASS_P
in common code, dealing with STRING_CST properly.

* gcc.dg/torture/pr90972.c: New testcase.

2019-06-21  Richard Biener  

PR debug/90914
* dwarf2out.c (prune_unused_types_walk): Always consider
function-local extern declarations as used.

* g++.dg/debug/pr90914.C: New testcase.

2019-06-18  Richard Biener  

PR debug/90900
* cfgexpand.c (expand_debug_expr): Treat NOTE_P DECL_RTL
as if optimized away.

* gcc.dg/gomp/pr90900.c: New testcase.

2019-05-07  Richard Biener  

PR lto/90369
* lto-wrapper.c (debug_objcopy): Use the original filename
including archive offset for the filename used for -save-temps.

Added:
branches/gcc-9-branch/gcc/testsuite/g++.dg/debug/pr90914.C
branches/gcc-9-branch/gcc/testsuite/g++.dg/torture/pr90982.C
branches/gcc-9-branch/gcc/testsuite/gcc.dg/gomp/pr90900.c
branches/gcc-9-branch/gcc/testsuite/gcc.dg/gomp/pr91063.c
branches/gcc-9-branch/gcc/testsuite/gcc.dg/torture/pr90972.c
Modified:
branches/gcc-9-branch/gcc/ChangeLog
branches/gcc-9-branch/gcc/cfgexpand.c
branches/gcc-9-branch/gcc/cgraph.c
branches/gcc-9-branch/gcc/cgraphunit.c
branches/gcc-9-branch/gcc/dwarf2out.c
branches/gcc-9-branch/gcc/lto-wrapper.c
branches/gcc-9-branch/gcc/passes.c
branches/gcc-9-branch/gcc/testsuite/ChangeLog
branches/gcc-9-branch/gcc/testsuite/g++.dg/torture/pr34850.C
branches/gcc-9-branch/gcc/tree-inline.c
branches/gcc-9-branch/gcc/tree-pass.h
branches/gcc-9-branch/gcc/tree-vect-stmts.c

[Bug debug/90900] [8 Regression] ICE in copy_rtx, at rtl.c:376

2019-07-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90900

--- Comment #9 from Richard Biener  ---
Author: rguenth
Date: Fri Jul 12 14:42:14 2019
New Revision: 273446

URL: https://gcc.gnu.org/viewcvs?rev=273446=gcc=rev
Log:
2019-07-12  Richard Biener  

Backport from mainline
2019-07-04  Jakub Jelinek  

PR tree-optimization/91063
* tree-vect-stmts.c (vect_init_vector): Call gsi_remove to remove
stmt from stmts sequence before calling vect_init_vector_1.
Formatting fix.

* gcc.dg/gomp/pr91063.c: New test.

2019-07-04  Richard Biener  

PR ipa/91062
* tree-pass.h (execute_all_ipa_transforms): Add a flag
parameter whether to disable GC collection.
* passes.c (execute_one_ipa_transform_pass): Likewise, and
honor it.
(execute_all_ipa_transforms): Likewise and pass it down.
* cgraph.c (cgraph_node::get_body): Do not invoke garbage
collection from applying IPA transforms.
* cgraphunit.c (cgraph_node::expand): Allow garbage collection
from applying IPA transforms.

2019-06-27  Richard Biener  

PR testsuite/91004
* g++.dg/torture/pr34850.C: Fix overly reduced testcase.

2019-06-26  Richard Biener  

PR ipa/90982
* tree-inline.c (remap_ssa_name): Copy SSA range info.

* g++.dg/torture/pr90982.C: New testcase.

2019-06-24  Richard Biener  

PR tree-optimization/90972
* tree-vect-stmts.c (vect_init_vector): Handle CONSTANT_CLASS_P
in common code, dealing with STRING_CST properly.

* gcc.dg/torture/pr90972.c: New testcase.

2019-06-21  Richard Biener  

PR debug/90914
* dwarf2out.c (prune_unused_types_walk): Always consider
function-local extern declarations as used.

* g++.dg/debug/pr90914.C: New testcase.

2019-06-18  Richard Biener  

PR debug/90900
* cfgexpand.c (expand_debug_expr): Treat NOTE_P DECL_RTL
as if optimized away.

* gcc.dg/gomp/pr90900.c: New testcase.

2019-05-07  Richard Biener  

PR lto/90369
* lto-wrapper.c (debug_objcopy): Use the original filename
including archive offset for the filename used for -save-temps.

Added:
branches/gcc-9-branch/gcc/testsuite/g++.dg/debug/pr90914.C
branches/gcc-9-branch/gcc/testsuite/g++.dg/torture/pr90982.C
branches/gcc-9-branch/gcc/testsuite/gcc.dg/gomp/pr90900.c
branches/gcc-9-branch/gcc/testsuite/gcc.dg/gomp/pr91063.c
branches/gcc-9-branch/gcc/testsuite/gcc.dg/torture/pr90972.c
Modified:
branches/gcc-9-branch/gcc/ChangeLog
branches/gcc-9-branch/gcc/cfgexpand.c
branches/gcc-9-branch/gcc/cgraph.c
branches/gcc-9-branch/gcc/cgraphunit.c
branches/gcc-9-branch/gcc/dwarf2out.c
branches/gcc-9-branch/gcc/lto-wrapper.c
branches/gcc-9-branch/gcc/passes.c
branches/gcc-9-branch/gcc/testsuite/ChangeLog
branches/gcc-9-branch/gcc/testsuite/g++.dg/torture/pr34850.C
branches/gcc-9-branch/gcc/tree-inline.c
branches/gcc-9-branch/gcc/tree-pass.h
branches/gcc-9-branch/gcc/tree-vect-stmts.c

[Bug middle-end/90982] [9 Regression] ICE in make_decl_rtl, at varasm.c:1344

2019-07-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90982

--- Comment #7 from Richard Biener  ---
Author: rguenth
Date: Fri Jul 12 14:42:14 2019
New Revision: 273446

URL: https://gcc.gnu.org/viewcvs?rev=273446=gcc=rev
Log:
2019-07-12  Richard Biener  

Backport from mainline
2019-07-04  Jakub Jelinek  

PR tree-optimization/91063
* tree-vect-stmts.c (vect_init_vector): Call gsi_remove to remove
stmt from stmts sequence before calling vect_init_vector_1.
Formatting fix.

* gcc.dg/gomp/pr91063.c: New test.

2019-07-04  Richard Biener  

PR ipa/91062
* tree-pass.h (execute_all_ipa_transforms): Add a flag
parameter whether to disable GC collection.
* passes.c (execute_one_ipa_transform_pass): Likewise, and
honor it.
(execute_all_ipa_transforms): Likewise and pass it down.
* cgraph.c (cgraph_node::get_body): Do not invoke garbage
collection from applying IPA transforms.
* cgraphunit.c (cgraph_node::expand): Allow garbage collection
from applying IPA transforms.

2019-06-27  Richard Biener  

PR testsuite/91004
* g++.dg/torture/pr34850.C: Fix overly reduced testcase.

2019-06-26  Richard Biener  

PR ipa/90982
* tree-inline.c (remap_ssa_name): Copy SSA range info.

* g++.dg/torture/pr90982.C: New testcase.

2019-06-24  Richard Biener  

PR tree-optimization/90972
* tree-vect-stmts.c (vect_init_vector): Handle CONSTANT_CLASS_P
in common code, dealing with STRING_CST properly.

* gcc.dg/torture/pr90972.c: New testcase.

2019-06-21  Richard Biener  

PR debug/90914
* dwarf2out.c (prune_unused_types_walk): Always consider
function-local extern declarations as used.

* g++.dg/debug/pr90914.C: New testcase.

2019-06-18  Richard Biener  

PR debug/90900
* cfgexpand.c (expand_debug_expr): Treat NOTE_P DECL_RTL
as if optimized away.

* gcc.dg/gomp/pr90900.c: New testcase.

2019-05-07  Richard Biener  

PR lto/90369
* lto-wrapper.c (debug_objcopy): Use the original filename
including archive offset for the filename used for -save-temps.

Added:
branches/gcc-9-branch/gcc/testsuite/g++.dg/debug/pr90914.C
branches/gcc-9-branch/gcc/testsuite/g++.dg/torture/pr90982.C
branches/gcc-9-branch/gcc/testsuite/gcc.dg/gomp/pr90900.c
branches/gcc-9-branch/gcc/testsuite/gcc.dg/gomp/pr91063.c
branches/gcc-9-branch/gcc/testsuite/gcc.dg/torture/pr90972.c
Modified:
branches/gcc-9-branch/gcc/ChangeLog
branches/gcc-9-branch/gcc/cfgexpand.c
branches/gcc-9-branch/gcc/cgraph.c
branches/gcc-9-branch/gcc/cgraphunit.c
branches/gcc-9-branch/gcc/dwarf2out.c
branches/gcc-9-branch/gcc/lto-wrapper.c
branches/gcc-9-branch/gcc/passes.c
branches/gcc-9-branch/gcc/testsuite/ChangeLog
branches/gcc-9-branch/gcc/testsuite/g++.dg/torture/pr34850.C
branches/gcc-9-branch/gcc/tree-inline.c
branches/gcc-9-branch/gcc/tree-pass.h
branches/gcc-9-branch/gcc/tree-vect-stmts.c

[Bug tree-optimization/91063] [10 Regression] ICE in set_vinfo_for_stmt, at tree-vectorizer.c:676

2019-07-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91063

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Fri Jul 12 14:42:14 2019
New Revision: 273446

URL: https://gcc.gnu.org/viewcvs?rev=273446=gcc=rev
Log:
2019-07-12  Richard Biener  

Backport from mainline
2019-07-04  Jakub Jelinek  

PR tree-optimization/91063
* tree-vect-stmts.c (vect_init_vector): Call gsi_remove to remove
stmt from stmts sequence before calling vect_init_vector_1.
Formatting fix.

* gcc.dg/gomp/pr91063.c: New test.

2019-07-04  Richard Biener  

PR ipa/91062
* tree-pass.h (execute_all_ipa_transforms): Add a flag
parameter whether to disable GC collection.
* passes.c (execute_one_ipa_transform_pass): Likewise, and
honor it.
(execute_all_ipa_transforms): Likewise and pass it down.
* cgraph.c (cgraph_node::get_body): Do not invoke garbage
collection from applying IPA transforms.
* cgraphunit.c (cgraph_node::expand): Allow garbage collection
from applying IPA transforms.

2019-06-27  Richard Biener  

PR testsuite/91004
* g++.dg/torture/pr34850.C: Fix overly reduced testcase.

2019-06-26  Richard Biener  

PR ipa/90982
* tree-inline.c (remap_ssa_name): Copy SSA range info.

* g++.dg/torture/pr90982.C: New testcase.

2019-06-24  Richard Biener  

PR tree-optimization/90972
* tree-vect-stmts.c (vect_init_vector): Handle CONSTANT_CLASS_P
in common code, dealing with STRING_CST properly.

* gcc.dg/torture/pr90972.c: New testcase.

2019-06-21  Richard Biener  

PR debug/90914
* dwarf2out.c (prune_unused_types_walk): Always consider
function-local extern declarations as used.

* g++.dg/debug/pr90914.C: New testcase.

2019-06-18  Richard Biener  

PR debug/90900
* cfgexpand.c (expand_debug_expr): Treat NOTE_P DECL_RTL
as if optimized away.

* gcc.dg/gomp/pr90900.c: New testcase.

2019-05-07  Richard Biener  

PR lto/90369
* lto-wrapper.c (debug_objcopy): Use the original filename
including archive offset for the filename used for -save-temps.

Added:
branches/gcc-9-branch/gcc/testsuite/g++.dg/debug/pr90914.C
branches/gcc-9-branch/gcc/testsuite/g++.dg/torture/pr90982.C
branches/gcc-9-branch/gcc/testsuite/gcc.dg/gomp/pr90900.c
branches/gcc-9-branch/gcc/testsuite/gcc.dg/gomp/pr91063.c
branches/gcc-9-branch/gcc/testsuite/gcc.dg/torture/pr90972.c
Modified:
branches/gcc-9-branch/gcc/ChangeLog
branches/gcc-9-branch/gcc/cfgexpand.c
branches/gcc-9-branch/gcc/cgraph.c
branches/gcc-9-branch/gcc/cgraphunit.c
branches/gcc-9-branch/gcc/dwarf2out.c
branches/gcc-9-branch/gcc/lto-wrapper.c
branches/gcc-9-branch/gcc/passes.c
branches/gcc-9-branch/gcc/testsuite/ChangeLog
branches/gcc-9-branch/gcc/testsuite/g++.dg/torture/pr34850.C
branches/gcc-9-branch/gcc/tree-inline.c
branches/gcc-9-branch/gcc/tree-pass.h
branches/gcc-9-branch/gcc/tree-vect-stmts.c

  1   2   3   4   5   6   7   8   9   10   >