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 tree-opt/36891 ICE with vector division and -ffast-math and LIM


Hi,
  The issue here is two fold, first the vector variable was not being
marked as a gimple register.  And then we were creating a REAL_CST of
a vector type which is invalid.
This patch fixes the issue by marking the newly created variable as a
gimple register and also creating a VECTOR_CST with all ones for the
division.
This patch does assume if the target has vector division, it also has
vector multiplication.  I don't know of a target which does not have
that though.

OK? Bootstrapped and tested on i386-darwin with no regressions (Darwin
has SSE2 turned on by default).

Thanks,
Andrew Pinski

ChangeLog:
* tree-ssa-loop-im.c (rewrite_reciprocal): Set DECL_GIMPLE_REG_P on
the newly created variable.
Create a VECTOR_CST of all 1s for vector types.

testsuite/ChangeLog:
* gcc.dg/torture/pr36891.c: New testcase.

Attachment: fixreciprocal.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]