You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running opt -S -slp-vectorizer $TEST_FILE, the function gets SLP-vectorized; Running opt -S -reassociate -slp-vectorizer $TEST_FILE, the function doesn't get SLP-vectorized.
This is because the reassociation pass re-associates instructions like acc = add ith_element, acc to acc = add acc, ith_element, but didn't re-assocate the first instruction acc = add first_element, second_element to acc = add second_element, first_element.
However, as add is associative, a smarter SLP vectorizer could have ignored the associations and vectorize the unordered adds anyway.
I'm not sure where to put the fix on.
The text was updated successfully, but these errors were encountered:
but didn't
re-assocate the first instruction acc = add first_element, second_element
to acc = add second_element, first_element.
It should be phrased the other way around: but didn't re-assocate the first instruction acc = add second_elemnet, first_element to acc = add first_element, second_element.
As a result, the add sequence is v[1] + v[0] + v[2] + ... + v[31], which doesn't get vectorized.
Extended Description
Running
opt -S -slp-vectorizer $TEST_FILE
, the function gets SLP-vectorized; Runningopt -S -reassociate -slp-vectorizer $TEST_FILE
, the function doesn't get SLP-vectorized.This is because the reassociation pass re-associates instructions like
acc = add ith_element, acc
toacc = add acc, ith_element
, but didn't re-assocate the first instructionacc = add first_element, second_element
toacc = add second_element, first_element
.However, as add is associative, a smarter SLP vectorizer could have ignored the associations and vectorize the unordered adds anyway.
I'm not sure where to put the fix on.
The text was updated successfully, but these errors were encountered: