On Wed, Jun 02, 2021 at 04:18:46PM +0800, Kewen.Lin wrote: > on 2021/6/2 下午3:43, Richard Biener wrote: > Yes, the "" in split condition does mean 'true' (always).
Right -- which means it will be split whenever it matches. This *can* be intended, but in define_insn_and_split it is almost always a simple bug. > > Also "" as split condition _does_ > > seem valid, just maybe unintended? > > Yes, it's valid without this patch. That's why I asked whether there is > some good reason to keep it be [1]. In Segher's opinion, there is no > good reason, he pointed out "A reader does not expect a > define_insn_and_split to split any other insns." Yes, but considering plain define_split, it can be wanted, esp. in simpler backends that do not have a lot of historical baggage. > > How would one create a > > functionally equivalent example? "|| 1" will likely not work. > > I think "|| 1" works just like "" if people want the define_split to > split all the time, even with this patch. Except "|| 1" is a syntax error. You can always write just "1". > > Note I'm not familiar with all the details here but the documentation > > does seem ambiguous at best, not supporting to error on empty > > split-conditions at least. > > Yes, the current patch will stop the "" condition which was accepted > before. Thanks for bringing this up! We have to update the > documentation if people reach a consensus. It will help if the error message tells you If this is what you intended, write "1". or similar. No more documentation is needed then :-) Segher