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
+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
*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;
}
+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
--- /dev/null
+/* { 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;
+}