https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63679
--- Comment #35 from alalaw01 at gcc dot gnu.org --- So it should be happening in dom2. On x86, input to dom2 is vect_cst_.9_31 = { 0, 1, 2, 3 }; [...]MEM[(int *)&a] = vect_cst_.9_31; [...]vect__13.3_20 = MEM[(int *)&a]; resulting in: Optimizing statement vect_cst_.9_31 = { 0, 1, 2, 3 }; LKUP STMT vect_cst_.9_31 = { 0, 1, 2, 3 } ==== ASGN vect_cst_.9_31 = { 0, 1, 2, 3 } ... Optimizing statement MEM[(int *)&a] = vect_cst_.9_31; Replaced 'vect_cst_.9_31' with constant '{ 0, 1, 2, 3 }' LKUP STMT MEM[(int *)&a] = { 0, 1, 2, 3 } with .MEM_3(D) LKUP STMT { 0, 1, 2, 3 } = MEM[(int *)&a] with .MEM_3(D) LKUP STMT { 0, 1, 2, 3 } = MEM[(int *)&a] with .MEM_17 2>>> STMT { 0, 1, 2, 3 } = MEM[(int *)&a] with .MEM_17 ... Optimizing statement vect__13.3_20 = MEM[(int *)&a]; LKUP STMT vect__13.3_20 = MEM[(int *)&a] with .MEM_21 FIND: { 0, 1, 2, 3 } Replaced redundant expr 'MEM[(int *)&a]' with '{ 0, 1, 2, 3 }' My version has input to dom2: vect_cst_.8_27 = { 0, 1, 2, 3 }; [...]MEM[(int[8] *)&a] = vect_cst_.8_27; [...]vect__8.3_20 = MEM[(int *)&a]; Optimizing statement vect_cst_.8_27 = { 0, 1, 2, 3 }; LKUP STMT vect_cst_.8_27 = { 0, 1, 2, 3 } ==== ASGN vect_cst_.8_27 = { 0, 1, 2, 3 } ... Optimizing statement MEM[(int[8] *)&a] = vect_cst_.8_27; Replaced 'vect_cst_.8_27' with constant '{ 0, 1, 2, 3 }' LKUP STMT MEM[(int[8] *)&a] = { 0, 1, 2, 3 } with .MEM_3(D) LKUP STMT { 0, 1, 2, 3 } = MEM[(int[8] *)&a] with .MEM_3(D) LKUP STMT { 0, 1, 2, 3 } = MEM[(int[8] *)&a] with .MEM_17 2>>> STMT { 0, 1, 2, 3 } = MEM[(int[8] *)&a] with .MEM_17 ... Optimizing statement vect__8.3_20 = MEM[(int *)&a]; LKUP STMT vect__8.3_20 = MEM[(int *)&a] with .MEM_21 2>>> STMT vect__8.3_20 = MEM[(int *)&a] with .MEM_21 Which looks like MEM[(int *)&a] and MEM[(int[8] *)&a] are hashing differently and hence dom2 is not finding it. Could be that I need my SRA to output something closer to a[1] = 1; where I currently have MEM[(int[8] *)&a + 4B] = 1; but also feel that those two statements hashing differently is not really helpful!