[Bug target/93930] [8/9/10 Regression] Unnecessary broadcast instructions for AVX512

2020-03-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93930

--- Comment #3 from Jakub Jelinek  ---
The cost changes affect the RTL LIM.-Set in insn 22 is invariant (0), cost 32,
depends on 
-Set in insn 27 is invariant (1), cost 32, depends on 
-Set in insn 32 is invariant (2), cost 32, depends on 
-Set in insn 37 is invariant (3), cost 32, depends on 
-Set in insn 61 is invariant (4), cost 32, depends on 
-Set in insn 66 is invariant (5), cost 32, depends on 
-Set in insn 71 is invariant (6), cost 32, depends on 
-Set in insn 76 is invariant (7), cost 32, depends on 
-Set in insn 101 is invariant (8), cost 32, depends on 
-Set in insn 106 is invariant (9), cost 32, depends on 
-Set in insn 111 is invariant (10), cost 32, depends on 
-Set in insn 116 is invariant (11), cost 32, depends on 
-Decided to move invariant 0 -- gain 32
-Decided to move invariant 1 -- gain 32
-Decided to move invariant 2 -- gain 32
-Decided to move invariant 3 -- gain 32
-Decided to move invariant 4 -- gain 32
-Decided to move invariant 5 -- gain 32
-Decided to move invariant 6 -- gain 32
-Decided to move invariant 7 -- gain 32
-Decided to move invariant 8 -- gain 32
-Decided to move invariant 9 -- gain 32
-Decided to move invariant 10 -- gain 10
-Decided to move invariant 11 -- gain 30
+Set in insn 22 is invariant (0), cost 4, depends on 
+Set in insn 27 is invariant (1), cost 4, depends on 
+Set in insn 32 is invariant (2), cost 4, depends on 
+Set in insn 37 is invariant (3), cost 4, depends on 
+Set in insn 61 is invariant (4), cost 4, depends on 
+Set in insn 66 is invariant (5), cost 4, depends on 
+Set in insn 71 is invariant (6), cost 4, depends on 
+Set in insn 76 is invariant (7), cost 4, depends on 
+Set in insn 101 is invariant (8), cost 4, depends on 
+Set in insn 106 is invariant (9), cost 4, depends on 
+Set in insn 111 is invariant (10), cost 4, depends on 
+Set in insn 116 is invariant (11), cost 4, depends on 
+Decided to move invariant 0 -- gain 4
+Decided to move invariant 1 -- gain 4
+Decided to move invariant 2 -- gain 4
+Decided to move invariant 3 -- gain 4
+Decided to move invariant 4 -- gain 4
+Decided to move invariant 5 -- gain 4
+Decided to move invariant 6 -- gain 4
+Decided to move invariant 7 -- gain 4
+Decided to move invariant 8 -- gain 4
+Decided to move invariant 9 -- gain 4
which means invariant 10 and 11 aren't moved anymore.
Those two are:
-(insn 111 106 116 3 (set (reg:V16SF 210)
-(vec_duplicate:V16SF (vec_select:SF (reg:V4SF 234)
-(parallel [
-(const_int 0 [0])
-] "include/avx512fintrin.h":207 4206
{avx512f_vec_dupv16sf}
- (expr_list:REG_EQUAL (const_vector:V16SF [
-(const_double:SF 2.3e+1 [0x0.b8p+5])
-(const_double:SF 2.3e+1 [0x0.b8p+5])
-(const_double:SF 2.3e+1 [0x0.b8p+5])
-(const_double:SF 2.3e+1 [0x0.b8p+5])
-(const_double:SF 2.3e+1 [0x0.b8p+5])
-(const_double:SF 2.3e+1 [0x0.b8p+5])
-(const_double:SF 2.3e+1 [0x0.b8p+5])
-(const_double:SF 2.3e+1 [0x0.b8p+5])
-(const_double:SF 2.3e+1 [0x0.b8p+5])
-(const_double:SF 2.3e+1 [0x0.b8p+5])
-(const_double:SF 2.3e+1 [0x0.b8p+5])
-(const_double:SF 2.3e+1 [0x0.b8p+5])
-(const_double:SF 2.3e+1 [0x0.b8p+5])
-(const_double:SF 2.3e+1 [0x0.b8p+5])
-(const_double:SF 2.3e+1 [0x0.b8p+5])
-(const_double:SF 2.3e+1 [0x0.b8p+5])
-])
-(nil)))
-(insn 116 111 139 3 (set (reg:V16SF 214)
-(vec_duplicate:V16SF (vec_select:SF (reg:V4SF 235)
-(parallel [
-(const_int 0 [0])
-] "include/avx512fintrin.h":207 4206
{avx512f_vec_dupv16sf}
- (expr_list:REG_EQUAL (const_vector:V16SF [
-(const_double:SF 2.4e+1 [0x0.cp+5])
-(const_double:SF 2.4e+1 [0x0.cp+5])
-(const_double:SF 2.4e+1 [0x0.cp+5])
-(const_double:SF 2.4e+1 [0x0.cp+5])
-(const_double:SF 2.4e+1 [0x0.cp+5])
-(const_double:SF 2.4e+1 [0x0.cp+5])
-(const_double:SF 2.4e+1 [0x0.cp+5])
-(const_double:SF 2.4e+1 [0x0.cp+5])
-(const_double:SF 2.4e+1 [0x0.cp+5])
-(const_double:SF 2.4e+1 [0x0.cp+5])
-(const_double:SF 2.4e+1 [0x0.cp+5])
-(const_double:SF 2.4e+1 [0x0.cp+5])
-(const_double:SF 2.4e+1 [0x0.cp+5])
-(const_double:SF 2.4e+1 [0x0.cp+5])
-(const_double:SF 2.4e+1 [0x0.cp+5])
-(const_double:SF 2.4e+1 [0x0.cp+5])
-])
-(nil)))
and I bet the reason they are using the const costs are the REG_EQUAL notes.
The setters of their sources are:
(insn 169 168 170 3 (set (reg:V4SF 234)
(mem/u/c:V4SF (symbol_ref/u:DI ("*.LC10") [flags 0x2]) [2 

[Bug target/93930] [8/9/10 Regression] Unnecessary broadcast instructions for AVX512

2020-03-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93930

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|8.4 |8.5

--- Comment #2 from Jakub Jelinek  ---
GCC 8.4.0 has been released, adjusting target milestone.

[Bug target/93930] [8/9/10 Regression] Unnecessary broadcast instructions for AVX512

2020-02-26 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93930

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Target||x86_64-*-*, i?86-*-*
   Priority|P3  |P2

[Bug target/93930] [8/9/10 Regression] Unnecessary broadcast instructions for AVX512

2020-02-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93930

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2020-02-25
 CC||hubicka at gcc dot gnu.org,
   ||jakub at gcc dot gnu.org
   Target Milestone|--- |8.4
Summary|Unnecessary broadcast   |[8/9/10 Regression]
   |instructions for AVX512 |Unnecessary broadcast
   ||instructions for AVX512
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Seems this has started with r8-3873-gc53c148c9155c1c26bf35b2763bf34d2ae26bc4b