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

--- Comment #42 from Marc Glisse <glisse at gcc dot gnu.org> ---
Created attachment 46502
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46502&action=edit
other hack

Another approach.
* lowering in an optimization pass is idiotic, it only works at -O2+, but it
shows the idea and should be easy to move anywhere.
* manually setting SSA_NAME_DEF_STMT seems strange, it probably should happen
automatically as it does for an assignment.

I think this kind of approach makes sense. It can be made to work without too
much effort, and then can be incrementally improved
0) handle vectors and complex
1) let targets replace "=g" with something nicer, say "=x" or "=xm" for SSE (we
generate nonsense for "=gx").
2) allow targets to expand the operations as they like (add an opcode?)
3) add parsing of #pragma fenv and change flag_rounding_math according to it
4) enable it as well for flag_trapping_math (and stop making that the default!)
5) add some constant folding (mpfr can tell if operations are exact or raise
any flag)
6) add other, more specific versions, for cases where we care about rounding
but not flags, or the reverse, or when we know the rounding direction (possible
in the newest C standard?), or...
etc

Reply via email to