Commit 8bad7136 by Jeffrey A Law Committed by Jeff Law

i386.md: Create new [right,left] rotate and right shift patterns to optimize shift by 1...

	* i386.md: Create new [right,left] rotate and right shift
	patterns to optimize shift by 1 bit for certain ia32 processors.
	Update patterns which perform left shifts to optimize shift by
	1 bit for certain ia32 processors.
	* i386.c (const_int_1_operand): New predicate.
	* i386.h (PREDICATE_CODES): Handle const_int_1_operand.
	* i386-protos.h (const_int_1_operand): Prototype.

From-SVN: r34569
parent 297a5329
Thu Jun 15 18:56:12 2000 Jeffrey A Law (law@cygnus.com)
* i386.md: Create new [right,left] rotate and right shift
patterns to optimize shift by 1 bit for certain ia32 processors.
Update patterns which perform left shifts to optimize shift by
1 bit for certain ia32 processors.
* i386.c (const_int_1_operand): New predicate.
* i386.h (PREDICATE_CODES): Handle const_int_1_operand.
* i386-protos.h (const_int_1_operand): Prototype.
Wed Jun 14 23:46:26 2000 J"orn Rennecke <amylaar@cygnus.co.uk> Wed Jun 14 23:46:26 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
* mips.c (machine_dependent_reorg): Fix braces for nested if. * mips.c (machine_dependent_reorg): Fix braces for nested if.
......
...@@ -41,6 +41,7 @@ extern int ix86_aligned_p PARAMS ((rtx)); ...@@ -41,6 +41,7 @@ extern int ix86_aligned_p PARAMS ((rtx));
extern int standard_80387_constant_p PARAMS ((rtx)); extern int standard_80387_constant_p PARAMS ((rtx));
extern int symbolic_reference_mentioned_p PARAMS ((rtx)); extern int symbolic_reference_mentioned_p PARAMS ((rtx));
extern int const_int_1_operand PARAMS ((rtx, enum machine_mode));
extern int symbolic_operand PARAMS ((rtx, enum machine_mode)); extern int symbolic_operand PARAMS ((rtx, enum machine_mode));
extern int pic_symbolic_operand PARAMS ((rtx, enum machine_mode)); extern int pic_symbolic_operand PARAMS ((rtx, enum machine_mode));
extern int call_insn_operand PARAMS ((rtx, enum machine_mode)); extern int call_insn_operand PARAMS ((rtx, enum machine_mode));
......
...@@ -981,6 +981,17 @@ function_arg (cum, mode, type, named) ...@@ -981,6 +981,17 @@ function_arg (cum, mode, type, named)
return ret; return ret;
} }
/* Return nonzero if OP is (const_int 1), else return zero. */
int
const_int_1_operand (op, mode)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == CONST_INT && INTVAL (op) == 1);
}
/* Returns 1 if OP is either a symbol reference or a sum of a symbol /* Returns 1 if OP is either a symbol reference or a sum of a symbol
reference and a constant. */ reference and a constant. */
......
...@@ -2496,6 +2496,7 @@ do { long l; \ ...@@ -2496,6 +2496,7 @@ do { long l; \
/* Define the codes that are matched by predicates in i386.c. */ /* Define the codes that are matched by predicates in i386.c. */
#define PREDICATE_CODES \ #define PREDICATE_CODES \
{"const_int_1_operand", {CONST_INT}}, \
{"symbolic_operand", {SYMBOL_REF, LABEL_REF, CONST}}, \ {"symbolic_operand", {SYMBOL_REF, LABEL_REF, CONST}}, \
{"aligned_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, \ {"aligned_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, \
LABEL_REF, SUBREG, REG, MEM}}, \ LABEL_REF, SUBREG, REG, MEM}}, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment