mips.c (mips_rtx_costs): Very slightly increase the cost of MULT when optimizing for size.
* config/mips/mips.c (mips_rtx_costs): Very slightly increase the cost of MULT when optimizing for size. * gcc.target/mips/mulsize-1.c: New. * gcc.target/mips/mulsize-2.c: New. * gcc.target/mips/mulsize-3.c: New. * gcc.target/mips/mulsize-4.c: New. From-SVN: r200867
This commit is contained in:
parent
055e0a992c
commit
ceb2d59f8c
@ -1,3 +1,7 @@
|
||||
2013-07-10 Graham Stott <graham.stott@btinternet.com>
|
||||
* config/mips/mips.c (mips_rtx_costs): Very slightly increase
|
||||
the cost of MULT when optimizing for size.
|
||||
|
||||
2013-07-10 Jan-Benedict Glaw <jbglaw@lug-owl.de>
|
||||
|
||||
* config/cr16/cr16-protos.h: Don't include target.h.
|
||||
|
@ -3944,7 +3944,7 @@ mips_rtx_costs (rtx x, int code, int outer_code, int opno ATTRIBUTE_UNUSED,
|
||||
? mips_cost->int_mult_si * 3 + 6
|
||||
: COSTS_N_INSNS (ISA_HAS_MUL3 ? 7 : 9));
|
||||
else if (!speed)
|
||||
*total = COSTS_N_INSNS (ISA_HAS_MUL3 ? 1 : 2);
|
||||
*total = COSTS_N_INSNS (ISA_HAS_MUL3 ? 1 : 2) + 1;
|
||||
else if (mode == DImode)
|
||||
*total = mips_cost->int_mult_di;
|
||||
else
|
||||
|
@ -1,3 +1,9 @@
|
||||
2013-07-10 Graham Stott <grahams@btinternet.com>
|
||||
* gcc.target/mips/mulsize-1.c: New.
|
||||
* gcc.target/mips/mulsize-2.c: New.
|
||||
* gcc.target/mips/mulsize-3.c: New.
|
||||
* gcc.target/mips/mulsize-4.c: New.
|
||||
|
||||
2013-07-09 Marc Glisse <marc.glisse@inria.fr>
|
||||
|
||||
PR c++/53094
|
||||
|
9
gcc/testsuite/gcc.target/mips/mulsize-1.c
Normal file
9
gcc/testsuite/gcc.target/mips/mulsize-1.c
Normal file
@ -0,0 +1,9 @@
|
||||
/* { dg-final { scan-assembler "\t.globl\tf7" } } */
|
||||
/* { dg-final { scan-assembler "\tsubu\t" } } */
|
||||
/* { dg-final { scan-assembler-not "\tli\t" } } */
|
||||
/* { dg-final { scan-assembler-not "\tmul\t" } } */
|
||||
int
|
||||
f7(int x)
|
||||
{
|
||||
return x * 7;
|
||||
}
|
9
gcc/testsuite/gcc.target/mips/mulsize-2.c
Normal file
9
gcc/testsuite/gcc.target/mips/mulsize-2.c
Normal file
@ -0,0 +1,9 @@
|
||||
/* { dg-final { scan-assembler "\t.globl\tf9" } } */
|
||||
/* { dg-final { scan-assembler "\tsubu\t" } } */
|
||||
/* { dg-final { scan-assembler-not "\tli\t" } } */
|
||||
/* { dg-final { scan-assembler-not "\tmul\t" } } */
|
||||
int
|
||||
f9(int x)
|
||||
{
|
||||
return x * 9;
|
||||
}
|
12
gcc/testsuite/gcc.target/mips/mulsize-3.c
Normal file
12
gcc/testsuite/gcc.target/mips/mulsize-3.c
Normal file
@ -0,0 +1,12 @@
|
||||
/* { dg-final { scan-assembler "\t.globl\tf15" } } */
|
||||
/* { dg-final { scan-assembler "\tsll\t" } } */
|
||||
/* { dg-final { scan-assembler "\tsubu\t" } } */
|
||||
/* { dg-final { scan-assembler-not "\tli\t" } } */
|
||||
/* { dg-final { scan-assembler-not "\tmul\t" } } */
|
||||
int
|
||||
f15(int x)
|
||||
{
|
||||
return x * 15;
|
||||
}
|
||||
|
||||
|
11
gcc/testsuite/gcc.target/mips/mulsize-4.c
Normal file
11
gcc/testsuite/gcc.target/mips/mulsize-4.c
Normal file
@ -0,0 +1,11 @@
|
||||
/* { dg-final { scan-assembler "\t.globl\tf17" } } */
|
||||
/* { dg-final { scan-assembler "\tsll\t" } } */
|
||||
/* { dg-final { scan-assembler "\taddu\t" } } */
|
||||
/* { dg-final { scan-assembler-not "\tli\t" } } */
|
||||
/* { dg-final { scan-assembler-not "\tmul\t" } } */
|
||||
int
|
||||
f17(int x)
|
||||
{
|
||||
return x * 17;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user