From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: egcs@cygnus.com Subject: Re: Probable bug in gcc/reg-stack.c (example given) Date: Wed, 27 Aug 1997 03:29:01 -0000 Message-ID: <9708270329.AA19020@modi.xraylith.wisc.edu> In-reply-to: Probable bug in gcc/reg-stack.c (example given) X-SW-Source: 1997-08/0586.html Message-ID: <19970827032901.oz_7MgawWEOyeXxiINjNeN0TTs3EvfpYdHbaXmvuw2g@z> First, when looking for a set of an FP register, it seems to me that just checking that the pattern is a (set (fp) (something)) won't work for insns like this: (define_insn "" [(set (match_operand:SF 0 "nonimmediate_operand" "=f,m") (float_truncate:SF (match_operand:DF 1 "register_operand" "0,f"))) (clobber (match_operand:SF 2 "memory_operand" "m,m"))] "TARGET_80387" It seems to me you should use reg_set_p when you're looking for a set of an FP register and for a set of the PC register. Or, you need to iterate through each item in a PARALLEL and do the check for (set (fp) (something)) I also think your patch will pessimize the code when it runs into a jump table. I think this can be easily solved too (look in flow.c I think you can actually crib a lot of the code from find_basic_blocks). jeff