[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049 --- Comment #20 from Georg-Johann Lay gjl at gcc dot gnu.org 2011-09-18 12:22:58 UTC --- See also http://lists.gnu.org/archive/html/avr-gcc-list/2008-12/msg9.html
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049 --- Comment #18 from Georg-Johann Lay gjl at gcc dot gnu.org 2011-06-21 17:30:57 UTC --- Author: gjl Date: Tue Jun 21 17:30:54 2011 New Revision: 175269 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=175269 Log: PR target/33049 * config/avr/avr.md (extzv): New expander. (*extzv): New insn. (*extzv.qihi1, *extzv.qihi2): New insn-and-split. * config/avr/constraints.md (C04): New constraint. * doc/md.texi (Machine Constraints): Document it. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr.md trunk/gcc/config/avr/constraints.md trunk/gcc/doc/md.texi
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #19 from Georg-Johann Lay gjl at gcc dot gnu.org 2011-06-21 17:36:35 UTC --- Closing as resolved+fixed according to applied patch.
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049 --- Comment #16 from Georg-Johann Lay gjl at gcc dot gnu.org 2011-06-20 10:50:27 UTC --- *** Bug 49446 has been marked as a duplicate of this bug. ***
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added AssignedTo|unassigned at gcc dot |gjl at gcc dot gnu.org |gnu.org | --- Comment #17 from Georg-Johann Lay gjl at gcc dot gnu.org 2011-06-20 10:58:59 UTC --- Created attachment 24563 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24563 pr33049.diff Patch also covering PR49446. Tested without regression against SVN 175201 PR target/33049 * config/avr/avr.md (extzv): New expander. (*extzv, *extzv.qihi1, *extzv.qihi2): New insn-and-split.
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |4.7.0
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049 HotHead gcc at emailgo dot de changed: What|Removed |Added CC||gcc at emailgo dot de --- Comment #15 from HotHead gcc at emailgo dot de 2011-06-17 21:38:20 UTC --- *** Bug 49446 has been marked as a duplicate of this bug. ***
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added CC||gjl at gcc dot gnu.org --- Comment #14 from Georg-Johann Lay gjl at gcc dot gnu.org 2011-05-30 14:33:31 UTC --- (In reply to comment #13) Yep it looks a lot better now. The if statements could be optimized into the equivalent shift instructions but that is not a AVR backend problem I guess. Shifting generally is more expensive instead of bit extracting; at least if the bit offset is known at compile time. I noticed that the disassembly shows wrong lengths for some outputs of extzv. Is that a problem? It's not a problem if the sequence actually printed is not greater than the instruction length reported. If the reported instruction length was strinct greater, an assembler error could occur because relative jump offets migh be out of scope. The only case where the instruction length is smaller than reported is if IN_REG=OUT_REG and BITPOS=4 (sequence is swap + andi 1). The instruction length for lsr + andi 1 (IN_REG=OUT_REG, BITPOS=1) is already corrected in the patch.
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049 Wouter van Gulik wvangulik at xs4all dot nl changed: What|Removed |Added Known to fail|| --- Comment #13 from Wouter van Gulik wvangulik at xs4all dot nl 2011-05-19 10:38:38 UTC --- Yep it looks a lot better now. The if statements could be optimized into the equivalent shift instructions but that is not a AVR backend problem I guess. I noticed that the disassembly shows wrong lengths for some outputs of extzv. Is that a problem?
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049 --- Comment #12 from Georg-Johann Lay gjl at gcc dot gnu.org 2011-05-18 08:06:53 UTC --- Created attachment 24277 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24277 Proposed patch Patch that is less fuzzy in its attributes.
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049 --- Comment #10 from Georg-Johann Lay gjl at gcc dot gnu.org 2011-05-17 18:57:39 UTC --- Created attachment 24264 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24264 Proposed patch. Proposed Patch (also compatible with older versions of GCC). The insn needs at most 3 instructions and does not put pressure on d-regs. * config/avr/avr.md (*extzv): New insn.
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049 --- Comment #11 from Georg-Johann Lay gjl at gcc dot gnu.org 2011-05-17 19:00:05 UTC --- Created attachment 24265 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24265 Assembler output from 4.7.0 (r173832) with patch applied. Assembler output from 4.7.0 (r173832) with patch applied. There's not much room for improvement left now.
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
--- Comment #8 from abnikant dot singh at atmel dot com 2010-09-14 06:23 --- Created an attachment (id=21787) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21787action=view) Test case assembler output for 4.5.0. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
--- Comment #9 from abnikant dot singh at atmel dot com 2010-09-14 06:25 --- Lot better code size in gcc-4.5.0 and above [head]. See the attachment in comment #8. -- abnikant dot singh at atmel dot com changed: What|Removed |Added CC||abnikant dot singh at atmel ||dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
--- Comment #4 from wvangulik at xs4all dot nl 2007-08-24 18:52 --- Created an attachment (id=14105) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14105action=view) Assembler output of testcase using 4.1.2 This is the requested assembler output that Eric asked for -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
--- Comment #5 from eweddington at cso dot atmel dot com 2007-08-24 20:25 --- Created an attachment (id=14106) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14106action=view) Correct assembler output of test case for 4.1.2. -- eweddington at cso dot atmel dot com changed: What|Removed |Added Attachment #14105|0 |1 is obsolete|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
--- Comment #6 from eweddington at cso dot atmel dot com 2007-08-24 20:30 --- Created an attachment (id=14107) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14107action=view) Test case assembler output for 4.2.1. Not really any better than 4.1.2. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
--- Comment #7 from eweddington at cso dot atmel dot com 2007-08-24 20:35 --- Created an attachment (id=14108) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14108action=view) Test case assembler output for 4.3.0 20070817 snapshot. Again, only marginally better. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
-- eweddington at cso dot atmel dot com changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords||missed-optimization Known to fail||4.1.2 4.2.1 4.3.0 Last reconfirmed|-00-00 00:00:00 |2007-08-24 20:35:53 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
--- Comment #3 from eweddington at cso dot atmel dot com 2007-08-22 16:57 --- Wouter, please attach the assembly output that you are getting for your test.c file using 4.1.2. That way we can compare it to other compiler versions. Thanks, Eric -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049
[Bug target/33049] AVR: bit extraction non optimal, inversing logic solves problem
--- Comment #2 from pinskia at gcc dot gnu dot org 2007-08-11 17:58 --- It might be interesting if you tried 4.2.1. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049