Hi all, define_insn_and_split should avoid to use empty split condition if the condition for define_insn isn't empty, otherwise it can sometimes result in unexpected consequence, since the split will always be done even if the insn condition doesn't hold.
To avoid forgetting to add "&& 1" onto split condition, as Segher suggested in thread[1], this series is to add the check and raise an error if it catches the unexpected cases. With this new check, we have to fix up some existing define_insn_and_split which are detected as error. I hope all these places are not intentional to be kept as blank. Any comments are highly appreciated. BR, Kewen [1] https://gcc.gnu.org/pipermail/gcc-patches/2021-March/566970.html Kewen Lin (11): gen: Emit error msg for empty split condition arc: Update unexpected empty split condition arm: Update unexpected empty split condition cris: Update unexpected empty split condition h8300: Update unexpected empty split condition i386: Update unexpected empty split condition m68k: Update unexpected empty split condition mips: Update unexpected empty split condition or1k: Update unexpected empty split condition sh: Update unexpected empty split condition sparc: Update unexpected empty split condition gcc/config/arc/arc.md | 2 +- gcc/config/arm/vfp.md | 4 ++-- gcc/config/cris/cris.md | 2 +- gcc/config/h8300/combiner.md | 2 +- gcc/config/i386/i386.md | 6 +++--- gcc/config/i386/sse.md | 8 ++++---- gcc/config/m68k/m68k.md | 6 +++--- gcc/config/mips/mips.md | 6 +++--- gcc/config/or1k/or1k.md | 2 +- gcc/config/sh/sh.md | 2 +- gcc/config/sparc/sparc.md | 12 ++++++------ gcc/gensupport.c | 3 +++ 12 files changed, 29 insertions(+), 26 deletions(-) -- 2.17.1