# US 2021/0279061 A1 · Collapsing of multiple nested loops, methods, and instructions

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

- Number: US 2021/0279061 A1
- Document ID: US20210279061A1
- Status: Published application
- Kind: A1
- Application number: 17/323,409
- Filed: 2021-05-18
- Published: 2021-09-09
- Earliest claimed: 2012-12-27
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: MIKHAIL PLOTNIKOV; ANDREY NARAIKIN; ELMOUSTAPHA OULD-AHMED-VALL
- Web page: https://patentgrep.com/patent/US20210279061A1

## CPC

- G06F 9/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 9/30021: {Compare instructions, e.g. Greater-Than, Equal-To, MINMAX}
- G06F 9/30036: {Instructions to perform operations on packed data, e.g. vector, tile or matrix operations}
- G06F 9/30038: {using a mask}
- G06F 9/30065: {Loop control instructions; iterative instructions, e.g. LOOP, REPEAT}
- G06F 9/3016: {Decoding the operand specifier, e.g. specifier format}
- G06F 9/325: {for loops, e.g. loop detection or loop counter}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In an embodiment, the present invention is directed to a processor including a decode logic to receive a multi-dimensional loop counter update instruction and to decode the multi-dimensional loop counter update instruction into at least one decoded instruction, and an execution logic to execute the at least one decoded instruction to update at least one loop counter value of a first operand associated with the multi-dimensional loop counter update instruction by a first amount. Methods to collapse loops using such instructions are also disclosed. Other embodiments are described and claimed.

## Claims

### Claim 1

A system comprising:
a system memory to store instructions and data; and
a processor coupled to the system memory comprising:
a decoder to decode instructions, including loop control instructions;
execution circuitry to execute one or more of the loop control instructions to implement a nested instruction loop comprising an outer loop of instructions and an inner loop of instructions nested within the outer loop of instructions, wherein the outer loop of instructions is to be repeated a first number of times and the inner loop of instructions to be repeated a second number of times,
a plurality of registers to store loop control values to be used by the execution circuitry to control the nested instruction loop, the loop control values comprising:
a first loop counter value for the inner loop, and
a second loop counter value for the outer loop;
wherein, responsive to the one or more loop control instructions, the execution circuitry to implement the inner loop and the outer loop, based on the first loop counter value and the second loop counter value, respectively;
wherein upon each iteration of the inner loop the execution circuitry is to decrement the first loop counter value and wherein upon each iteration of the outer loop the execution circuitry is to decrement the outer loop counter value; and
wherein a current iteration of the inner loop or outer loop is to end when the first loop counter value or second loop counter value, respectively, reaches a minimum value.
