Re: [PATCH] PR54555: Use strict_low_part for loading a constant only if it is cheaper

2014-06-18 Thread Andreas Schwab
Jeff Law writes: > Let's do better this time ;-) Add a testcase for the m68k port which > verifies we're getting the desired code. Make sense. Installed with the following test case. Andreas. PR rtl-optimization/54555 * gcc.target/m68k/pr54555.c: New test. diff --git a/gcc/t

Re: [PATCH] PR54555: Use strict_low_part for loading a constant only if it is cheaper

2014-06-17 Thread Jeff Law
On 06/17/14 01:47, Andreas Schwab wrote: Postreload may transform (set (REGX) (CONST_INT A)) ... (set (REGX) (CONST_INT B)) to (set (REGX) (CONST_INT A)) ... (set (STRICT_LOW_PART (REGX)) (CONST_INT B)), but it should do that only if the latter is cheaper. On m68k, a full word load of a small co

[PATCH] PR54555: Use strict_low_part for loading a constant only if it is cheaper

2014-06-17 Thread Andreas Schwab
Postreload may transform (set (REGX) (CONST_INT A)) ... (set (REGX) (CONST_INT B)) to (set (REGX) (CONST_INT A)) ... (set (STRICT_LOW_PART (REGX)) (CONST_INT B)), but it should do that only if the latter is cheaper. On m68k, a full word load of a small constant with moveq is cheaper than doing a b