[llvm-bugs] [Bug 51427] New: Missed loop vectorization (fmul src[idx[i]], constant)
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Aug 10 05:46:46 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51427
Bug ID: 51427
Summary: Missed loop vectorization (fmul src[idx[i]], constant)
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Loop Optimizer
Assignee: unassignedbugs at nondot.org
Reporter: david.bolvansky at gmail.com
CC: llvm-bugs at lists.llvm.org
#include <stdint.h>
void mulPi(double * const __restrict__ dst,
double const * const __restrict__ src,
uint32_t const * const __restrict__ idx,
uint32_t const begin,
uint32_t const end)
{
for (uint32_t i = begin; i < end; ++i)
dst[i] = 3.141 * src[idx[i]];
}
GCC and ICC vectorizes this code just fine.
LLVM:
remark: the cost-model indicates that vectorization is not beneficial
[-Rpass-missed=loop-vectorize]
remark: the cost-model indicates that interleaving is not beneficial
[-Rpass-missed=loop-vectorize]
https://godbolt.org/z/4j44KKT3c
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210810/ad6e637d/attachment.html>
More information about the llvm-bugs
mailing list