https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100880
Bug ID: 100880
Summary: The build should error out for define_insn without
insn template
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: ubizjak at gmail dot com
Target Milestone: ---
Currently, the build allows define_insn RTX without insn template. It would be
nice to detect this invalid RTX and error out during build. This would help to
avoid thinkos like:
-(define_insn "abs<mode>2"
+(define_expand "abs<mode>2"
[(set (match_operand:MMXMODEI 0 "register_operand")
(abs:MMXMODEI
(match_operand:MMXMODEI 1 "register_operand")))]
"TARGET_MMX_WITH_SSE && TARGET_SSSE3")
which worked only by luck due to the shadowing of the insn above this one.
The documentation does not say that insn template can be optional in the
define_insn RTX.