# US 2020/0004550 A1 · Combining load or store instructions

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

- Number: US 2020/0004550 A1
- Document ID: US20200004550A1
- Status: Published application
- Kind: A1
- Application number: 16/024,725
- Filed: 2018-06-29
- Published: 2020-01-02
- Earliest claimed: 2018-06-29
- Assignees: QUALCOMM Incorporated
- Applicants: QUALCOMM Incorporated
- Inventors: Harsh THAKKER; Thomas Philip SPEIER; Rodney Wayne SMITH; Kevin JAGET; James Norris DIEFFENDERFER; Michael MORROW; Pritha GHOSHAL; Yusuf Cagatay TEKMEN; Brian STEMPEL; Sang Hoon LEE; Manish GARG
- Web page: https://patentgrep.com/patent/US20200004550A1

## CPC

- G06F 9/3853: {of compound instructions}
- G06F 9/30043: {LOAD or STORE instructions; Clear instruction}
- G06F 9/30098: {Register arrangements}
- G06F 9/3017: {Runtime instruction translation, e.g. macros}
- G06F 9/345: of multiple operands or results {(addressing multiple banks G06F12/06)}
- G06F 9/3824: {Operand accessing}
- G06F 9/3832: {Value prediction for operands; operand history buffers}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Various aspects disclosed herein relate to combining instructions to load data from or store data in memory while processing instructions in a computer processor. More particularly, at least one pattern of multiple memory access instructions that reference a common base register and do not fully utilize an available bus width may be identified in a processor pipeline. In response to determining that the multiple memory access instructions target adjacent memory or non-contiguous memory that can fit on a single cache line, the multiple memory access instructions may be replaced within the processor pipeline with one equivalent memory access instruction that utilizes more of the available bus width than either of the replaced memory access instructions.

## Claims

### Claim 1

A method for combining load or store instructions, comprising:
identifying, in a processor pipeline, at least one pattern of multiple memory access instructions that reference a common base register and do not fully utilize an available bus width;
determining that the multiple memory access instructions target adjacent memory or non-contiguous memory that can fit on a single cache line; and
replacing, within the processor pipeline, the multiple memory access instructions with one equivalent memory access instruction that utilizes more of the available bus width than either of the replaced memory access instructions.

### Claim 2 (depends on 1)

The method recited in claim 1, wherein the multiple memory access instructions are replaced with the one equivalent memory access instruction in response to determining that the multiple memory access instructions appear consecutively in the processor pipeline and target the adjacent memory at contiguous offsets.

### Claim 3 (depends on 2)

The method recited in claim 2, wherein the multiple memory access instructions target the adjacent memory at contiguous positive offsets.

### Claim 4 (depends on 2)

The method recited in claim 2, wherein the multiple memory access instructions target the adjacent memory at contiguous negative offsets.

### Claim 5 (depends on 1)

The method recited in claim 1, wherein the multiple memory access instructions utilize different portions of the available bus width.

### Claim 6 (depends on 1)

The method recited in claim 1, further comprising determining that the multiple memory access instructions target the adjacent memory in response to the multiple memory access instructions including a first memory access instruction that alters a value stored in the common base register and a second memory access that accesses memory at a location adjacent to the altered value stored in the common base register.

### Claim 7 (depends on 1)

The method recited in claim 1, further comprising determining that the multiple memory access instructions appear non-consecutively in the processor pipeline, wherein the multiple memory access instructions are replaced with the one equivalent memory access instruction in response to determining that no intervening store instructions appear between the non-consecutive memory access instructions.

### Claim 8 (depends on 1)

The method recited in claim 1, further comprising determining that the multiple memory access instructions appear non-consecutively in the processor pipeline, wherein the multiple memory access instructions are replaced with the one equivalent memory access instruction in response to determining that one or more intervening store instructions appearing between the non-consecutive memory access instructions use the common base register referenced in the multiple memory access instructions and that there are no overlapping bytes between the non-consecutive memory access instructions and the one or more intervening store instructions.

### Claim 9 (depends on 1)

