https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124355
Bug ID: 124355
Summary: canonicalize_condition creates an rtl and then
sometimes throws it away right away
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: easyhack, internal-improvement, memory-hog
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
```
/* We promised to return a comparison. */
rtx ret = gen_rtx_fmt_ee (code, VOIDmode, op0, op1);
if (COMPARISON_P (ret))
return ret;
return 0;
```
This should just be:
```
/* We promised to return a comparison. */
if ((GET_RTX_CLASS (code) & RTX_COMPARE_MASK) != RTX_COMPARE_RESULT)
return 0;
return gen_rtx_fmt_ee (code, VOIDmode, op0, op1);
```