This is an archive of the discontinued LLVM Phabricator instance.

[X86][AVX512][Clang][Intrinsics][reduce] Adding missing reduce (Operators: +,*,&&,||) intrinsics to Clang .
ClosedPublic

Authored by m_zuckerman on Oct 12 2016, 11:33 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

m_zuckerman retitled this revision from to [X86][AVX512][Clang][Intrinsics][reduce] Adding missing reduce (Operators: +,*,&&,||) intrinsics to Clang . .
m_zuckerman updated this object.
m_zuckerman added reviewers: igorb, aymanmus.
igorb added inline comments.Oct 13 2016, 1:58 AM
lib/Headers/avx512fintrin.h
9677 ↗(On Diff #74408)

Please refactor the macro and change to _mm512_reduce_operator_64bit

9733 ↗(On Diff #74408)

you can use _mm512_reduce_operator_double macro here.

9783 ↗(On Diff #74408)

please change to _mm512_reduce_operator_32bit nad use it to implement masked version

m_zuckerman added a reviewer: craig.topper.
m_zuckerman marked 3 inline comments as done.
craig.topper added inline comments.Oct 15 2016, 11:18 PM
lib/Headers/avx512fintrin.h
9896 ↗(On Diff #74563)

Intel docs show the argument order being reverse of this. mask16 then m512.

craig.topper added inline comments.Oct 15 2016, 11:22 PM
lib/Headers/avx512fintrin.h
9895 ↗(On Diff #74563)

Shouldn't this return float not int?

m_zuckerman marked 2 inline comments as done.

ping

lib/Headers/avx512fintrin.h
9895 ↗(On Diff #74563)

You are right, this should return float.

craig.topper added inline comments.Oct 20 2016, 6:46 PM
lib/Headers/avx512fintrin.h
9705 ↗(On Diff #75302)

Should this be "long long"? I think's that what we use for 64-bit everywhere else in the intrinsic headers. Sorry I didn't notice the first time.

9805 ↗(On Diff #75302)

I wonder if "0, 1, -1, -1" would be better here.

9810 ↗(On Diff #75302)

I wonder if "2, 3, -1, -1" would be better here.

9814 ↗(On Diff #75302)

I wonder if "0, -1, -1, -1" would be better here.

9819 ↗(On Diff #75302)

I wonder if "1, -1, -1, -1" would be better here.

m_zuckerman marked 5 inline comments as done.
m_zuckerman added inline comments.Oct 23 2016, 3:09 AM
lib/Headers/avx512fintrin.h
9805 ↗(On Diff #75302)

its better!!!

craig.topper accepted this revision.Oct 23 2016, 10:29 AM
craig.topper edited edge metadata.

LGTM

This revision is now accepted and ready to land.Oct 23 2016, 10:29 AM
This revision was automatically updated to reflect the committed changes.