On Fri, Aug 14, 2020 at 4:24 PM Segher Boessenkool <seg...@kernel.crashing.org> wrote: > On Fri, Aug 14, 2020 at 04:46:59PM +0530, Senthil Kumar Selvaraj via Gcc > wrote: > > (define_insn "*mov<mode>_insn_noclobber_flags" > > [(set (match_operand:ALL1 0 "nonimmediate_operand" "=r,d ,q,r") > > (match_operand:ALL1 1 "nox_general_operand" "r,n Ynn,r,q")) > > (clobber (const_int 0))] > > This is not correct, clobbers like that are not defined RTL, and are > actually used internally (by combine at least), so this will confuse > that. > > If you want to say some alternative does not clobber anything, just use > the constraint "X" for that alternative.
Just to clarify, such clobbers would still show up in RTL, right? Because some passes, such as cmpelim, do not currently appear to deal very well with extra clobbers, so that might be a problem. What I'm currently doing is this: (define_split [(set (match_operand 0 "nonimmediate_operand") (match_operand 1 "nox_general_operand"))] "reload_completed && mov_clobbers_cc (insn, operands)" [(parallel [(set (match_dup 0) (match_dup 1)) (clobber (reg:CC REG_CC))])]) which, if I understand correctly, introduces the parallel-clobber expression only when necessary, at the same time as post-reload splitters introduce REG_CC references. Is that correct? Thanks Pip