Quoting Feng LI <nemoking...@gmail.com>:
So I suppose with (clobber (reg:CC FLAGS_REG)), the compiler
will be capable to know this register will be modified in this
instruction and
apply proper behavior when necessary?
Depends. It will stop the compiler moving a FLAGS_REG setter and/or user
such that FLAGS_REG becomes live across your insn pattern.
But if you emit this pattern in a place where FLAGS_REG is already live
(e.g. when you generate it from some combiner pattern, or create it
via a split / peephole2 without FLAGS_REG clobber), there is a problem.