[Bug tree-optimization/81127] Complex division misses BB vectorisation opportunity

2021-08-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81127

--- Comment #2 from Andrew Pinski  ---
SLP does work for:
void f(complex double *x, complex double *y, double *tt) {
  complex double t = *x/ *y;
  tt[0] = __real__ t;
  tt[1] = __imag__ t;
}

[Bug tree-optimization/81127] Complex division misses BB vectorisation opportunity

2017-06-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81127

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-19
 CC||rguenth at gcc dot gnu.org
  Component|c   |tree-optimization
 Blocks||53947
Summary|Complex division misses |Complex division misses BB
   |vectorisation opportunity   |vectorisation opportunity
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed.

Note we lower complex division with -ffast-math early.  Note ICC seems to use
the trick of widening the FP ops float->double double->long double to apply the
simple lowering even with standard conforming complex evaluation method.

Note that more target control of the lowering process, eventually lowering to
vector GIMPLE would run into the loop vectorizer not handling vector code in
case this happens inside a loop.

Note that the libgcc implementation could benefit from the above widening trick
and vectorization as well (just use generic vectors?).

Note for complex float the ABI and the middle-end arg passing code results in
the awkward stack pushes (generating CONCAT and initializing that from
piecewise
DImode via assign_parm_remove_parallels, gen_reg_rtx creating the
CONCAT and emit_group_store initializing that by pushing it to the stack
explicitely).

There might be several related bugs already.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations