https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87031
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEW
Assignee|rguenth at gcc dot gnu.org |unassigned at gcc dot
gnu.org
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
diff --git a/gcc/tree-ssa-loop-ivcanon.cc b/gcc/tree-ssa-loop-ivcanon.cc
index 48b126dfcf8..34aee688974 100644
--- a/gcc/tree-ssa-loop-ivcanon.cc
+++ b/gcc/tree-ssa-loop-ivcanon.cc
@@ -843,7 +843,7 @@ try_unroll_loop_completely (class loop *loop,
cautious on guessing if the unrolling is going to be
profitable.
Move from estimated_unrolled_size to unroll small loops. */
- if (unr_insns * 2 / 3
+ if ((cunrolli ? unr_insns : unr_insns * 2 / 3)
/* If there is IV variable that will become constant, we
save one instruction in the loop prologue we do not
account otherwise. */
has surprisingly big testsuite fallout. Part of it will be addressed
(by testsuite adjustments) with the change for PR115825, but there's
+FAIL: g++.dg/opt/pr80275.C -std=gnu++14 scan-tree-dump optimized "return 1;"
+FAIL: gcc.dg/Warray-bounds-68.c (test for warnings, line 18)
+FAIL: gcc.dg/pr80492.c scan-tree-dump-times optimized "reg = " 4
+FAIL: gcc.dg/tree-ssa/cunroll-1.c scan-tree-dump cunrolli "Last iteration exit
edge was proved true."
+FAIL: gcc.dg/tree-ssa/cunroll-1.c scan-tree-dump cunrolli "loop with 2
iterations completely unrolled"
+FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM <unsigned
long> \\\\[\\\\(char \\\\*\\\\)\\\\&a8] = "
+FAIL: gcc.dg/tree-ssa/loop-37.c scan-tree-dump-not optimized "my_array"
+FAIL: gcc.dg/tree-ssa/ssa-dom-cse-5.c scan-tree-dump-times dom2 "return 3;" 1
+FAIL: gcc.dg/tree-ssa/vrp-unreachable-2.c scan-tree-dump-not optimized "foo "
+FAIL: gcc.dg/tree-ssa/vrp88.c scan-tree-dump vrp1 "Folded into: if.*"
+FAIL: gcc.dg/vect/no-vfa-vect-dv-2.c -flto -ffat-lto-objects
scan-tree-dump-times vect "vectorized 3 loops" 1
+FAIL: gcc.dg/vect/no-vfa-vect-dv-2.c scan-tree-dump-times vect "vectorized 3
loops" 1
+FAIL: gcc.target/i386/part-vect-popcount-1.c scan-assembler-times
vpopcntb[^\\n\\r]*xmm[0-9] 3
+XPASS: gcc.target/i386/pr100637-4w.c scan-assembler pcmpgtw
+FAIL: gcc.target/i386/pr103861-3.c scan-assembler pavgb
+FAIL: gcc.target/i386/pr103941-1.c scan-assembler pavgb
+XPASS: gcc.target/i386/pr98218-3a.c scan-assembler pcmpgtd
so we do quite rely on "optimisting" non-growing estimation.