mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-21 11:00:41 +08:00
epiphany.c (epiphany_rtx_cost): Compare with CC_N_NE / CC_C_LTU / CC_C_GTU carries no extra cost for its operands.
gcc: * config/epiphany/epiphany.c (epiphany_rtx_cost): Compare with CC_N_NE / CC_C_LTU / CC_C_GTU carries no extra cost for its operands. gcc/testsuite: * gcc.target/epiphany/btst-1.c: New test. From-SVN: r209319
This commit is contained in:
parent
2a55e33d25
commit
b5d0ecea79
@ -1,3 +1,9 @@
|
||||
2014-04-11 Joern Rennecke <joern.rennecke@embecosm.com>
|
||||
|
||||
* config/epiphany/epiphany.c (epiphany_rtx_cost): Compare
|
||||
with CC_N_NE / CC_C_LTU / CC_C_GTU carries no extra cost for
|
||||
its operands.
|
||||
|
||||
2014-04-11 Joern Rennecke <joern.rennecke@embecosm.com>
|
||||
|
||||
PR rtl-optimization/60651
|
||||
|
@ -763,6 +763,19 @@ epiphany_rtx_costs (rtx x, int code, int outer_code, int opno ATTRIBUTE_UNUSED,
|
||||
*total = COSTS_N_INSNS (1);
|
||||
return true;
|
||||
|
||||
case COMPARE:
|
||||
switch (GET_MODE (x))
|
||||
{
|
||||
/* There are a number of single-insn combiner patterns that use
|
||||
the flag side effects of arithmetic. */
|
||||
case CC_N_NEmode:
|
||||
case CC_C_LTUmode:
|
||||
case CC_C_GTUmode:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -1,3 +1,7 @@
|
||||
2014-04-11 Joern Rennecke <joern.rennecke@embecosm.com>
|
||||
|
||||
* gcc.target/epiphany/btst-1.c: New test.
|
||||
|
||||
2014-04-11 Joern Rennecke <joern.rennecke@embecosm.com>
|
||||
|
||||
PR rtl-optimization/60651
|
||||
|
11
gcc/testsuite/gcc.target/epiphany/btst-1.c
Normal file
11
gcc/testsuite/gcc.target/epiphany/btst-1.c
Normal file
@ -0,0 +1,11 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fno-common" } */
|
||||
/* { dg-final { scan-assembler-not "movt" } } */
|
||||
/* { dg-final { scan-assembler-not "and" } } */
|
||||
/* { dg-final { scan-assembler "lsl" } } */
|
||||
|
||||
int
|
||||
tst (int i)
|
||||
{
|
||||
return (i & (1<<21)) ? 6 : 9;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user