* config/rs6000/rs6000.c (SPE_CONST_OFFSET_OK): Delete.
(rs6000_legitimate_offset_address_p): Return false for anything in
V2SImode or V2SFmode.
From-SVN: r249163
This removes the vector modes that were only used by SPE. It also
rearranges things so it is easier to see what is there, and for what.
* config/rs6000/rs6000-modes.def: Remove all 8-byte vector modes
except V2SF and V2SI. Rearrange the vector modes, and add comments.
* config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove V8QImode
and V4HImode.
(reg_offset_addressing_ok_p): Remove V4HImode and V1DImode.
(rs6000_legitimate_offset_address_p): Ditto.
(rs6000_emit_move): Ditto.
(rs6000_init_builtins): Remove V4HI_type_node.
From-SVN: r249162
Fix buglet in Gogo::write_globals-- in a couple of places the
wrong Bfunction was being used for the containing (not target)
function when creating calls for init functions.
Reviewed-on: https://go-review.googlesource.com/45510
From-SVN: r249159
After r249013, die () and dump_stack () are both in cold section. This makes
the compiler generate bl instruction for the function call, instead of
honoring the -mlong-calls option.
This patch changes the dump_stack function call conditional, which fixes the
regression.
gcc/testsuite/
* gcc.target/arm/cold-lc.c: Update coding style, call dump_stack
conditionally.
From-SVN: r249157
If there is no function name, the traceback is generally
uninformative. In earlier versions we did not show such frames.
Restore that behavior. These frames can be seen with GOTRACEBACK=system.
Reviewed-on: https://go-review.googlesource.com/45431
From-SVN: r249156
2017-06-13 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/80803
PR tree-optimization/81063
* tree-sra.c (subtree_mark_written_and_enqueue): Move up in the file.
(propagate_subaccesses_across_link): Enqueue subtree whneve necessary
instead of relying on the caller.
testsuite/
gcc.dg/tree-ssa/pr80803.c: New test.
gcc.dg/tree-ssa/pr81063.c: Likewise.
From-SVN: r249154
2017-06-13 Martin Jambor <mjambor@suse.cz>
* tree-sra.c (add_access_to_work_queue): Only enqueue accesses
that have a first_link.
(sort_and_splice_var_accesses): Do not check first_link before
enquing.
(subtree_mark_written_and_enqueue): Likewise.
(propagate_all_subaccesses): Likewise and do not stop at first
parent with a first_link.
From-SVN: r249153
2017-06-13 Yury Gribov <tetra2005@gmail.com>
gcc/
* tree-vrp.c (is_masked_range_test): New function.
(register_edge_assert_for): Determine ranges for
some bit tests.
From-SVN: r249150
2017-06-13 Richard Biener <rguenther@suse.de>
* tree-vect-loop.c (vect_model_reduction_cost): Do not fail,
instead get vector type from stmt_info.
(vectorizable_reduction): Adjust. Remove dead code.
From-SVN: r249145
2017-06-13 Richard Biener <rguenther@suse.de>
PR middle-end/81065
* fold-const.c (extract_muldiv_1): Remove bogus distribution
case of C * (x * C2 + C3).
(fold_addr_of_array_ref_difference): Properly fold index difference.
* c-c++-common/ubsan/pr81065.c: New testcase.
From-SVN: r249144
Otherwise it may be set when the g struct is reused via gfput/gfget.
Test is golang.org/x/net/http2 with GOMAXPROCS=12.
Reviewed-on: https://go-review.googlesource.com/45430
From-SVN: r249143
Also always access the atomicstatus field atomically.
The effect of not checking the _Gscan bit is that if the GC decides to
scan the stack just as the goroutine is leaving the system call, the
goroutine might fail to call exitsyscall. Then then typically causes
a runtime assertion failure later on. If we do call exitsyscall as we
should, it will stall (in casgstatus) until the _Gscan bit is cleared.
No separate test. I've observed causing sporadic failures running the
misc/cgo tests, but we don't currently have a way to run those
routinely for gccgo. I should fix that.
Reviewed-on: https://go-review.googlesource.com/45392
From-SVN: r249138
As discussed in PR c++/80265 ("__builtin_{memcmp,memchr,strlen} are
not usable in constexpr functions"), use __builtin_constant_p to tell
whether we can defer to a constexpr algorithm.
I used __always_inline__ just to be thorough. It isn't really really
necessary as far as I could determine.
Changes like these:
if (__n == 0)
return 0;
- return wmemcmp(__s1, __s2, __n);
+ else
+ return wmemcmp(__s1, __s2, __n);
are necessary otherwise G++ complains that we're calling a
non-constexpr function, which looks like a a manifestation of PR67026
to me.
libstdc++-v3:
2017-06-12 Pedro Alves <palves@redhat.com>
* doc/xml/manual/status_cxx2017.xml: Update C++17 constexpr
char_traits status.
* doc/html/*: Regenerate.
* include/bits/char_traits.h (_GLIBCXX_ALWAYS_INLINE): Define if
not already defined.
(__cpp_lib_constexpr_char_traits): Uncomment.
(__constant_string_p, __constant_char_array_p): New.
(std::char_traits<char>, std::char_traits<wchar_t>): Add
_GLIBCXX17_CONSTEXPR on compare, length and find and use
__constant_string_p, __constant_char_array_p and
__builtin_constant_p to defer to __gnu_cxx::char_traits at compile
time.
* testsuite/21_strings/char_traits/requirements/
constexpr_functions_c++17.cc: Uncomment
__cpp_lib_constexpr_char_traits tests. Uncomment
test_compare<char>, test_length<char>, test_find<char>,
test_compare<wchar_t>, test_length<wchar_t> and test_find<wchar_t>
static_assert tests.
From-SVN: r249137
The method Type_conversion_expression::do_get_backend was (in some
circumstances) creating a Bexpression for the source expression of the
conversion and then throwing it away before using it. Fix up this
method to insure that the call to get_backend() on the source
expression is only made when the result will be used.
Reviewed-on: https://go-review.googlesource.com/45350
From-SVN: r249131
PR libstdc++/55917
* src/c++11/thread.cc (execute_native_thread_routine): Remove
try-block so that exceptions propagate out of the thread and terminate
is called by the exception-handling runtime.
(execute_native_thread_routine_compat): Likewise.
* testsuite/30_threads/thread/cons/terminate.cc: New.
From-SVN: r249130
The make_field_assignment code:
src = force_to_mode (src, mode,
GET_MODE_PRECISION (mode) >= HOST_BITS_PER_WIDE_INT
? HOST_WIDE_INT_M1U
: (HOST_WIDE_INT_1U << len) - 1,
0);
would ignore the field length len for DImode, even though DImode can be
handled using HWIs. I think the code should be testing len instead.
2017-06-12 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
* combine.c (make_field_assignment): Check len rather than the mode
precision when calling force_to_mode.
From-SVN: r249128
2017-06-12 Martin Liska <mliska@suse.cz>
PR tree-optimization/81041
* tree-profile.c (gimple_gen_ic_func_profiler):
Create an extra BB in profile-generate
(gimple_gen_time_profiler): Likewise.
From-SVN: r249120
PR tree-optimization/81003
* tree-ssa-reassoc.c (force_into_ssa_name): New function.
(update_range_test): Use it instead of force_gimple_operand_gsi.
* gcc.c-torture/compile/pr81003.c: New test.
From-SVN: r249114
2017-06-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/81053
* tree-vect-loop.c (vect_is_simple_reduction): Handle PHI
with backedge value not defined in loop. Simplify def stmt
compute.
* gcc.dg/torture/pr81053.c: New testcase.
From-SVN: r249113
* elf.c (backtrace_initialize): Always set *fileline_fn.
* ttest.c: New file.
* btest.c: Move support functions into testlib.c. Change calls to
check to pass file name.
* testlib.c: New file, copied from (part of) btest.c.
* testlib.h: New file, declarations for testlib.c.
* edtest.c: Use testlib.h and testlib.c.
* configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
* Makefile.am (btest_SOURCES): Add testlib.c.
(edtest_SOURCES): Likewise.
(CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
(ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
* configure, Makefile.in: Rebuild.
From-SVN: r249111
2017-06-11 Tom de Vries <tom@codesourcery.com>
PR target/79939
* config/nvptx/nvptx.c (nvptx_cannot_force_const_mem): New function.
Return true.
(TARGET_CANNOT_FORCE_CONST_MEM): Redefine to
nvptx_cannot_force_const_mem.
From-SVN: r249106
* tree.h (id_equal): New.
* dwarf2out.c, hsa-gen.c, ipa-devirt.c, omp-expand.c,
omp-simd-clone.c, read-rtl-function.c, tree-chkp.c, tree.c: Use it
instead of strcmp of IDENTIFIER_POINTER.
c-family/
* c-ada-spec.c, c-pragma.c: Use it.
cp/
* cp-tree.h, decl2.c, mangle.c, parser.c, pt.c, semantics.c: Use it.
From-SVN: r249103
This is a second patch to make the prologue code more manageable.
* config/rs6000/rs6000.c (emit_vrsave_prologue): New function,
factored out from ...
(rs6000_emit_prologue): ... here.
From-SVN: r249096