gcc

~vcs-imports/gcc/+git/gcc:hjl/pr67963/master

Last commit made on 2015-10-19
Get this branch:
git clone -b hjl/pr67963/master https://git.launchpad.net/~vcs-imports/gcc/+git/gcc

Branch merges

Branch information

Name:
hjl/pr67963/master
Repository:
lp:~vcs-imports/gcc/+git/gcc

Recent commits

7ca3b35... by "H.J. Lu" <email address hidden>

Properly handle -miamcu and -march=lakemont

-miamcu specifies how parameters are passed to functions and how value
is returned from a function. Inside function, we can use instructions
supported by -march=XXX. -miamcu -march=haswell can generate x87, SSE
and AVX instructions as long as the IA MCU psABI is followed. But since
Lakemont processor doesn't support x87 instructions, we shouldn't
generate x87 instructions with -march=lakemont. This patch separates
code generation from -miamcu and makes -march=lakemont not to generate
x87 instructions.

gcc/

 PR target/67963
 PR target/67985
 * common/config/i386/i386-common.c (ix86_handle_option): Remove
 OPT_miamcu handling.
 * config/i386/i386.c (PTA_NO_80387): New macro.
 (processor_alias_table): Add PTA_NO_80387 to lakemont.
 (ix86_option_override_internal): Update MASK_80387 from
 PTA_NO_80387. Don't warn x87/MMX/SSE/AVX for -miamcu. Warn
 SSE math only if 80387 is supported. Don't change
 MASK_FLOAT_RETURNS.
 (ix86_valid_target_attribute_tree): Enable FPMATH_387 only if
 80387 is supported.
 * config/i386/i386.h (TARGET_FLOAT_RETURNS_IN_80387): True only
 if TARGET_80387 is true and TARGET_IAMCU is false.
 (TARGET_FLOAT_RETURNS_IN_80387_P): True only if TARGET_80387_P
 is true and TARGET_IAMCU_P is false.

gcc/testsuite/

 PR target/67963
 PR target/67985
 * gcc.target/i386/pr67963-1.c: New test.
 * gcc.target/i386/pr67963-2.c: Likewise.
 * gcc.target/i386/pr67963-3.c: Likewise.
 * gcc.target/i386/pr67985-1.c: Likewise.
 * gcc.target/i386/pr67985-2.c: Likewise.
 * gcc.target/i386/pr67985-3.c: Likewise.

8587f7e... by law <law@138bc75d-0d04-0410-961f-82ee72b054a4>

[PATCH] Don't allow FSM threader to create irreducible loops unless it eliminates a multi-way branch

 * tree-ssa-threadupdate.c (valid_jump_thread_path): Reject paths
 that create irreducible loops unless the path elimiantes a multiway
 branch.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228974 138bc75d-0d04-0410-961f-82ee72b054a4

df10fba... by rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>

2015-10-19 Richard Biener <email address hidden>

 PR tree-optimization/67975
 * tree-cfg.h (extract_true_false_controlled_edges): Declare.
 * tree-cfg.c (extract_true_false_controlled_edges): Split out
 core worker from ...
 * tree-ssa-loop-im.c (extract_true_false_args_from_phi): ... here.
 * tree-ssa-sccvn.c (vn_phi_compute_hash): Hash number of args
 instead of block number for PHIs with two or one args.
 (vn_phi_eq): Compare edge predicates of PHIs that are in different
 blocks.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228971 138bc75d-0d04-0410-961f-82ee72b054a4

ec11da3... by rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>

2015-10-19 Richard Biener <email address hidden>

 * gimple-fold.c (gimple_phi_nonnegative_warnv_p): New function.
 (gimple_stmt_nonnegative_warnv_p): Use it.
 * match.pd (CPROJ): New operator list.
 (cproj (complex ...)): Move simplifications from ...
 * builtins.c (fold_builtin_cproj): ... here.

 * gcc.dg/torture/builtin-cproj-1.c: Skip for -O0.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228970 138bc75d-0d04-0410-961f-82ee72b054a4

b6ec4d7... by hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>

Use GET_MODE_BITSIZE to get vector natural alignment

Since GET_MODE_ALIGNMENT is defined by psABI and the biggest alignment
is 4 byte for IA MCU psABI, we should use GET_MODE_BITSIZE for IA MCU
psABI to get vector natural alignment to check misaligned vector move.

 * config/i386/i386.c (ix86_expand_vector_move): Use
 GET_MODE_BITSIZE for IA MCU psABI to get vector natural
 alignment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228969 138bc75d-0d04-0410-961f-82ee72b054a4

d821af0... by hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>

Replace @optindex with @opindex

 * doc/invoke.texi: Replace @optindex with @opindex.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228968 138bc75d-0d04-0410-961f-82ee72b054a4

00a7b29... by hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>

Don't leak ISA to __attribute__ ((target("arch=XXX")))

When processing __attribute__ ((target("arch=XXX"))), we should clear
the ISA bits in x_ix86_isa_flags first to avoid leaking ISA from
command line.

gcc/

 PR target/67995
 * config/i386/i386.c (ix86_valid_target_attribute_tree): If
 arch= is set, clear all bits in x_ix86_isa_flags, except for
 ISA_64BIT, ABI_64, ABI_X32, and CODE16.

gcc/testsuite/

 PR target/67995
 * gcc.target/i386/pr67995-1.c: New test.
 * gcc.target/i386/pr67995-2.c: Likewise.
 * gcc.target/i386/pr67995-3.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228967 138bc75d-0d04-0410-961f-82ee72b054a4

b8ab248... by vondele <vondele@138bc75d-0d04-0410-961f-82ee72b054a4>

fix date of changelog entry

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228966 138bc75d-0d04-0410-961f-82ee72b054a4

c071eed... by vondele <vondele@138bc75d-0d04-0410-961f-82ee72b054a4>

Fix PR68002, add -fkeep-static-functions

gcc/ChangeLog:

2015-10-17 Joost VandeVondele <email address hidden>

        PR middle-end/68002
        * common.opt (fkeep-static-functions): New option.
        * doc/invoke.texi: Document it.
        * cgraphunit.c (cgraph_node::finalize_function): Use it.

gcc/testsuite/ChangeLog:

2015-10-17 Joost VandeVondele <email address hidden>

        PR middle-end/68002
        * gcc.dg/PR68002.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228965 138bc75d-0d04-0410-961f-82ee72b054a4

cd5ad70... by rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>

Remove undefined behaviour from builtins-20.c

builtins-20.c had:

      if (cos((y*=2, -fabs(tan(x/-y)))) != cos((y*=2,tan(x/y))))
        link_error ();

which is undefined behaviour. The test expected that y had the same
value in x/y and x/-y, but gimplification actually implements the
"obvious" interpretation, multiplying y by 2, using it for one cos call,
then multiplying it by 2 again and using it for the other cos call.

The file has other (valid) tests that side-effects don't block
optimisation, such as:

      if (cosf((y*=3, -x)) != cosf((y*=3,x)))
        link_error ();

so this patch simply removes this instance.

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.

gcc/testsuite/
 * gcc.dg/builtins-20.c: Remove undefined behavior.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228963 138bc75d-0d04-0410-961f-82ee72b054a4