The method recited in claim 1, wherein the multiple memory access instructions comprise multiple dynamic instances of the same memory access instruction.

### Claim 10 (depends on 1)

The method recited in claim 1, wherein the multiple memory access instructions comprise multiple load instructions or multiple store instructions.

### Claim 11

An apparatus, comprising:
a processor configured to identify, in a pipeline associated with the processor, at least one pattern of multiple memory access instructions that reference a common base register and do not fully utilize an available bus width, determine that the multiple memory access instructions target adjacent memory or non-contiguous memory that can fit on a single cache line, and replace, within the pipeline associated with the processor, the multiple memory access instructions with one equivalent memory access instruction that utilizes more of the available bus width than either of the replaced memory access instructions.

### Claim 12 (depends on 11)

The apparatus recited in claim 11, wherein the multiple memory access instructions are replaced with the one equivalent memory access instruction in response to the multiple memory access instructions appearing consecutively in the pipeline and targeting the adjacent memory at contiguous offsets.

### Claim 13 (depends on 12)

The apparatus recited in claim 12, wherein the multiple memory access instructions target the adjacent memory at contiguous positive offsets.

### Claim 14 (depends on 12)

The apparatus recited in claim 12, wherein the multiple memory access instructions target the adjacent memory at contiguous negative offsets.

### Claim 15 (depends on 11)

The apparatus recited in claim 11, wherein the multiple memory access instructions utilize different portions of the available bus width.

### Claim 16 (depends on 11)

The apparatus recited in claim 11, wherein the processor is further configured to determine that the multiple memory access instructions target the adjacent memory in response to the multiple memory access instructions including a first memory access instruction that alters a value stored in the common base register and a second memory access that accesses memory at a location adjacent to the altered value stored in the common base register.

### Claim 17 (depends on 11)

The apparatus recited in claim 11, wherein the processor is further configured to determine that the multiple memory access instructions appear non-consecutively in the processor pipeline and to replace the multiple memory access instructions with the one equivalent memory access instruction if no intervening store instructions appear between the non-consecutive memory access instructions.

### Claim 18 (depends on 11)

The apparatus recited in claim 11, wherein the processor is further configured to determine that the multiple memory access instructions appear non-consecutively in the processor pipeline and to replace the multiple memory access instructions with the one equivalent memory access instruction if one or more intervening store instructions appearing between the non-consecutive memory access instructions use the common base register referenced in the multiple memory access instructions and there are no overlapping bytes between the non-consecutive memory access instructions and the one or more intervening store instructions.

### Claim 19 (depends on 11)

The apparatus recited in claim 11, wherein the multiple memory access instructions comprise multiple dynamic instances of the same memory access instruction.

### Claim 20 (depends on 11)

The apparatus recited in claim 11, wherein the multiple memory access instructions comprise multiple load instructions or multiple store instructions.

### Claim 21

An apparatus, comprising:
means for identifying, in a processor pipeline, at least one pattern of multiple memory access instructions that reference a common base register and do not fully utilize an available bus width;
means for determining that the multiple memory access instructions target adjacent memory or non-contiguous memory that can fit on a single cache line; and
means for replacing, within the processor pipeline, the multiple memory access instructions with one equivalent memory access instruction that utilizes more of the available bus width than either of the replaced memory access instructions.

### Claim 22 (depends on 21)

The apparatus recited in claim 21, wherein the multiple memory access instructions are replaced with the one equivalent memory access instruction in response to the multiple memory access instructions appearing consecutively in the processor pipeline and targeting the adjacent memory at contiguous offsets.

### Claim 23 (depends on 22)

The apparatus recited in claim 22, wherein the multiple memory access instructions target the adjacent memory at contiguous positive offsets.

### Claim 24 (depends on 22)

The apparatus recited in claim 22, wherein the multiple memory access instructions target the adjacent memory at contiguous negative offsets.

### Claim 25 (depends on 21)

The apparatus recited in claim 21, wherein the multiple memory access instructions utilize different portions of the available bus width.

### Claim 26 (depends on 21)

