Patent ID: 8566569

Claim:
A computer program product for state machine-based filtering of a pattern history table, the pattern history table comprising an n-bit index, the computer program product comprising: a non-transitory tangible storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method comprising: identifying a matching previous occurrence of a current branch instruction in an address history vector, the address history vector storing addresses of most recently occurring branch instructions; and based on determining a direction history of the previous occurrence of the current branch instruction matches a direction history of the current branch instruction, the direction history of the previous occurrence of the current branch instruction is stored in a direction history vector configured to maintain a number of entries that are twice the number of entries maintained in the pattern history table, the method further comprising: comparing the outcome of the previous occurrence of the current branch instruction with the outcome of the current branch instruction; and preventing the pattern history table from being updated with the outcome of the current branch instruction based on the outcome of the previous occurrence of the current branch instruction not matching the outcome of the current branch instruction.