This is an archive of the discontinued LLVM Phabricator instance.

[X86] Improve x86-partial-reduction to support abs intrinsic
ClosedPublic

Authored by wxiao3 on Mar 30 2022, 7:01 PM.

Details

Summary

Current implementation only recognizes absolute operation implemented by
select instruction. This patch adds support for abs intrinsic.

Diff Detail

Event Timeline

wxiao3 created this revision.Mar 30 2022, 7:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2022, 7:01 PM
wxiao3 requested review of this revision.Mar 30 2022, 7:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2022, 7:01 PM
LuoYuanke accepted this revision.Mar 31 2022, 9:08 PM

LGTM, pls wait for 1 or 2 days to land in case Craig or Phoebe have some comments.

This revision is now accepted and ready to land.Mar 31 2022, 9:08 PM
craig.topper added inline comments.Mar 31 2022, 10:08 PM
llvm/lib/Target/X86/X86PartialReduction.cpp
224–225

Sink RHS into the else so it doens't get accidentally used.

225–239
llvm/test/CodeGen/X86/sad.ll
1133

This part about SelectionDAGBuilder I think refers to the how we handled these cases before X86PartialReduction.cpp was added.

wxiao3 updated this revision to Diff 419700.Apr 1 2022, 3:29 AM

Address comments from Craig.

wxiao3 marked 2 inline comments as done.Apr 1 2022, 3:31 AM
This revision was landed with ongoing or failed builds.Apr 4 2022, 8:33 PM
This revision was automatically updated to reflect the committed changes.