This is an archive of the discontinued LLVM Phabricator instance.

[X86][AVX512] Add combining support for X86ISD::VTRUNCS
ClosedPublic

Authored by RKSimon on Jan 25 2018, 8:37 AM.

Details

Summary

Similar to the existing support for X86ISD::VTRUNCUS.

This need to be done before I can add support for PACKSS/PACKUS saturated truncation handling.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Jan 25 2018, 8:37 AM
craig.topper added inline comments.Jan 25 2018, 10:04 AM
lib/Target/X86/X86ISelLowering.cpp
34336 ↗(On Diff #131463)

Can C == Limit be folded into the 'if' and just return V.getOperand(0). The not taken path of the if will take care of returning SDValue()

34366 ↗(On Diff #131463)

Should this be a const SDLoc& That's what most places use though there are a few non-const.

RKSimon updated this revision to Diff 131582.Jan 26 2018, 6:29 AM

Updated based on Craig's feedback

craig.topper accepted this revision.Jan 26 2018, 11:09 AM

LGTM after removing those unneded lambda captures.

lib/Target/X86/X86ISelLowering.cpp
34220 ↗(On Diff #131582)

The lambda captures here look to be unused.

This revision is now accepted and ready to land.Jan 26 2018, 11:09 AM
This revision was automatically updated to reflect the committed changes.