[Bug target/60604] [4.9 Regression] GCC incorrectly compiles s_csinh function on MIPS32 (32bit fp)
sje at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 27 16:43:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60604
--- Comment #6 from Steve Ellcey <sje at gcc dot gnu.org> ---
I think the underlying bug here is the code we generate for builtin_fabs.
In emit-rtl.c (validate_subreg) I see this comment:
/* Subregs involving floating point modes are not allowed to
change size. Therefore (subreg:DI (reg:DF) 0) is fine, but
(subreg:SI (reg:DF) 0) isn't. */
But on mips, builtin_fabs calls expand_absneg_bit and that generates
this RTL:
;; _11 = ABS_EXPR <_4>;
(insn 26 25 27 (set (subreg:SI (reg:DF 199 [ D.3267 ]) 0)
(and:SI (subreg:SI (reg:DF 194 [ D.3267 ]) 0)
(const_int 2147483647 [0x7fffffff]))) x.c:25 -1
(nil))
(insn 27 26 0 (set (subreg:SI (reg:DF 199 [ D.3267 ]) 4)
(subreg:SI (reg:DF 194 [ D.3267 ]) 4)) x.c:25 -1
(nil))
Which would seem to violate the restrictions in the comment.
More information about the Gcc-bugs
mailing list