[Bug middle-end/31548] __builtin_cabsf(z) squared should be optimized

2007-04-12 Thread rguenth at gcc dot gnu dot org
--- Comment #1 from rguenth at gcc dot gnu dot org 2007-04-12 15:41 --- Confirmed. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added CC|

[Bug middle-end/31548] __builtin_cabsf(z) squared should be optimized

2007-04-12 Thread ubizjak at gmail dot com
--- Comment #2 from ubizjak at gmail dot com 2007-04-12 15:53 --- (In reply to comment #0) The complex value is naively calculated as: sqrt( (_Real_ z)*(_Real_ z) + (_Imag_ z)*(_Imag_ z) ) However, since the value is squared afterwards, the square root can be simply removed.