[Bug target/50447] [avr] Better support of AND, OR, XOR and PLUS with constant integers for 16- and 32-bit values
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50447 --- Comment #6 from Georg-Johann Lay gjl at gcc dot gnu.org 2011-10-19 14:59:05 UTC --- Author: gjl Date: Wed Oct 19 14:59:00 2011 New Revision: 180193 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=180193 Log: PR target/50447 * config/avr/avr.md (cc): New alternative out_plus_noclobber. (adjust_len): Ditto. (addhi3): Don't pipe through short; use gen_int_mode instead. Prior to reload, expand to gen_addhi3_clobber. (*addhi3): Use avr_out_plus_noclobber if applicable, use out_plus_noclobber in cc and adjust_len attribute. (addhi3_clobber): 2 new RTL peepholes. (addhi3_clobber): New insn. * config/avr/avr-protos.h: (avr_out_plus_noclobber): New prototype. * config/avr/avr.c (avr_out_plus_noclobber): New function. (notice_update_cc): Handle CC_OUT_PLUS_NOCLOBBER. (avr_out_plus_1): Tweak if only MSB is +/-1 and other bytes are 0. Set cc0 to set_zn for adiw on 16-bit values. (adjust_insn_length): Handle ADJUST_LEN_OUT_PLUS_NOCLOBBER. (expand_epilogue): No need to add 0 to frame_pointer_rtx. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr-protos.h trunk/gcc/config/avr/avr.c trunk/gcc/config/avr/avr.md
[Bug target/50447] [avr] Better support of AND, OR, XOR and PLUS with constant integers for 16- and 32-bit values
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50447 --- Comment #5 from Georg-Johann Lay gjl at gcc dot gnu.org 2011-10-11 18:28:52 UTC --- Author: gjl Date: Tue Oct 11 18:28:49 2011 New Revision: 179816 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=179816 Log: PR target/50447 * config/avr/avr.md (cc): Add out_plus attribute alternative. (addsi3): Use it. Adapt avr_out_plus to new prototype. Use avr_out_plus for all CONST_INT addends. * config/avr/avr-protos.h (avr_out_plus): Change prototype. * config/avr/avr.c (notice_update_cc): Call avr_out_plus on CC_OUT_PLUS. (avr_out_plus_1): Change prototype and report effect on cc0. (avr_out_plus): Ditto. (adjust_insn_length): Adapt call to avr_out_plus to new prototype. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr-protos.h trunk/gcc/config/avr/avr.c trunk/gcc/config/avr/avr.md
[Bug target/50447] [avr] Better support of AND, OR, XOR and PLUS with constant integers for 16- and 32-bit values
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50447 --- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org 2011-09-23 17:02:20 UTC --- Author: gjl Date: Fri Sep 23 17:02:10 2011 New Revision: 179123 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=179123 Log: PR target/50447 * config/avr/avr.md: (adjust_len): Add alternative out_plus. (addsi3): Rewrite using QI scratch register. Adjust text peepholes using plus:SI. (*addsi3_zero_extend.hi): New insn. (*subsi3_zero_extend.hi): New insn. (*subhi3_zero_extend1): Set attribute cc to set_czn. (*subsi3_zero_extend): Ditto. (subsi3): Change predicate #2 to register_operand. * config/avr/avr-protos.h (avr_out_plus): New prototype. (avr_out_plus_1): New static function. (avr_out_plus): New function. (adjust_insn_length): Handle ADJUST_LEN_OUT_PLUS. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr-protos.h trunk/gcc/config/avr/avr.c trunk/gcc/config/avr/avr.md
[Bug target/50447] [avr] Better support of AND, OR, XOR and PLUS with constant integers for 16- and 32-bit values
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50447 --- Comment #3 from Georg-Johann Lay gjl at gcc dot gnu.org 2011-09-23 17:06:49 UTC --- Author: gjl Date: Fri Sep 23 17:06:44 2011 New Revision: 179124 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=179124 Log: * config/avr/avr.md (adjust_len): Add alternatives tsthi, tstsi, compare. (*cmpqi_sign_extend): Use s8_operand. (*cmphi, *cmpsi): Rewrite using avr_out_compare. * config/avr/avr-protos.h (compare_diff_p, compare_eq_p): Remove prototypes. (out_tsthi, out_tstsi): Remove prototypes. (avr_out_tsthi, avr_out_tstsi): New prototypes. * config/avr/avr.c (out_tsthi, out_tstsi): Remove functions. (avr_asm_len): Negative length now sets *plen to -length. (compare_sign_p): Return bool instead of int. (compare_diff_p, compare_eq_p): Ditto and make static. (avr_out_tsthi): New function. (avr_out_tstsi): New function. (avr_out_compare): New function. (adjust_insn_length): Handle ADJUST_LEN_TSTHI, ADJUST_LEN_TSTSI, ADJUST_LEN_COMPARE. PR target/50447 Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr-protos.h trunk/gcc/config/avr/avr.c trunk/gcc/config/avr/avr.md
[Bug target/50447] [avr] Better support of AND, OR, XOR and PLUS with constant integers for 16- and 32-bit values
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50447 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #4 from Georg-Johann Lay gjl at gcc dot gnu.org 2011-09-23 17:11:06 UTC --- Closed this one as fixed for 4.7 trunk.
[Bug target/50447] [avr] Better support of AND, OR, XOR and PLUS with constant integers for 16- and 32-bit values
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50447 --- Comment #1 from Georg-Johann Lay gjl at gcc dot gnu.org 2011-09-22 09:55:21 UTC --- Author: gjl Date: Thu Sep 22 09:55:13 2011 New Revision: 179081 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=179081 Log: PR target/50447 PR target/50465 * config/avr/avr-protos.h (avr_out_bitop): New prototype. (avr_popcount_each_byte): New prototype. * config/avr/avr.c (avr_popcount): New static function. (avr_popcount_each_byte): New function. (avr_out_bitop): New function. (adjust_insn_length): ADJUST_LEN_OUT_BITOP dispatches to avr_out_bitop. Cleanup code. * config/avr/constraints.md (Ca2, Co2, Cx2): New constraints. (Ca4, Co4, Cx4): New constraints. * config/avr/avr.md (adjust_len): Add out_bitop insn attribute alternative. (andhi3, iorhi3, xorhi3): Rewrite insns using avr_out_bitop. (andsi3, iorsi3, xorsi3): Ditto. (*iorhi3_clobber, *iorsi3_clobber): Remove insns. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr-protos.h trunk/gcc/config/avr/avr.c trunk/gcc/config/avr/avr.md trunk/gcc/config/avr/constraints.md
[Bug target/50447] [avr] Better support of AND, OR, XOR and PLUS with constant integers for 16- and 32-bit values
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50447 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Keywords||missed-optimization Last reconfirmed||2011-09-18 CC||eric.weddington at atmel ||dot com Ever Confirmed|0 |1 Target Milestone|--- |4.7.0 Known to fail||4.6.1 Severity|normal |enhancement