[Bug tree-optimization/85694] Generation of vectorized AVG (Average) instruction

2018-07-03 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85694 Uroš Bizjak changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug tree-optimization/85694] Generation of vectorized AVG (Average) instruction

2018-07-03 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85694 --- Comment #10 from uros at gcc dot gnu.org --- Author: uros Date: Tue Jul 3 17:33:28 2018 New Revision: 262354 URL: https://gcc.gnu.org/viewcvs?rev=262354=gcc=rev Log: PR target/85694 * config/i386/sse.md (uavg3_ceil): New

[Bug tree-optimization/85694] Generation of vectorized AVG (Average) instruction

2018-07-03 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85694 --- Comment #9 from Uroš Bizjak --- Created attachment 44348 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44348=edit x86 target patch I'm testing the attached patch for x86 targets.

[Bug tree-optimization/85694] Generation of vectorized AVG (Average) instruction

2018-07-03 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85694 rsandifo at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|NEW

[Bug tree-optimization/85694] Generation of vectorized AVG (Average) instruction

2018-07-03 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85694 --- Comment #7 from rsandifo at gcc dot gnu.org --- Author: rsandifo Date: Tue Jul 3 14:27:28 2018 New Revision: 262347 URL: https://gcc.gnu.org/viewcvs?rev=262347=gcc=rev Log: [17/n] PR85694: AArch64 support for AVG_FLOOR/CEIL This patch

[Bug tree-optimization/85694] Generation of vectorized AVG (Average) instruction

2018-07-03 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85694 --- Comment #6 from rsandifo at gcc dot gnu.org --- Author: rsandifo Date: Tue Jul 3 10:03:44 2018 New Revision: 262335 URL: https://gcc.gnu.org/viewcvs?rev=262335=gcc=rev Log: [16/n] PR85694: Add detection of averaging operations This patch

[Bug tree-optimization/85694] Generation of vectorized AVG (Average) instruction

2018-05-09 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85694 rsandifo at gcc dot gnu.org changed: What|Removed |Added Status|NEW |ASSIGNED

[Bug tree-optimization/85694] Generation of vectorized AVG (Average) instruction

2018-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85694 --- Comment #4 from Richard Biener --- OK, so adding another pattern plus IFN would be the canonical way of vectorizing this.

[Bug tree-optimization/85694] Generation of vectorized AVG (Average) instruction

2018-05-08 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85694 --- Comment #3 from Uroš Bizjak --- (In reply to Richard Biener from comment #2) > Hmm, but if you have 255 + 255 + 1 then you need to use pavgw at least, > otherwise the vectorization isn't semantically equivalent? Or do the > instructions

[Bug tree-optimization/85694] Generation of vectorized AVG (Average) instruction

2018-05-08 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85694 --- Comment #2 from Richard Biener --- Hmm, but if you have 255 + 255 + 1 then you need to use pavgw at least, otherwise the vectorization isn't semantically equivalent? Or do the instructions compute the intermediate results in greater

[Bug tree-optimization/85694] Generation of vectorized AVG (Average) instruction

2018-05-08 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85694 Richard Biener changed: What|Removed |Added Keywords||missed-optimization