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
auto adjust_splat(float x, float y, int i) {
__m128 r = _mm_set1_ps(x);
r[i & 3] += y;
return r;
}
auto adjust_splat2(float x, float y, int i) {
__m128 r = _mm_set1_ps(x);
r[i & 3] = x + y;
return r;
}
If the variable-index of an extract from a splatted vector is known to be inrange, we should be safe to use the original scalar directly.
Not sure if this can be done in IR or we wait until SelectionDAG?
The text was updated successfully, but these errors were encountered:
Extended Description
https://c.godbolt.org/z/rq43Wqc5a
#include <x86intrin.h>
auto adjust_splat(float x, float y, int i) {
__m128 r = _mm_set1_ps(x);
r[i & 3] += y;
return r;
}
auto adjust_splat2(float x, float y, int i) {
__m128 r = _mm_set1_ps(x);
r[i & 3] = x + y;
return r;
}
If the variable-index of an extract from a splatted vector is known to be inrange, we should be safe to use the original scalar directly.
Not sure if this can be done in IR or we wait until SelectionDAG?
The text was updated successfully, but these errors were encountered: