Could not split insn

Petar Penchev ptr@melexis.com
Mon Sep 13 09:55:00 GMT 2004


Hello all,
I have define "iorsi3" instruction in my .md file as follows :

(define_insn_and_split "iorsi3"
   [(set (match_operand:SI 0 "nonimmediate_nonstack_operand"		"=b,  o")
	(ior:SI (match_operand:SI 1 "nonimmediate_nonstack_operand"	"%0,  0")
		  (match_operand:SI 2 "general_operand"				"boi, boi")))
    (clobber (match_scratch:HI 3							"=X,  &r"))]
   ""
   "#"
   "reload_completed"
   [(const_int 0)]
   "split_logical(HImode, IOR, operands);
    DONE;"
)

Where constraint 'b' is general-purpose register, which supports SImode.
I tried to compile newlib with optimization -O1 and I have got folowing  
message:

../../../../../newlib_src/newlib/libc/stdlib/mprec.c: In function  
`_lshift':
../../../../../newlib_src/newlib/libc/stdlib/mprec.c:515: error: could not  
split insn
(insn 222 278 279 (parallel [
             (set (reg:SI 0 A)
                 (ior:SI (reg:SI 0 A)
                     (const_int 0 [0x0])))
             (clobber (scratch:HI))
         ]) 62 {iorsi3} (insn_list 96 (nil))
     (expr_list:REG_UNUSED (scratch:HI)
         (nil)))
../../../../../newlib_src/newlib/libc/stdlib/mprec.c:515: internal  
compiler error: in final_scan_insn, at final.c:2429

Register A is accessible in SImode.
But it seems to me that pattern should be matched by the split.


Does anybody have met the same problem ?



-- 
Regards
Petar Penchev



More information about the Gcc mailing list