> On Feb 4, 2019, at 04:47, via cfe-users <cfe-users@lists.llvm.org> wrote: > > Hi @all, > > can anyone tell me, what is wrong with the following loop in Fill: > > https://godbolt.org/z/hyZ2HO > > Vectorization works for float, double and std::complex<float>, but it fails > for std::complex<double>. > The remark "read with atomic ordering or volatile read" hints for something, > but neither do I know > exactly what, nor do I know how I can resolve the issue.
Just a guess, but sizeof(std::complex<double>) == 16 on x86-64, so maybe something in the vectorization analysis decides (a) you can’t read a 16-byte value atomically with a SIMD instruction and (b) the source and destination may alias each other. This is sort of nonsensical because (b) is false and (a) shouldn’t factor into this decision. Maybe someone with more knowledge of the vectorizer can chime in. _______________________________________________ cfe-users mailing list cfe-users@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users