[Bug target/25128] [m68k] Suboptimal comparisons against 65536
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25128 Jeffrey A. Law changed: What|Removed |Added Status|NEW |RESOLVED CC||law at redhat dot com Resolution|--- |FIXED --- Comment #4 from Jeffrey A. Law --- Fixed on the trunk.
[Bug target/25128] [m68k] Suboptimal comparisons against 65536
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25128 --- Comment #3 from Jeffrey A. Law --- Author: law Date: Mon Nov 21 18:19:12 2016 New Revision: 242676 URL: https://gcc.gnu.org/viewcvs?rev=242676=gcc=rev Log: PR target/25128 * config/m68k/predicates.md (swap_peephole_relational_operator): New predicate. * config/m68k/m68k.md (relational tests against 65535/65536): New peephole2. PR target/25128 * gcc.target/m68k/pr25128.c: New test. Added: trunk/gcc/testsuite/gcc.target/m68k/pr25128.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/m68k/m68k.md trunk/gcc/config/m68k/predicates.md trunk/gcc/testsuite/ChangeLog
[Bug target/25128] [m68k] Suboptimal comparisons against 65536
--- Comment #2 from gunnar at greyhound-data dot com 2008-06-10 16:02 --- Note that cmp.l #65535,%d0 jbhi .L10 can be replaced with swap %d0 tst.w %d0 jbne .L10 A similar trick can be applied to signed comparisons as well. But this trick will run slower on the higher 68k CPUs. On 68040 or 68060 or SuperScalar Coldfire its better to generate less instructions that do not have dependancies. I think cmp.l #65535,%d0 is the code that should be generated by O2 as its faster on many 68K models. The shorter two instruction trick might be an option for compile optiont Os Kind regards Gunnar von Boehn -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25128
[Bug target/25128] [m68k] Suboptimal comparisons against 65536
-- kazu at gcc dot gnu dot org changed: What|Removed |Added Severity|normal |enhancement http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25128
[Bug target/25128] [m68k] Suboptimal comparisons against 65536
--- Comment #1 from pinskia at gcc dot gnu dot org 2005-11-28 05:04 --- Confirmed. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2005-11-28 05:04:23 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25128