Intel Should Implement Conditional SIMD

Auto-vectorizer can be a great help in vectorizing simple instructions with SIMD instruction calls.

int a[COUNT];
int b[COUNT];
int c[COUNT];

for(int i=0; i<COUNT; ++i)
{
    a[i] = b[i] + c[i];
}

But a simple conditional check is enough to break the auto-vectorizer.

for(int i=0; i<COUNT; ++i)
{
    // a conditional check breaks the auto-vectorizer
    if(b[i] > X && b[i] < Y)
        a[i] = b[i] + c[i];
}

I hereby propose to Intel to add a new set of conditional SIMD whereby all SIMD instructions to accept an additional operand of a vector of booleans. Only when the boolean is true, then the instruction proceeds with the operations. Whereas the original SIMD instruction set will be retained, in order not to break all existing applications but their calls will automatically be redirected to conditional SIMD with a vector of booleans implicitly all set to true. This is to save the silicon estate on the chip.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close