diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2014-04-21 20:34:10 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2014-04-21 20:34:10 +0200 |
commit | b15d92bfddbc400d6bc221c1b57d905a926bbb4c (patch) | |
tree | ab05b66d41e5cce4962b61f154dc965d9913e040 | |
parent | 4e4c8692b3ab339af21065190c46c233df332dd4 (diff) | |
download | gcc-b15d92bfddbc400d6bc221c1b57d905a926bbb4c.zip gcc-b15d92bfddbc400d6bc221c1b57d905a926bbb4c.tar.gz gcc-b15d92bfddbc400d6bc221c1b57d905a926bbb4c.tar.bz2 |
re PR target/60909 (ICE: in extract_insn, at recog.c:2202 (unrecognizable insn) with -mrdrnd and __builtin_ia32_rdrand32_step())
PR target/60909
* config/i386/i386.c (ix86_expand_builtin)
<case IX86_BUILTIN_RDRAND{16,32,64}_STEP>: Use temporary
register for target RTX.
<case IX86_BUILTIN_RDSEED{16,32,64}_STEP>: Ditto.
Testsuite/ChangeLog:
PR target/60909
* gcc.target/i386/pr60909-1.c: New test.
* gcc.target/i386/pr60909-2.c: Ditto.
From-SVN: r209545
-rw-r--r-- | gcc/ChangeLog | 74 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 39 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr60909-1.c | 11 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr60909-2.c | 11 |
5 files changed, 77 insertions, 64 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c75a816..e2024192 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,9 +1,16 @@ +2014-04-21 Uros Bizjak <ubizjak@gmail.com> + + PR target/60909 + * config/i386/i386.c (ix86_expand_builtin) + <case IX86_BUILTIN_RDRAND{16,32,64}_STEP>: Use temporary + register for target RTX. + <case IX86_BUILTIN_RDSEED{16,32,64}_STEP>: Ditto. + 2014-04-18 Cong Hou <congh@google.com> * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Enhance - the widen-mult pattern by handling two operands with different - sizes, and operands whose size is smaller than half of the result - type. + the widen-mult pattern by handling two operands with different sizes, + and operands whose size is smaller than half of the result type. 2014-04-18 Jan Hubicka <hubicka@ucw.cz> @@ -11,8 +18,7 @@ * ipa-inline-analysis.c (dump_inline_hints): Dump it. (do_estimate_edge_time): Compute it. * ipa-inline.c (want_inline_small_function_p): Bypass - INLINE_INSNS_AUTO/SINGLE limits for calls that are known - to be hot. + INLINE_INSNS_AUTO/SINGLE limits for calls that are known to be hot. 2014-04-18 Jan Hubicka <hubicka@ucw.cz> @@ -27,16 +33,14 @@ 2014-04-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com> - * config/rs6000/vsx.md (vsx_xxmrghw_<mode>): Adjust for - little-endian. + * config/rs6000/vsx.md (vsx_xxmrghw_<mode>): Adjust for little-endian. (vsx_xxmrglw_<mode>): Likewise. 2014-04-17 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/60876 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Make sure - GET_MODE_SIZE gets passed an enum machine_mode type and not - integer. + GET_MODE_SIZE gets passed an enum machine_mode type and not integer. (rs6000_init_hard_regno_mode_ok): Likewise. 2014-04-17 Jan Hubicka <hubicka@ucw.cz> @@ -186,7 +190,7 @@ * configure: Regenerate. 2014-04-17 Trevor Saunders <tsaunders@mozilla.com> - + * passes.c (dump_one_pass): don't check pass->has_gate. (execute_ipa_summary_passes): Likewise. (execute_one_pass): Likewise. @@ -230,7 +234,8 @@ 2014-04-17 Trevor Saunders <tsaunders@mozilla.com> - * pass_manager.h (pass_manager::register_dump_files_1): Remove declaration. + * pass_manager.h (pass_manager::register_dump_files_1): Remove + declaration. * passes.c (pass_manager::register_dump_files_1): Merge into (pass_manager::register_dump_files): this, and remove its handling of properties since the pass always has the properties anyway. @@ -330,8 +335,7 @@ (record_target_from_binfo): Add bases_to_consider array; record bases for types w/o instances and skip CXX destructor. (possible_polymorphic_call_targets_1): Add bases_to_consider - and consider_construction parameters; check if type may - have instance. + and consider_construction parameters; check if type may have instance. (get_polymorphic_call_info): Set maybe_in_construction to true when we know nothing. (record_targets_from_bases): Skip CXX destructors; they are @@ -348,7 +352,7 @@ 2014-04-16 Andrew Pinski <apinski@cavium.com> * config/host-linux.c (TRY_EMPTY_VM_SPACE): Change aarch64 ilp32 - definition. + definition. 2014-04-16 Eric Botcazou <ebotcazou@adacore.com> @@ -640,7 +644,7 @@ 2014-04-14 Christian Bruel <christian.bruel@st.com> - * config/sh/sh-mem.cc (sh_expand_strlen): Unroll last word. + * config/sh/sh-mem.cc (sh_expand_strlen): Unroll last word. 2014-04-14 Christian Bruel <christian.bruel@st.com> @@ -949,21 +953,21 @@ 2014-04-04 Martin Jambor <mjambor@suse.cz> PR ipa/60640 - * cgraph.h (cgraph_clone_node): New parameter added to declaration. - Adjust all callers. + * cgraph.h (cgraph_clone_node): New parameter added to declaration. + Adjust all callers. * cgraph.c (clone_of_p): Also return true if thunks match. (verify_edge_corresponds_to_fndecl): Removed extraneous call to cgraph_function_or_thunk_node and an obsolete comment. - * cgraphclones.c (build_function_type_skip_args): Moved upwards in the - file. - (build_function_decl_skip_args): Likewise. + * cgraphclones.c (build_function_type_skip_args): Moved upwards in the + file. + (build_function_decl_skip_args): Likewise. (set_new_clone_decl_and_node_flags): New function. - (duplicate_thunk_for_node): Likewise. - (redirect_edge_duplicating_thunks): Likewise. - (cgraph_clone_node): New parameter args_to_skip, pass it to - redirect_edge_duplicating_thunks which is called instead of - cgraph_redirect_edge_callee. - (cgraph_create_virtual_clone): Pass args_to_skip to cgraph_clone_node, + (duplicate_thunk_for_node): Likewise. + (redirect_edge_duplicating_thunks): Likewise. + (cgraph_clone_node): New parameter args_to_skip, pass it to + redirect_edge_duplicating_thunks which is called instead of + cgraph_redirect_edge_callee. + (cgraph_create_virtual_clone): Pass args_to_skip to cgraph_clone_node, moved setting of a lot of flags to set_new_clone_decl_and_node_flags. 2014-04-04 Jeff Law <law@redhat.com> @@ -1046,24 +1050,6 @@ (Weffc++): Remove Scott's numbering, merge lists and reference Wnon-virtual-dtor. - c-family/ - - cp/ - * class.c (accessible_nvdtor_p): New. - (check_bases): Don't check base destructor here ... - (check_bases_and_members): ... check them here. Trigger on - Wnon-virtual-dtor flag. - (finish_struct_1): Use accessible_nvdtor_p. - - testsuite/ - * g++.dg/warn/Wnvdtor.C: Add non-polymorphic case. - * g++.dg/warn/Wnvdtor-2.C: New. - * g++.dg/warn/Wnvdtor-3.C: New. - * g++.dg/warn/Wnvdtor-4.C: New. - * g++.dg/warn/Weff1.C: Delete. - * g++.old-deja/g++.benjamin/15309-1.C: Delete. - * g++.old-deja/g++.benjamin/15309-2.C: Delete. - 2014-04-03 Nick Clifton <nickc@redhat.com> * config/rl78/rl78-expand.md (movqi): Handle (SUBREG (SYMBOL_REF)) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 58fee65..859e71a 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -35400,7 +35400,8 @@ rdrand_step: else op2 = gen_rtx_SUBREG (SImode, op0, 0); - if (target == 0) + if (target == 0 + || !register_operand (target, SImode)) target = gen_reg_rtx (SImode); pat = gen_rtx_GEU (VOIDmode, gen_rtx_REG (CCCmode, FLAGS_REG), @@ -35442,7 +35443,8 @@ rdseed_step: const0_rtx); emit_insn (gen_rtx_SET (VOIDmode, op2, pat)); - if (target == 0) + if (target == 0 + || !register_operand (target, SImode)) target = gen_reg_rtx (SImode); emit_insn (gen_zero_extendqisi2 (target, op2)); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a1071cd..39ea7e1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-04-21 Uros Bizjak <ubizjak@gmail.com> + + PR target/60909 + * gcc.target/i386/pr60909-1.c: New test. + * gcc.target/i386/pr60909-2.c: Ditto. + 2014-04-18 Cong Hou <congh@google.com> * gcc.dg/vect/vect-widen-mult-u8-s16-s32.c: New test. @@ -157,7 +163,7 @@ * gcc.dg/lto/pr55113_0.c: Skip on i?86-*-solaris2.1[0-1]*. 2014-04-14 Richard Biener <rguenther@suse.de> - Marc Glisse <marc.glisse@inria.fr> + Marc Glisse <marc.glisse@inria.fr> PR c/60819 * gcc.target/i386/vec-may_alias.c: New testcase. @@ -334,8 +340,7 @@ 2014-04-08 Jason Merrill <jason@redhat.com> - * lib/gcc-dg.exp (dg-build-dso): Reset dg-do-what-default to - compile. + * lib/gcc-dg.exp (dg-build-dso): Reset dg-do-what-default to compile. 2014-04-08 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> @@ -455,10 +460,10 @@ 2014-04-04 Martin Jambor <mjambor@suse.cz> PR ipa/60640 - * g++.dg/ipa/pr60640-1.C: New test. - * g++.dg/ipa/pr60640-2.C: Likewise. - * g++.dg/ipa/pr60640-3.C: Likewise. - * g++.dg/ipa/pr60640-4.C: Likewise. + * g++.dg/ipa/pr60640-1.C: New test. + * g++.dg/ipa/pr60640-2.C: Likewise. + * g++.dg/ipa/pr60640-3.C: Likewise. + * g++.dg/ipa/pr60640-4.C: Likewise. 2014-04-04 Jeff Law <law@redhat.com> @@ -570,7 +575,7 @@ 2014-04-01 Fabien ChĂȘne <fabien@gcc.gnu.org> - * g++.dg/init/ctor4.C: Adjust. + * g++.dg/init/ctor4.C: Adjust. * g++.dg/init/ctor4-1.C: New. * g++.dg/cpp0x/defaulted2.C: Adjust. @@ -658,8 +663,8 @@ 2014-03-27 Jeff Law <law@redhat.com> - PR target/60648 - * g++.dg/pr60648.C: New test. + PR target/60648 + * g++.dg/pr60648.C: New test. 2014-03-28 Adam Butcher <adam@jessamine.co.uk> @@ -692,14 +697,13 @@ 2014-03-28 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> - * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Remove s390 special - option. + * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Remove s390 special option. * lib/target-supports.exp: Return true for s390 - in check_effective_logical_op_short_circuit. + in check_effective_logical_op_short_circuit. 2014-03-28 Kirill Yukhin <kirill.yukhin@intel.com> - * gcc.target/i386/avx512f-vshuff32x4-2.c: Fix initialization + * gcc.target/i386/avx512f-vshuff32x4-2.c: Fix initialization of second source operand. * gcc.target/i386/avx512f-vshuff64x2-2.c: Ditto. * gcc.target/i386/avx512f-vshufi32x4-2.c: Ditto. @@ -834,8 +838,8 @@ 2014-03-24 Marek Polacek <polacek@redhat.com> - * c-c++-common/ubsan/div-by-zero-4.c: Don't include limits.h. Define - INT_MIN. + * c-c++-common/ubsan/div-by-zero-4.c: Don't include limits.h. + Define INT_MIN. * c-c++-common/ubsan/overflow-1.c: Check for unwanted output. * c-c++-common/ubsan/overflow-add-1.c: Likewise. * c-c++-common/ubsan/overflow-mul-1.c: Likewise. @@ -920,8 +924,7 @@ 2014-03-21 Tobias Burnus <burnus@net-b.de> PR fortran/60599 - * lib/gcc-dg.exp (scan-module): Uncompress .mod files for - reading. + * lib/gcc-dg.exp (scan-module): Uncompress .mod files for reading. 2014-03-20 Jakub Jelinek <jakub@redhat.com> diff --git a/gcc/testsuite/gcc.target/i386/pr60909-1.c b/gcc/testsuite/gcc.target/i386/pr60909-1.c new file mode 100644 index 0000000..5a1ac3c --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr60909-1.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-mrdrnd" } */ + +extern void bar (int); + +void +foo (unsigned *u) +{ + int i = __builtin_ia32_rdrand32_step (u); + bar (i); +} diff --git a/gcc/testsuite/gcc.target/i386/pr60909-2.c b/gcc/testsuite/gcc.target/i386/pr60909-2.c new file mode 100644 index 0000000..dd35668 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr60909-2.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-mrdseed" } */ + +extern void bar (int); + +void +foo (unsigned *u) +{ + int i = __builtin_ia32_rdseed_si_step (u); + bar (i); +} |