Skip to content
Snippets Groups Projects
Commit 5d3498b4 authored by Richard Sandiford's avatar Richard Sandiford Committed by Richard Sandiford
Browse files

Add simple sign-stripping cases to match.pd

This patch makes sure that, for every simplification that uses
fold_strip_sign_ops, there are associated match.pd rules for the
leaf sign ops, i.e. abs, negate and copysign.  A follow-on patch
will add a pass to handle more complex cases.

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.

gcc/
	* match.pd: Add rules to simplify ccos, ccosh, hypot, copysign
	and x*x in cases where the operands are sign ops.  Extend these
	rules to handle copysign as a sign op (including for cos, cosh
	and pow, which already treated negate and abs as sign ops).

From-SVN: r229123
parent dc3cf66b
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment