[Bug target/66112] __builtin_mul_overflow for int16_t emits poor code

2015-11-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66112 --- Comment #13 from Jakub Jelinek --- (In reply to ktkachov from comment #12) > r223115 caused a code quality regression that I'm seeing on aarch64 with PR > 68381. > > We have > int > foo (unsigned short x, unsigned short y) > { > int r; >

[Bug target/66112] __builtin_mul_overflow for int16_t emits poor code

2015-11-25 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66112 ktkachov at gcc dot gnu.org changed: What|Removed |Added CC||ktkachov at gcc dot gnu.org

[Bug target/66112] __builtin_mul_overflow for int16_t emits poor code

2015-05-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66112 Jakub Jelinek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug target/66112] __builtin_mul_overflow for int16_t emits poor code

2015-05-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66112 --- Comment #10 from Jakub Jelinek --- Author: jakub Date: Wed May 13 08:09:01 2015 New Revision: 223116 URL: https://gcc.gnu.org/viewcvs?rev=223116&root=gcc&view=rev Log: PR target/66112 * config/i386/i386.md (mulv4, umulv4, *um

[Bug target/66112] __builtin_mul_overflow for int16_t emits poor code

2015-05-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66112 --- Comment #9 from Jakub Jelinek --- Author: jakub Date: Wed May 13 08:07:58 2015 New Revision: 223115 URL: https://gcc.gnu.org/viewcvs?rev=223115&root=gcc&view=rev Log: PR target/66112 * internal-fn.c (get_min_precision): Use U

[Bug target/66112] __builtin_mul_overflow for int16_t emits poor code

2015-05-12 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66112 --- Comment #8 from Uroš Bizjak --- (In reply to Jakub Jelinek from comment #5) > Created attachment 35524 [details] > gcc6-pr66112-2.patch > > And i386 mulvhi4 and umulvhi4 support. For umulvhi4, I haven't found > corresponding i386.md instruc

[Bug target/66112] __builtin_mul_overflow for int16_t emits poor code

2015-05-12 Thread gcc.hall at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66112 --- Comment #7 from Jeremy --- Comment on attachment 35522 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35522 gcc5-pr66112.patch Done, PR66120

[Bug target/66112] __builtin_mul_overflow for int16_t emits poor code

2015-05-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66112 --- Comment #6 from Jakub Jelinek --- As for ARM, please file a separate enhancement request. The generic code has the means for backends to provide better patterns, but arm doesn't use them (only i386.md uses them right now), so arm maintainers

[Bug target/66112] __builtin_mul_overflow for int16_t emits poor code

2015-05-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66112 --- Comment #5 from Jakub Jelinek --- Created attachment 35524 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35524&action=edit gcc6-pr66112-2.patch And i386 mulvhi4 and umulvhi4 support. For umulvhi4, I haven't found corresponding i386.m

[Bug target/66112] __builtin_mul_overflow for int16_t emits poor code

2015-05-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66112 Jakub Jelinek changed: What|Removed |Added Attachment #35522|0 |1 is obsolete|

[Bug target/66112] __builtin_mul_overflow for int16_t emits poor code

2015-05-12 Thread gcc.hall at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66112 --- Comment #3 from Jeremy --- Related FYI, Few instructions on ARM set the overflow flag. Two that do are 32-bit add and subtract. For these two, GCC could just emit "adds" followed by "bvs" Instead it produces:- bl atoi@ add r1

[Bug target/66112] __builtin_mul_overflow for int16_t emits poor code

2015-05-12 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66112 --- Comment #2 from Uroš Bizjak --- (In reply to Jakub Jelinek from comment #1) > Created attachment 35522 [details] > gcc5-pr66112.patch > > Supposedly just using SWI248 instead of SWI48 iterator should fix this, > though not sure about all the

[Bug target/66112] __builtin_mul_overflow for int16_t emits poor code

2015-05-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66112 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #1