Suspicious lines in i386.md

Jan Hubicka jh@suse.cz
Fri Sep 10 19:00:00 GMT 2004


> Hello Jan!
> 
> There is something that catched my eye in i386.md:
> 
> in "*cmpfp_i",  "*cmpfp_i_sse", "*cmpfp_i_sse_only" patterns, there is a 
> condition:
> 
>   && GET_MODE (operands[0]) == GET_MODE (operands[0])"

Yes, this is obviously typo.  It probably meants that 
  && GET_MODE (operands[0]) == GET_MODE (operands[1])"
> 
> which looks like a typo to me. Another suspicious line is in 
> "fix_truncdi_memory" pattern, where
> 
>  "* operands[5] = operands[4]; return output_fix_trunc (insn, operands);"
> 
> but operands[5] is not used in output_fix_trunc() function in i386.c

This also looks like bug.  The output_fix_trunc changed several times,
so probably this is some kind of leftover.
> 
> Should these lines be fixed, or are they intentionally written this way?

Yes, these should be fixed.  Good catch ;)
Honza
> 
> Uros.



More information about the Gcc mailing list