- /* Check for a branch on conditions that are set by the load.
- * Beware: The insn may branch to another conditional branch
- * that evaluates other flags, so check that.
- */
- CodeEntry* E = L[2];
- int Delete = 0;
- while (1) {
- if ((E->Info & (OF_CBRA|OF_UBRA)) != 0) {
- /* A conditional branch. Check if it jumps on a
- * condition not set by the load.
- */
- if ((E->Info & (OF_FBRA|OF_UBRA)) == 0) {
- /* Invalid branch */
- break;
- } else if (E->JumpTo == 0) {
- /* Jump to external */
- Delete = 1;
- break;
- } else {
- /* Check target of branch */
- E = E->JumpTo->Owner;
- }
- } else {
- /* Some other insn */
- Delete = 1;
- break;
- }
- }
+ /* The following insn branches on the condition of a load, so
+ * the compare instruction can be removed.
+ */
+ Delete = 1;