diff mbox

[committed] Accept "const_int 0" operand 1 in PA "scc" insns

Message ID BLU0-SMTP44219B66966753289CC50C97370@phx.gbl
State New
Headers show

Commit Message

John David Anglin Sept. 1, 2013, 5:09 p.m. UTC
This pattern fixes the following ICE found compiling ArabicShaping.cpp:

g++-4.7 -D_REENTRANT -I. -I./.. -I../common -I./unicode - 
DU_ATTRIBUTE_DEPRECATED= -DU_LAYOUT_IMPLEMENTATION -D__NO_MATH_INLINES  
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG - 
D_FORTIFY_SOURCE=2 -DGCC_HIDDEN_VISIBILITY -B/usr/bin -fexceptions - 
funsigned-char -fno-strict-aliasing -g -pipe -fPIC -pthread -Wall - 
Wcast-align -Wno-trigraphs -Wextra -Wno-missing-field-initializers - 
std=gnu++11 -fvisibility=hidden -fprofile-use -Wcoverage-mismatch - 
fprofile-correction -O2 -W -Wall -pedantic -Wpointer-arith -Wwrite- 
strings -Wno-long-long -std=c++11 -c -DPIC -fPIC -o ArabicShaping.o  
ArabicShaping.cpp
ArabicShaping.cpp: In static member function 'static  
icu_50::ArabicShaping::ShapeType  
icu_50::ArabicShaping::getShapeType(LEUnicode)':
ArabicShaping.cpp:36:94: warning: cast from 'const le_uint8* {aka  
const unsigned char*}' to 'const icu_50::ClassDefinitionTable*'  
increases required alignment of target type [-Wcast-align]
ArabicShaping.cpp: In static member function 'static void  
icu_50::ArabicShaping::shape(const LEUnicode*, le_int32, le_int32,  
le_int32, le_bool, icu_50::LEGlyphStorage&)':
ArabicShaping.cpp:210:1: note: file /net/usr.work/d036493/hppa/ 
CGK_ls3011_v29/i18n/icu/50.1/icu/source/layout/ArabicShaping.gcda not  
found, execution counts estimated
ArabicShaping.cpp:208:1: error: unrecognizable insn:
(insn 272 271 273 33 (set (reg:SI 298)
        (ne:SI (const_int 0 [0])
            (const_int 0 [0]))) ArabicShaping.cpp:201 -1
     (nil))
ArabicShaping.cpp:208:1: internal compiler error: in extract_insn, at  
recog.c:2123

The expander allowed a "const_int 0" operand 1 but the subsequent  
patterns didn't.  The patch fixes
this inconsistency.

Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11.  Applied to  
active branches.

Dave
--
John David Anglin	dave.anglin@bell.net
2013-09-01  John David Anglin  <danglin@gcc.gnu.org>

	* config/pa/pa.md: Allow "const_int 0" operand 1 in "scc" insns.
diff mbox

Patch

Index: config/pa/pa.md
===================================================================
--- config/pa/pa.md	(revision 202083)
+++ config/pa/pa.md	(working copy)
@@ -833,7 +833,7 @@ 
 (define_insn "scc"
   [(set (match_operand:SI 0 "register_operand" "=r")
 	(match_operator:SI 3 "comparison_operator"
-			   [(match_operand:SI 1 "register_operand" "r")
+			   [(match_operand:SI 1 "reg_or_0_operand" "rM")
 			    (match_operand:SI 2 "arith11_operand" "rI")]))]
   ""
   "{com%I2clr|cmp%I2clr},%B3 %2,%1,%0\;ldi 1,%0"
@@ -843,7 +843,7 @@ 
 (define_insn ""
   [(set (match_operand:DI 0 "register_operand" "=r")
 	(match_operator:DI 3 "comparison_operator"
-			   [(match_operand:DI 1 "register_operand" "r")
+			   [(match_operand:DI 1 "reg_or_0_operand" "rM")
 			    (match_operand:DI 2 "arith11_operand" "rI")]))]
   "TARGET_64BIT"
   "cmp%I2clr,*%B3 %2,%1,%0\;ldi 1,%0"
@@ -853,10 +853,10 @@ 
 (define_insn "iorscc"
   [(set (match_operand:SI 0 "register_operand" "=r")
 	(ior:SI (match_operator:SI 3 "comparison_operator"
-				   [(match_operand:SI 1 "register_operand" "r")
+				   [(match_operand:SI 1 "reg_or_0_operand" "rM")
 				    (match_operand:SI 2 "arith11_operand" "rI")])
 		(match_operator:SI 6 "comparison_operator"
-				   [(match_operand:SI 4 "register_operand" "r")
+				   [(match_operand:SI 4 "reg_or_0_operand" "rM")
 				    (match_operand:SI 5 "arith11_operand" "rI")])))]
   ""
   "{com%I2clr|cmp%I2clr},%S3 %2,%1,%%r0\;{com%I5clr|cmp%I5clr},%B6 %5,%4,%0\;ldi 1,%0"
@@ -866,10 +866,10 @@ 
 (define_insn ""
   [(set (match_operand:DI 0 "register_operand" "=r")
 	(ior:DI (match_operator:DI 3 "comparison_operator"
-				   [(match_operand:DI 1 "register_operand" "r")
+				   [(match_operand:DI 1 "reg_or_0_operand" "rM")
 				    (match_operand:DI 2 "arith11_operand" "rI")])
 		(match_operator:DI 6 "comparison_operator"
-				   [(match_operand:DI 4 "register_operand" "r")
+				   [(match_operand:DI 4 "reg_or_0_operand" "rM")
 				    (match_operand:DI 5 "arith11_operand" "rI")])))]
   "TARGET_64BIT"
   "cmp%I2clr,*%S3 %2,%1,%%r0\;cmp%I5clr,*%B6 %5,%4,%0\;ldi 1,%0"
@@ -881,7 +881,7 @@ 
 (define_insn "negscc"
   [(set (match_operand:SI 0 "register_operand" "=r")
 	(neg:SI (match_operator:SI 3 "comparison_operator"
-	       [(match_operand:SI 1 "register_operand" "r")
+	       [(match_operand:SI 1 "reg_or_0_operand" "rM")
 		(match_operand:SI 2 "arith11_operand" "rI")])))]
   ""
   "{com%I2clr|cmp%I2clr},%B3 %2,%1,%0\;ldi -1,%0"
@@ -891,7 +891,7 @@ 
 (define_insn ""
   [(set (match_operand:DI 0 "register_operand" "=r")
 	(neg:DI (match_operator:DI 3 "comparison_operator"
-	       [(match_operand:DI 1 "register_operand" "r")
+	       [(match_operand:DI 1 "reg_or_0_operand" "rM")
 		(match_operand:DI 2 "arith11_operand" "rI")])))]
   "TARGET_64BIT"
   "cmp%I2clr,*%B3 %2,%1,%0\;ldi -1,%0"