public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [RFC/PATCH 00/11] Fix up some unexpected empty split conditions
@ 2021-06-02  5:04 Kewen Lin
  2021-06-02  5:04 ` [PATCH 01/11] gen: Emit error msg for empty split condition Kewen Lin
                   ` (11 more replies)
  0 siblings, 12 replies; 62+ messages in thread
From: Kewen Lin @ 2021-06-02  5:04 UTC (permalink / raw)
  To: gcc-patches
  Cc: Kewen Lin, wschmidt, segher, richard.sandiford, jeffreyalaw,
	jakub, richard.guenther

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


^ permalink raw reply	[flat|nested] 62+ messages in thread

end of thread, other threads:[~2021-06-08 12:50 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02  5:04 [RFC/PATCH 00/11] Fix up some unexpected empty split conditions Kewen Lin
2021-06-02  5:04 ` [PATCH 01/11] gen: Emit error msg for empty split condition Kewen Lin
2021-06-02  7:04   ` Richard Biener
2021-06-02  7:27     ` Kewen.Lin
2021-06-02  7:43       ` Richard Biener
2021-06-02  8:18         ` Kewen.Lin
2021-06-02 23:35           ` Segher Boessenkool
2021-06-04 19:03   ` Martin Sebor
2021-06-04 19:37     ` Segher Boessenkool
2021-06-02  5:04 ` [PATCH 02/11] arc: Update unexpected " Kewen Lin
2021-06-02  6:52   ` Claudiu Zissulescu
2021-06-02  7:05     ` Kewen.Lin
2021-06-02  7:12       ` Claudiu Zissulescu
2021-06-02  7:43         ` [PATCH 02/11 v2] arc: Remove define_insn_and_split *bbit_di Kewen.Lin
2021-06-02  8:33           ` Claudiu Zissulescu
2021-06-02  5:04 ` [PATCH 03/11] arm: Update unexpected empty split condition Kewen Lin
2021-06-02  9:02   ` Kyrylo Tkachov
2021-06-02  5:04 ` [PATCH 04/11] cris: " Kewen Lin
2021-06-02 12:45   ` Hans-Peter Nilsson
2021-06-03  5:45     ` Kewen.Lin
2021-06-03 16:12       ` Hans-Peter Nilsson
2021-06-03 22:33         ` Hans-Peter Nilsson
2021-06-04  3:25         ` Kewen.Lin
2021-06-02  5:04 ` [PATCH 05/11] h8300: " Kewen Lin
2021-06-02 17:10   ` Jeff Law
2021-06-02  5:04 ` [PATCH 06/11] i386: " Kewen Lin
2021-06-02  6:28   ` Uros Bizjak
2021-06-02  5:04 ` [PATCH 07/11] m68k: " Kewen Lin
2021-06-02 17:08   ` Jeff Law
2021-06-02  5:04 ` [PATCH 08/11] mips: " Kewen Lin
2021-06-02 17:11   ` Jeff Law
2021-06-02  5:04 ` [PATCH 09/11] or1k: " Kewen Lin
2021-06-02  5:05 ` [PATCH 10/11] sh: " Kewen Lin
2021-06-02  5:17   ` Oleg Endo
2021-06-02  5:05 ` [PATCH 11/11] sparc: " Kewen Lin
2021-06-02  8:11 ` [RFC/PATCH 00/11] Fix up some unexpected empty split conditions Richard Sandiford
2021-06-02  8:37   ` Kewen.Lin
2021-06-02  9:13     ` Richard Sandiford
2021-06-02 10:01       ` Kewen.Lin
2021-06-02 10:12         ` Richard Biener
2021-06-02 17:32           ` Richard Sandiford
2021-06-02 18:25             ` Jeff Law
2021-06-02 23:52             ` Segher Boessenkool
2021-06-03  5:22               ` Kewen.Lin
2021-06-03  8:00                 ` Segher Boessenkool
2021-06-03  9:18                   ` Segher Boessenkool
2021-06-04  2:57                     ` Kewen.Lin
2021-06-07  7:12                       ` Richard Biener
2021-06-08  1:45                         ` Kewen.Lin
2021-06-07 23:50                       ` Segher Boessenkool
2021-06-08  2:09                         ` Kewen.Lin
2021-06-08  7:08                           ` Richard Biener
2021-06-08 12:30                             ` Segher Boessenkool
2021-06-08 12:50                               ` Richard Biener
2021-06-03 17:11                   ` Jeff Law
2021-06-03 22:19                     ` Segher Boessenkool
2021-06-03  8:05                 ` Richard Sandiford
2021-06-03 10:01                   ` Segher Boessenkool
2021-06-03 10:25                     ` Richard Sandiford
2021-06-03 21:25                       ` Segher Boessenkool
2021-06-03 21:34                         ` Jakub Jelinek
2021-06-04  3:33                   ` Kewen.Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).