CMOVZ R2, R3, R1 Annulled if R1 is not 0 Conditional Instruction … Can convert control to data dependence • if In vector computing, it’s called conversion. Traditionally, in a pipelined system Dependence has to be resolved closer to front of pipeline – conditional execution • For Dependence is resolved at end of pipeline, closer to the register write – Another example = • A abs(B) if (B < 0) A = -B; else A = B; Two conditional moves One unconditional and one conditional move The branch condition has moved into the • instruction Control dependence becomes data dependence – Limitations of Conditional Moves Conditional moves are the simplest form of predicated instructions Useful for short sequences For large code, this can be inefficient Introduces many conditional moves – Some architectures support full predication All instructions, not just moves – Very useful in global scheduling Can handle nonloop branches nicely
CMOVZ R2, R3, R1 Annulled if R1 is not 0 Conditional Instruction … Can convert control to data dependence • In vector computing, it’s called if conversion. Traditionally, in a pipelined system – Dependence has to be resolved closer to front of pipeline • For conditional execution – Dependence is resolved at end of pipeline, closer to the register write Another example • A = abs(B) if (B < 0) A = -B; else A = B; Two conditional moves One unconditional and one conditional move • The branch condition has moved into the instruction – Control dependence becomes data dependence Limitations of Conditional Moves Conditional moves are the simplest form of predicated instructions Useful for short sequences For large code, this can be inefficient – Introduces many conditional moves Some architectures support full predication – All instructions, not just moves Very useful in global scheduling Can handle nonloop branches nicely
Hardware-Support-Conditional-Execution.docx