On 04/30/2015 05:07 AM, Richard Biener wrote:
On Thu, Apr 30, 2015 at 12:53 PM, Marc Glisse <marc.gli...@inria.fr> wrote:
On Thu, 30 Apr 2015, Richard Biener wrote:
I have in my local dev tree (so completely untested...)
@@ -1040,31 +1052,22 @@ (define_operator_list CBRT BUILT_IN_CBRT
operation and convert the result to the desired type. */
(for op (plus minus)
(simplify
- (convert (op (convert@2 @0) (convert@3 @1)))
+ (convert (op:c@4 (convert@2 @0) (convert?@3 @1)))
I believe the :c here requires extra code further down, so we don't turn a-b
into b-a.
Indeed. I've added :c only for minus as 5 - x can't be canonicalized to
move the constant to 2nd position which is always possible for plus.
Might be cleaner to add a separate pattern for that case.
FWIW, this is the patch that's attached to 65084 (not 47477 as I
initially reported). It's supposed to address one or more of the
example loops in that testcase.
I'd like to tackle it as a follow-up.
jeff