This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Thumb-2 negscc fix


The thumb2_negscc pattern was copied from the corresponding ARM pattern before 
the fix for PR31152 was applied.  The patch below fixes this.

Tested on arm-none-eabi.
Applied to svn trunk

Paul

2008-09-01  Paul Brook  <paul@codesourcery.com>

	gcc/
	* config/arm/thumb2.md (thumb2_negscc): Match the correct operand for
	optimized LT0 test.  Remove optimization for GT.

Index: gcc/config/arm/thumb2.md
===================================================================
--- gcc/config/arm/thumb2.md	(revision 139866)
+++ gcc/config/arm/thumb2.md	(working copy)
@@ -755,15 +755,12 @@ (define_insn "*thumb2_negscc"
    (clobber (reg:CC CC_REGNUM))]
   "TARGET_THUMB2"
   "*
-  if (GET_CODE (operands[3]) == LT && operands[3] == const0_rtx)
+  if (GET_CODE (operands[3]) == LT && operands[2] == const0_rtx)
     return \"asr\\t%0, %1, #31\";
 
   if (GET_CODE (operands[3]) == NE)
     return \"subs\\t%0, %1, %2\;it\\tne\;mvnne\\t%0, #0\";
 
-  if (GET_CODE (operands[3]) == GT)
-    return \"subs\\t%0, %1, %2\;it\\tne\;mvnne\\t%0, %0, asr #31\";
-
   output_asm_insn (\"cmp\\t%1, %2\", operands);
   output_asm_insn (\"ite\\t%D3\", operands);
   output_asm_insn (\"mov%D3\\t%0, #0\", operands);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]