Re: [PATCH 2/2 V4] Add plusminus-with-convert pattern (PR 94234)

2020-09-15 Thread Richard Biener via Gcc-patches
On Tue, Sep 15, 2020 at 2:25 PM Feng Xue OS wrote: > > >> Add a rule (T)(A) +- (T)(B) -> (T)(A +- B), which works only when (A +- B) > >> could be folded to a simple value. By this rule, a > >> plusminus-mult-with-convert > >> expression could be handed over to the rule (A * C) +- (B * C) -> (A +

Re: [PATCH 2/2 V4] Add plusminus-with-convert pattern (PR 94234)

2020-09-15 Thread Feng Xue OS via Gcc-patches
>> Add a rule (T)(A) +- (T)(B) -> (T)(A +- B), which works only when (A +- B) >> could be folded to a simple value. By this rule, a >> plusminus-mult-with-convert >> expression could be handed over to the rule (A * C) +- (B * C) -> (A +- B). > >Please use INTEGRAL_TYPE_P () instead of TREE_CODE ==

Re: [PATCH 2/2 V4] Add plusminus-with-convert pattern (PR 94234)

2020-09-15 Thread Richard Biener via Gcc-patches
On Tue, Sep 15, 2020 at 12:14 PM Feng Xue OS wrote: > > Add a rule (T)(A) +- (T)(B) -> (T)(A +- B), which works only when (A +- B) > could be folded to a simple value. By this rule, a plusminus-mult-with-convert > expression could be handed over to the rule (A * C) +- (B * C) -> (A +- B). Please