This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add additional operations that masked instructions can combine with
ClosedPublic

Authored by goldstein.w.n on Feb 12 2023, 2:16 PM.

Details

Summary

Added: OR, SMAX, SMIN, UMAX, UMIN, ABS, SHL, SRL, SRA, MUL

Intentionally not generically using TLI.isBinOp as that causes
regressions as there are many binops that cannot combine with masked
instructions.

Diff Detail

Event Timeline

goldstein.w.n created this revision.Feb 12 2023, 2:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 12 2023, 2:16 PM
goldstein.w.n requested review of this revision.Feb 12 2023, 2:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 12 2023, 2:16 PM
RKSimon added inline comments.Feb 15 2023, 1:52 AM
llvm/lib/Target/X86/X86ISelLowering.cpp
19862

I can see test changes for some of the integer min/max opcodes but nothing else - could you add additional test coverage first?

Rebase with tests

Thanks - do you have ISD::SETCC coverage? That one I'm the most worried given it has different src/dst types

Thanks - do you have ISD::SETCC coverage? That one I'm the most worried given it has different src/dst types

Dropped SETCC for now.

goldstein.w.n edited the summary of this revision. (Show Details)Feb 16 2023, 10:32 AM

Drop SETCC (correct patch this time)

RKSimon accepted this revision.Feb 17 2023, 2:39 AM

LGTM

This revision is now accepted and ready to land.Feb 17 2023, 2:39 AM
This revision was landed with ongoing or failed builds.Feb 26 2023, 10:12 AM
This revision was automatically updated to reflect the committed changes.