https://bugs.llvm.org/show_bug.cgi?id=50817
Bug ID: 50817
Summary: Failure to perform extract with variable index from
splat vector
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
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?
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs