Method to “remove” branches
Predicated or conditional instructions and one or more predicate registers use a predicate register as additional input operand.
The Boolean result of a condition testing is recorded in a (one-bit) predicate register.
Predicated instructions are fetched, decoded and placed in the instruction window like non predicated instructions.
It is dependent on the processor architecture, how far a predicated instruction proceeds speculatively in the pipeline before its predication is resolved:
- A predicated instruction executes only if its predicate is true, otherwise the instruction is discarded.
- Alternatively the predicated instruction may be executed, but commits only if the predicate is true, otherwise the result is discarded.