This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR target/31334 (VMX), Bad codegen for vector initializer with constants prop'd into a vector initializer


Hi,
  As described in the bug report, when we have a vector CONSTRUCTOR
with all constant values that is also an easy constructible vector, we
don't construct it with a simple constant splat.  The reason why we
don't is because we pass a parallel to easy_vector_constant instead of
a const_vector and that always returns false.  So this patch creates a
const_vector before calling easy_vector_constant.  At the point we
call easy_vector_constant, we know we have all constant values so
creating a const_vector is valid.

Ok? Bootstrapped and tested on powerpc-darwin with no regressions.

Thanks,
Andrew Pinski

ChangeLog:

* config/rs6000/rs6000.c (rs6000_expand_vector_init): Create a
const_vector when all the vectors are constant.

Attachment: fixconstvect.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]