------- Comment #16 from dave at hiauly1 dot hia dot nrc dot ca 2010-09-18 22:14 ------- Subject: Re: [4.6 Regression] FAIL: gcc.dg/torture/builtin-cproj-1.c -O1 (test for excess errors)
On Sat, 18 Sep 2010, rguenth at gcc dot gnu dot org wrote: > ------- Comment #14 from rguenth at gcc dot gnu dot org 2010-09-18 18:25 > ------- > You have way more non-SSA variables - possibly due to callee-copy of args > (again). I think you are correct about this being a callee-copy problem. Complex float is passed by value, so a copy is not made. In the 087t.dce2 pass, the float code is simplified to if (x_32(D) != 0) goto <bb 4>; else goto <bb 3>; <bb 3>: <bb 4>: Invalid sum of incoming frequencies 10000, should be 5000 # cf$imag_13 = PHI <4.0e+0(2), 5.0e+0(3)> cf_36 = COMPLEX_EXPR < Inf, cf$imag_13>; D.2130_37 = __builtin_cprojf (cf_36); D.2133_152 = IMAGPART_EXPR <D.2130_37>; D.2134_41 = __builtin_copysignf (1.0e+0, D.2133_152); if (D.2134_41 != 1.0e+0) goto <bb 5>; else goto <bb 6>; <bb 5>: Invalid sum of incoming frequencies 2500, should be 6450 link_error (160); whereas for double we still have <bb 6>: Invalid sum of incoming frequencies 8950, should be 10000 REALPART_EXPR <cd.1> = Inf; if (x_32(D) != 0) goto <bb 8>; else goto <bb 7>; <bb 7>: <bb 8>: # iftmp.4_14 = PHI <4.0e+0(6), 5.0e+0(7)> D.2321_122 = REALPART_EXPR <cd.1>; cd.5_44 = COMPLEX_EXPR <D.2321_122, iftmp.4_14>; D.2142_45 = __builtin_cproj (cd.5_44); [return slot optimization] CR.26_84 = REALPART_EXPR <D.2142_45>; D.2145_85 = IMAGPART_EXPR <D.2142_45>; D.2325_75 = CR.26_84 > 1.79769313486231570814527423731704356798070567526e+308; D.2326_76 = !D.2325_75; D.2327_67 = D.2145_85 != 0.0; D.2328_60 = D.2327_67 || D.2326_76; if (D.2328_60 == 1) goto <bb 10>; else goto <bb 9>; <bb 9>: D.2146_49 = (float) D.2145_85; D.2147_50 = __builtin_copysignf (1.0e+0, D.2146_49); if (D.2147_50 != 1.0e+0) goto <bb 10>; else goto <bb 11>; <bb 10>: link_error (160); In the previous 086t.reassoc1 pass, we still had the non SSA stuff: <bb 2>: cld$real_188 = REALPART_EXPR <cld_25(D)>; cld$imag_189 = IMAGPART_EXPR <cld_25(D)>; cd$real_177 = REALPART_EXPR <cd_26(D)>; cd$imag_178 = IMAGPART_EXPR <cd_26(D)>; cf$real_167 = REALPART_EXPR <cf_29(D)>; cf$imag_158 = IMAGPART_EXPR <cf_29(D)>; REALPART_EXPR <cld.0> = cld$real_188; IMAGPART_EXPR <cld.0> = cld$imag_189; REALPART_EXPR <cd.1> = cd$real_177; IMAGPART_EXPR <cd.1> = cd$imag_178; if (x_32(D) != 0) goto <bb 4>; else goto <bb 3>; -fno-tree-sra didn't help. 080t.cplxlower makes these partial defintions: REALPART_EXPR <cld.0> = cld$real_188; IMAGPART_EXPR <cld.0> = cld$imag_189; REALPART_EXPR <cd.1> = cd$real_177; IMAGPART_EXPR <cd.1> = cd$imag_178; # grep real_188 builtin-cproj-1.c.* builtin-cproj-1.c.080t.cplxlower: cld$real_188 = REALPART_EXPR <cld_25(D)>; builtin-cproj-1.c.080t.cplxlower: REALPART_EXPR <cld.0> = cld$real_188; builtin-cproj-1.c.082t.copyrename3: cld$real_188 = REALPART_EXPR <cld_25(D)>; builtin-cproj-1.c.082t.copyrename3: REALPART_EXPR <cld.0> = cld$real_188; builtin-cproj-1.c.083t.dom1: cld$real_188 = REALPART_EXPR <cld_25(D)>; builtin-cproj-1.c.083t.dom1: REALPART_EXPR <cld.0> = cld$real_188; builtin-cproj-1.c.084t.phicprop1: cld$real_188 = REALPART_EXPR <cld_25(D)>; builtin-cproj-1.c.084t.phicprop1: REALPART_EXPR <cld.0> = cld$real_188; builtin-cproj-1.c.085t.dse1: cld$real_188 = REALPART_EXPR <cld_25(D)>; builtin-cproj-1.c.085t.dse1: REALPART_EXPR <cld.0> = cld$real_188; builtin-cproj-1.c.086t.reassoc1: cld$real_188 = REALPART_EXPR <cld_25(D)>; builtin-cproj-1.c.086t.reassoc1: REALPART_EXPR <cld.0> = cld$real_188; 004t.gimple makes REALPART_EXPR <cd.1> = Inf; # grep "REALPART_EXPR <cd.1>" builtin-cproj-1.c.* builtin-cproj-1.c.004t.gimple: REALPART_EXPR <cd.1> = Inf; builtin-cproj-1.c.004t.gimple: REALPART_EXPR <cd.1> = -Inf; builtin-cproj-1.c.004t.gimple: REALPART_EXPR <cd.1> = Inf; builtin-cproj-1.c.004t.gimple: REALPART_EXPR <cd.1> = -Inf; builtin-cproj-1.c.009t.omplower: REALPART_EXPR <cd.1> = Inf; builtin-cproj-1.c.009t.omplower: REALPART_EXPR <cd.1> = -Inf; builtin-cproj-1.c.009t.omplower: REALPART_EXPR <cd.1> = Inf; builtin-cproj-1.c.009t.omplower: REALPART_EXPR <cd.1> = -Inf; ... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43959