This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
why no shortcut operation for comparion on _Complex operands
- From: "Bin.Cheng" <amker dot cheng at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 25 Mar 2012 20:42:15 +0800
- Subject: why no shortcut operation for comparion on _Complex operands
Hi,
In tree-complex.c's function expand_complex_comparison, gcc just
expand comparison on complex
operands into comparisons on inner type, like:
D.5375_17 = REALPART_EXPR <g2>;
D.5376_18 = IMAGPART_EXPR <g2>;
g2.1_5 = COMPLEX_EXPR <D.5375_17, D.5376_18>;
D.5377_19 = REALPART_EXPR <g3>;
D.5378_20 = IMAGPART_EXPR <g3>;
g3.2_6 = COMPLEX_EXPR <D.5377_19, D.5378_20>;
D.5379_21 = D.5375_17 == D.5377_19;
D.5380_22 = D.5376_18 == D.5378_20;
D.5381_23 = D.5379_21 & D.5380_22;
if (D.5381_23 == 1)
goto <bb 3>;
else
goto <bb 4>;
So is it possible to do shortcut operation for the "&" on the
real/imag part of complex data?
Thanks
--
Best Regards.