On Thu, Nov 17, 2016 at 09:26:35AM +0000, Kyrill Tkachov wrote: > 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?
OK. Thanks, James > Thanks, > Kyrill > > P.S. This predicate is only used in the store-pair family of patterns. > > 2016-11-17 Kyrylo Tkachov <kyrylo.tkac...@arm.com> > > * config/aarch64/predicates.md (aarch64_reg_or_fp_zero): Check for > const_double code before calling aarch64_float_const_zero_rtx_p.