workaround for IA-64 -fssa testsuite failures

Jim Wilson wilson@cygnus.com
Wed Aug 2 17:33:00 GMT 2000


The ussa pass has the bad habit of creating TImode move instructions, even
though I have no movti patterns, and even though there are no TImode move
insns before the ssa pass.  This causes some testsuite failures, which is
annoying, and detracts from the more important problems that need to be
fixed.  I don't believe that adding a movti pattern is the right answer,
because I think I will get worse code if I do that.  So for now I added
flag_ssa specific movti patterns which is just enough to make -fssa work
for the testsuite.  I plan to come back to this later and write a better
fix.
	
The TImode move insns seem to be coming from some structure parameter
passing and/or structure return insns.  If you have a TImode structure,
as an argument/return value, then we end up with two (subreg:DI (TI:reg))
move insns.  SSA then tracks the TImode register, and when we convert SSA
back to RTL we end up with TImode moves.  Presumably the ussa pass needs to
be made smarter so that it generate subreg moves when necessary.
	
2000-08-02  Jim Wilson  <wilson@cygnus.com>

	* config/ia64/ia64-protos.h (flag_ssa): Declare.
	* config/ia64/ia64.md (movti_internal, movti_internal+1): New.

Index: ia64-protos.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/config/ia64/ia64-protos.h,v
retrieving revision 1.16.2.2
diff -p -r1.16.2.2 ia64-protos.h
*** ia64-protos.h	2000/07/31 17:33:12	1.16.2.2
--- ia64-protos.h	2000/08/02 21:38:02
*************** extern void ia64_init_builtins PARAMS((v
*** 118,120 ****
--- 118,123 ----
  extern void ia64_override_options PARAMS((void));
  extern unsigned int ia64_compute_frame_size PARAMS((int));
  extern void save_restore_insns PARAMS((int));
+ 
+ /* ??? Flag defined in toplev.c, for ia64.md -fssa hack.  */
+ extern int flag_ssa;
Index: ia64.md
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/config/ia64/ia64.md,v
retrieving revision 1.69.2.3
diff -p -r1.69.2.3 ia64.md
*** ia64.md	2000/07/31 17:33:12	1.69.2.3
--- ia64.md	2000/08/02 21:38:02
***************
*** 551,556 ****
--- 551,576 ----
    "addl %0 = @ltoff(%1), gp"
    [(set_attr "type" "A")])
  
+ ;; ??? These patterns exist to make SSA happy.  We can get TImode values
+ ;; because of structure moves generated for parameter and return value
+ ;; loads and stores.
+ 
+ (define_insn "*movti_internal"
+   [(set (match_operand:TI 0 "register_operand" "=r")
+ 	(match_operand:TI 1 "register_operand" "r"))]
+   "flag_ssa"
+   "#"
+   [(set_attr "type" "unknown")
+    (set_attr "predicable" "no")])
+ 
+ (define_split
+   [(set (match_operand:TI 0 "register_operand" "")
+ 	(match_operand:TI 1 "register_operand" ""))]
+   "flag_ssa && reload_completed"
+   [(set (subreg:DI (match_dup 0) 0) (subreg:DI (match_dup 1) 0))
+    (set (subreg:DI (match_dup 0) 1) (subreg:DI (match_dup 1) 1))]
+   "")
+ 
  ;; Floating Point Moves
  ;;
  ;; Note - Patterns for SF mode moves are compulsory, but


More information about the Gcc-patches mailing list