This is an archive of the discontinued LLVM Phabricator instance.

[X86] Convert fadd/fmul _mm_reduce_* intrinsics to emit llvm.reduction intrinsics (PR47506)
ClosedPublic

Authored by RKSimon on Dec 9 2020, 7:25 AM.

Details

Summary

Followup to D87604, having confirmed on PR47506 that we can use the llvm codegen expansion for fadd/fmul as well.

Diff Detail

Event Timeline

RKSimon requested review of this revision.Dec 9 2020, 7:25 AM
RKSimon created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 9 2020, 7:25 AM
pengfei accepted this revision.Dec 11 2020, 7:00 AM

LGTM. Thanks for bringing this refactor.
I also verified that ICC and GCC both do reduce math in an binary tree way, though sometimes ICC has a different LSB from GCC and Clang.

clang/lib/Headers/avx512fintrin.h
9559

Better to change min and max as well.

This revision is now accepted and ready to land.Dec 11 2020, 7:00 AM
RKSimon added inline comments.Dec 13 2020, 7:19 AM
clang/lib/Headers/avx512fintrin.h
9559

OK - I'll do that as a followup immediately after this patch - thanks!

This revision was landed with ongoing or failed builds.Dec 13 2020, 7:39 AM
This revision was automatically updated to reflect the committed changes.