The apparatus recited in claim 21, further comprising means for determining that the multiple memory access instructions target the adjacent memory in response to the multiple memory access instructions including a first memory access instruction that alters a value stored in the common base register and a second memory access that accesses memory at a location adjacent to the altered value stored in the common base register.

### Claim 27 (depends on 21)

The apparatus recited in claim 21, further comprising means for determining that the multiple memory access instructions appear non-consecutively in the processor pipeline, wherein the multiple memory access instructions are replaced with the one equivalent memory access instruction if no intervening store instructions appear between the non-consecutive memory access instructions.

### Claim 28 (depends on 21)

The apparatus recited in claim 21, further comprising means for determining that the multiple memory access instructions appear non-consecutively in the processor pipeline, wherein the multiple memory access instructions are replaced with the one equivalent memory access instruction if one or more intervening store instructions appearing between the non-consecutive memory access instructions use the common base register referenced in the multiple memory access instructions and there are no overlapping bytes between the non-consecutive memory access instructions and the one or more intervening store instructions.

### Claim 29 (depends on 21)

The apparatus recited in claim 21, wherein the multiple memory access instructions comprise multiple dynamic instances of the same memory access instruction.

### Claim 30 (depends on 21)

The apparatus recited in claim 21, wherein the multiple memory access instructions comprise multiple load instructions or multiple store instructions.

### Claim 31

A computer-readable medium having computer-executable instructions recorded thereon, the computer-executable instructions configured to cause a processor to:
identify, in a pipeline associated with the processor, at least one pattern of multiple memory access instructions that reference a common base register and do not fully utilize an available bus width;
determine that the multiple memory access instructions target adjacent memory or non-contiguous memory that can fit on a single cache line; and
replace, within the pipeline associated with the processor, the multiple memory access instructions with one equivalent memory access instruction that utilizes more of the available bus width than either of the replaced memory access instructions.

### Claim 32 (depends on 31)

The computer-readable medium recited in claim 31, wherein the multiple memory access instructions are replaced with the one equivalent memory access instruction in response to the multiple memory access instructions appearing consecutively in the pipeline and targeting the adjacent memory at contiguous offsets.

### Claim 33 (depends on 32)

The computer-readable medium recited in claim 32, wherein the multiple memory access instructions target the adjacent memory at contiguous positive offsets.

### Claim 34 (depends on 32)

The computer-readable medium recited in claim 32, wherein the multiple memory access instructions target the adjacent memory at contiguous negative offsets.

### Claim 35 (depends on 31)

The computer-readable medium recited in claim 31, wherein the multiple memory access instructions utilize different portions of the available bus width.

### Claim 36 (depends on 31)

The computer-readable medium recited in claim 31, wherein the computer-executable instructions are further configured to cause the processor to determine that the multiple memory access instructions target the adjacent memory in response to the multiple memory access instructions including a first memory access instruction that alters a value stored in the common base register and a second memory access that accesses memory at a location adjacent to the altered value stored in the common base register.

### Claim 37 (depends on 31)

The computer-readable medium recited in claim 31, wherein the computer-executable instructions are further configured to cause the processor to determine that the multiple memory access instructions appear non-consecutively in the processor pipeline and to replace the multiple memory access instructions with the one equivalent memory access instruction if no intervening store instructions appear between the non-consecutive memory access instructions.

### Claim 38 (depends on 31)

The computer-readable medium recited in claim 31, wherein the computer-executable instructions are further configured to cause the processor to determine that the multiple memory access instructions appear non-consecutively in the processor pipeline and to replace the multiple memory access instructions with the one equivalent memory access instruction if one or more intervening store instructions appearing between the non-consecutive memory access instructions use the common base register referenced in the multiple memory access instructions and there are no overlapping bytes between the non-consecutive memory access instructions and the one or more intervening store instructions.

### Claim 39 (depends on 31)

The computer-readable medium recited in claim 31, wherein the multiple memory access instructions comprise multiple dynamic instances of the same memory access instruction.

### Claim 40 (depends on 31)

The computer-readable medium recited in claim 31, wherein the multiple memory access instructions comprise multiple load instructions or multiple store instructions.
