[RS6000] cost SLOW_UNALIGNED_ACCESS
* config/rs6000/rs6000.c (rs6000_rtx_costs): Make unaligned mem cost more. From-SVN: r239012
This commit is contained in:
parent
d1f0a70a12
commit
cef58349a0
2 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2016-08-03 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* config/rs6000/rs6000.c (rs6000_rtx_costs): Make unaligned mem
|
||||
cost more.
|
||||
|
||||
2016-08-03 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* config/rs6000/rs6000.md (fix_trunc<mode>si2): Force source operand
|
||||
|
|
|
@ -34336,11 +34336,16 @@ rs6000_rtx_costs (rtx x, machine_mode mode, int outer_code,
|
|||
case CONST:
|
||||
case HIGH:
|
||||
case SYMBOL_REF:
|
||||
*total = !speed ? COSTS_N_INSNS (1) + 1 : COSTS_N_INSNS (2);
|
||||
return true;
|
||||
|
||||
case MEM:
|
||||
/* When optimizing for size, MEM should be slightly more expensive
|
||||
than generating address, e.g., (plus (reg) (const)).
|
||||
L1 cache latency is about two instructions. */
|
||||
*total = !speed ? COSTS_N_INSNS (1) + 1 : COSTS_N_INSNS (2);
|
||||
if (SLOW_UNALIGNED_ACCESS (mode, MEM_ALIGN (x)))
|
||||
*total += COSTS_N_INSNS (100);
|
||||
return true;
|
||||
|
||||
case LABEL_REF:
|
||||
|
|
Loading…
Add table
Reference in a new issue