https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120234

--- Comment #3 from Haochen Jiang <haochen.jiang at intel dot com> ---
The FAIL is caused by the high vec_construct cost after the change. Under -m32,
for pr111023 we  have:

/export/users/haochenj/src/gcc/master/gcc/testsuite/gcc.target/i386/pr111023.c:14:10:
note: Cost model analysis:
_2 1 times scalar_store costs 16 in body
_4 1 times scalar_store costs 16 in body
_6 1 times scalar_store costs 16 in body
_8 1 times scalar_store costs 16 in body
_10 1 times scalar_store costs 16 in body
_12 1 times scalar_store costs 16 in body
_14 1 times scalar_store costs 16 in body
_16 1 times scalar_store costs 16 in body
_2 1 times vector_store costs 16 in body
node 0x71fd320 1 times vec_construct costs 124 in prologue
/export/users/haochenj/src/gcc/master/gcc/testsuite/gcc.target/i386/pr111023.c:14:10:
note: Cost model analysis for part in loop 0:
  Vector cost: 156
  Scalar cost: 128

Before the commit, it is:

/export/users/haochenj/src/gcc/tmp/gcc/testsuite/gcc.target/i386/pr111023.c:14:10:
note: Cost model analysis:
_2 1 times scalar_store costs 16 in body
_4 1 times scalar_store costs 16 in body
_6 1 times scalar_store costs 16 in body
_8 1 times scalar_store costs 16 in body
_10 1 times scalar_store costs 16 in body
_12 1 times scalar_store costs 16 in body
_14 1 times scalar_store costs 16 in body
_16 1 times scalar_store costs 16 in body
_2 1 times vector_store costs 16 in body
node 0x78392b0 1 times vec_construct costs 76 in prologue
/export/users/haochenj/src/gcc/tmp/gcc/testsuite/gcc.target/i386/pr111023.c:14:10:
note: Cost model analysis for part in loop 0:
  Vector cost: 108
  Scalar cost: 128

It leads to the refuse to vectorize.

Reply via email to