# US 11,113,067 B1 · Speculative branch pattern update

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,113,067 B1
- Document ID: US11113067B1
- Status: Granted
- Kind: B1
- Application number: 17/099,852
- Filed: 2020-11-17
- Granted: 2021-09-07
- Earliest claimed: 2020-11-17
- Assignees: Centaur Technology, Inc.
- Applicants: Centaur Technology, Inc.
- Inventors: Thomas C. McDonald
- Web page: https://patentgrep.com/patent/US11113067B1

## CPC

- G06F 9/3806: {using address prediction, e.g. return stack, branch history buffer}
- G06F 9/3844: {using dynamic branch prediction, e.g. using branch history tables}
- G06F 9/30029: {Logical and Boolean instructions, e.g. XOR, NOT}
- G06F 9/30047: {Prefetch instructions; cache control instructions}
- G06F 9/30058: {Conditional branch instructions}
- G06F 9/321: {Program or instruction counter, e.g. incrementing}
- G06F 9/323: {for indirect branch instructions}
- G06F 9/3848: {using hybrid branch prediction, e.g. selection between prediction techniques}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In one embodiment, a microprocessor, comprising: first logic configured to detect that a fetched cache address matches at least one of two previous cache addresses; and second logic configured to adjust a branch pattern used for conditional branch prediction based on the match and combine the cache address with the adjusted branch pattern to form a conditional branch predictor address.

## Claims

### Claim 1

A microprocessor, comprising:
first logic configured to detect that a cache address matches at least one of two previous cache addresses; and
second logic configured to adjust a branch pattern used for conditional branch prediction based on the match and combine the cache address with the adjusted branch pattern to form a conditional branch predictor address.

### Claim 2 (depends on 1)

The microprocessor of claim 1, wherein the first logic comprises a first register to store a first cache address of one of the two previous cache addresses used two cycles ago and a second register to store a second cache address of the other of the two previous cache addresses used one cycle ago.

### Claim 3 (depends on 2)

The microprocessor of claim 2, wherein the first logic further comprises compare logic to compare the cache address with the first cache address and compare the cache address with the second cache address.

### Claim 4 (depends on 3)

The microprocessor of claim 3, wherein the first logic is configured to determine the match based on an output of the compare logic.

### Claim 5 (depends on 4)

The microprocessor of claim 4, wherein the second logic is configured to adjust the branch pattern by flipping one or more bits of the branch pattern.

### Claim 6 (depends on 5)

The microprocessor of claim 5, wherein the second logic is configured to form the conditional branch predictor address via an XOR operation between the flipped one or more bits and the cache address.

### Claim 7 (depends on 5)

The microprocessor of claim 5, wherein predictions for branches corresponding to the two previous cache addresses are cached in a conditional branch table for a TAGE predictor.

### Claim 8 (depends on 7)

The microprocessor of claim 7, wherein the second logic sends the conditional branch predictor address to the conditional branch table, the conditional branch predictor address used to read the conditional branch table at a different entry than that used for conditional branch prediction based on the first cache address.

### Claim 9 (depends on 8)

The microprocessor of claim 8, wherein the different entry to the conditional branch table comprises a different branch prediction counter than that used for conditional branch prediction based on the first cache address.

### Claim 10

A speculative branch pattern update method implemented by a microprocessor, the speculative branch pattern update method comprising:
detecting by first logic that a cache address matches at least one of two previous cache addresses;
adjusting by second logic a branch pattern used for conditional branch prediction based on the match; and
combining by the second logic the cache address with the adjusted branch pattern to form a conditional branch predictor address.

### Claim 11 (depends on 10)

The speculative branch pattern update method of claim 10, further comprising storing with a first register of the first logic a first cache address of one of the two previous cache addresses used two cycles ago and storing with a second register of the first logic a second cache address of the other of the two previous cache addresses used one cycle ago.

### Claim 12 (depends on 11)

The speculative branch pattern update method of claim 11, further comprising comparing by compare logic the cache address with the first cache address and comparing the cache address with the second cache address.

### Claim 13 (depends on 12)

The speculative branch pattern update method of claim 12, further comprising determining by the first logic the match based on the comparing.

### Claim 14 (depends on 13)

The speculative branch pattern update method of claim 13, further comprising adjusting by the second logic the branch pattern by flipping one or more bits of the branch pattern.

### Claim 15 (depends on 14)

The speculative branch pattern update method of claim 14, further comprising forming by the second logic the conditional branch predictor address via an XOR operation between the flipped one or more bits and the cache address.

### Claim 16 (depends on 14)

The speculative branch pattern update method of claim 14, wherein predictions for branches corresponding to the two previous cache addresses are cached in a conditional branch table for a TAGE predictor.

### Claim 17 (depends on 16)

The speculative branch pattern update method of claim 16, further comprising sending by the second logic the conditional branch predictor address to the conditional branch table, the conditional branch predictor address used to read the conditional branch table at a different entry than that used for conditional branch prediction based on the first cache address.

### Claim 18 (depends on 17)

The speculative branch pattern update method of claim 17, wherein the different entry to the conditional branch table comprises a different branch prediction counter than that used for conditional branch prediction based on the first cache address.
