[PATCH][AArch64] Fix gcc.dg/torture/float32-builtin.c with RTL checking

Kyrill Tkachov kyrylo.tkachov@foss.arm.com
Thu Nov 17 09:26:00 GMT 2016


Hi all,

Testing with RTL checking enabled showed another failure in gcc.dg/torture/float32-builtin.c.
aarch64_float_const_zero_rtx_p was passed down a complex subreg expression during combine/recog.
The pattern was supposed to reject that expression but it made its way to aarch64_float_const_zero_rtx_p
which is only supposed to handle CONST_DOUBLEs.

The culprit is the aarch64_reg_or_fp_zero predicate that restricts the accepted codes to reg,subreg,const_double but
passes down anything that is not a reg into aarch64_float_const_zero_rtx_p. That includes SUBREGs that do not
match register_operand, which we want to reject.
This patch checks that the argument is a CONST_DOUBLE before passing it to aarch64_float_const_zero_rtx_p


Bootstrapped and tested on aarch64-none-linux-gnu with RTL checking enabled.

Ok for trunk?
Thanks,
Kyrill

P.S. This predicate is only used in the store-pair family of patterns.

2016-11-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * config/aarch64/predicates.md (aarch64_reg_or_fp_zero): Check for
     const_double code before calling aarch64_float_const_zero_rtx_p.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aarch64-checking-fp.patch
Type: text/x-patch
Size: 933 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161117/e32934da/attachment.bin>


More information about the Gcc-patches mailing list