Re: [Patch/rtl-expand] Take tree range info into account to improve LSHIFT_EXP expanding

2015-08-19 Thread Jiong Wang
Jeff Law writes: >> +&& ! unsignedp > Don't you need to check that the conversion is actually a sign > extension. Oh, you're relying on the signedness of ops->type. That > should be sufficient. Exactly. >> +if (GET_MODE_SIZE (rmode) < GET_MODE_SIZE (mode) >> +

Re: [Patch/rtl-expand] Take tree range info into account to improve LSHIFT_EXP expanding

2015-08-18 Thread Jeff Law
On 08/18/2015 06:54 AM, Jiong Wang wrote: Changes are: 1. s/shfit/shift/ 2. Re-write the comment. more explanations on the left shift across word size boundary scenario, explan gcc's current expand steps and what this optimization can improve. 3. Match the code to the

Re: [Patch/rtl-expand] Take tree range info into account to improve LSHIFT_EXP expanding

2015-08-18 Thread Jiong Wang
Jiong Wang writes: > Jeff Law writes: > >> On 08/14/2015 11:40 AM, Jiong Wang wrote: >>> >>>* Figuring out whether the shift source is coming from sign extension >>> by checking SSA_NAME_DEF_STMT instead of deducing from tree range >>> info. I fell checking the gimple statement is m

Re: [Patch/rtl-expand] Take tree range info into account to improve LSHIFT_EXP expanding

2015-08-14 Thread Jiong Wang
Jeff Law writes: > On 08/14/2015 11:40 AM, Jiong Wang wrote: >> >>* Figuring out whether the shift source is coming from sign extension >> by checking SSA_NAME_DEF_STMT instead of deducing from tree range >> info. I fell checking the gimple statement is more reliable and >> str

Re: [Patch/rtl-expand] Take tree range info into account to improve LSHIFT_EXP expanding

2015-08-14 Thread Jeff Law
On 08/14/2015 11:40 AM, Jiong Wang wrote: * Figuring out whether the shift source is coming from sign extension by checking SSA_NAME_DEF_STMT instead of deducing from tree range info. I fell checking the gimple statement is more reliable and straigtforward. I suspect it'll also

Re: [Patch/rtl-expand] Take tree range info into account to improve LSHIFT_EXP expanding

2015-08-14 Thread Jiong Wang
Jeff Law writes: > On 04/29/2015 03:36 PM, Jiong Wang wrote: >> >> Jeff Law writes: >> >>> On 04/27/2015 02:21 PM, Jiong Wang wrote: >>> Jeff, Sorry, I can't understand the meaning of "overlap between t_low and low", assume "right" in "right value" means the oppo

Re: [Patch/rtl-expand] Take tree range info into account to improve LSHIFT_EXP expanding

2015-04-29 Thread Jeff Law
On 04/29/2015 03:36 PM, Jiong Wang wrote: Jeff Law writes: On 04/27/2015 02:21 PM, Jiong Wang wrote: Jeff, Sorry, I can't understand the meaning of "overlap between t_low and low", assume "right" in "right value" means the opposite of "left" not "correct". So what you mean

Re: [Patch/rtl-expand] Take tree range info into account to improve LSHIFT_EXP expanding

2015-04-29 Thread Jiong Wang
Jeff Law writes: > On 04/27/2015 02:21 PM, Jiong Wang wrote: > >> Jeff, >> >>Sorry, I can't understand the meaning of "overlap between t_low and low", >>assume "right" in "right value" means the opposite of "left" not >>"correct". >> >>So what you mean is t_low and low share the s

Re: [Patch/rtl-expand] Take tree range info into account to improve LSHIFT_EXP expanding

2015-04-28 Thread Jeff Law
On 04/27/2015 02:21 PM, Jiong Wang wrote: Funny, I find myself wanting this transformation in both places :-) Expansion time so that we generate efficient code from the start and combine to catch those cases which are too complex to see at expansion, but due to other optimizations become visible

Re: [Patch/rtl-expand] Take tree range info into account to improve LSHIFT_EXP expanding

2015-04-27 Thread Jiong Wang
Jeff Law writes: > On 04/16/2015 05:04 AM, Jiong Wang wrote: >> >> This is a rework of >> >>https://gcc.gnu.org/ml/gcc-patches/2014-07/msg01998.html >> >> After second thinking, I feel it's better to fix this in earlier stage >> during RTL expand which is more generic, and we also avoid makin

Re: [Patch/rtl-expand] Take tree range info into account to improve LSHIFT_EXP expanding

2015-04-23 Thread Jeff Law
On 04/16/2015 05:04 AM, Jiong Wang wrote: This is a rework of https://gcc.gnu.org/ml/gcc-patches/2014-07/msg01998.html After second thinking, I feel it's better to fix this in earlier stage during RTL expand which is more generic, and we also avoid making the already complex combine pass co

[Patch/rtl-expand] Take tree range info into account to improve LSHIFT_EXP expanding

2015-04-16 Thread Jiong Wang
This is a rework of https://gcc.gnu.org/ml/gcc-patches/2014-07/msg01998.html After second thinking, I feel it's better to fix this in earlier stage during RTL expand which is more generic, and we also avoid making the already complex combine pass complexer. Currently gcc expand wide mode left