This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: When is the hardware related register is allocated?


Quoting Feng LI <nemokingdom@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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]