Bug 21134 - Make gengenrtl emit mode checks aborting on VOIDmode
Summary: Make gengenrtl emit mode checks aborting on VOIDmode
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.1.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: internal-improvement
Depends on:
Blocks:
 
Reported: 2005-04-20 23:14 UTC by Hans-Peter Nilsson
Modified: 2021-09-09 08:54 UTC (History)
1 user (show)

See Also:
Host:
Target: cris-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-02-13 03:54:03


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Nilsson 2005-04-20 23:14:06 UTC
See <URL:http://gcc.gnu.org/ml/gcc-patches/2005-04/msg02223.html> #4.
See also PR 20413 comment #9.
Only CONST_INT should have VOIDmode, and it's not generated by gengenrtl,
so a patch for this enhancement seems simple.
Comment 1 Andrew Pinski 2005-04-21 01:00:00 UTC
Confirmed.
Comment 2 Hans-Peter Nilsson 2005-04-23 14:44:31 UTC
Note a list of exceptions is needed, for example
<URL:http://gcc.gnu.org/ml/gcc-patches/2005-04/msg02238.html>.
Comment 3 roger 2005-04-23 14:49:42 UTC
The list of exceptions, in addition to those mentioned in the e-mail above, also
needs to include compare, if_then_else and all binary comparison operators; eq,
ne, lt, gt, le, ge.

I'm not opposed to adding checks where appropriate, but clearly the sweeping
statement that the only place we need VOIDmode is const_int, is perhaps an over
simplification.  :-)
Comment 4 Hans-Peter Nilsson 2005-04-23 15:14:22 UTC
In response to comment #2:
Any and all SET_SRC/SET_DEST mode-exceptions must be considered to be added
to genpreds and genrecog as well, for possible omission of the automatically
added mode checks.  The sweeping statement humorousely referred to, seems to
be a common delusion, shared with at least those programs.  Things don't break
until there's a (match_operand:P "predicate" x) where x is one of those
exceptions (without genpreds/genrecog modified as per const_int).
That then causes the predicate to return false.