https://bugs.llvm.org/show_bug.cgi?id=42865
Bug ID: 42865
Summary: Missed 'compress' codegen opportunity
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedb...@nondot.org
Reporter: david.bolvan...@gmail.com
CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
llvm-...@redking.me.uk, spatel+l...@rotateright.com
int floatcompress(float* __restrict__ in, float* __restrict__ out, int N,
float T) {
int n = 0;
for (int i = 0; i < N; ++i) {
if (in[i] > T) out[n++] = in[i];
}
return n;
}
int intcompress(int* __restrict__ in, int* __restrict__ out, int N,
int T) {
int n = 0;
for (int i = 0; i < N; ++i) {
if (in[i] > T) out[n++] = in[i];
}
return n;
}
-Ofast -march=icelake-server
ICC uses 'vcompressps' / 'vpcompressd', Clang's codegen should be improved to
use them too..
Current codegen: https://godbolt.org/z/eS733l
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs