This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine][SSE] Add support for PACKSS/PACKUS constant folding
ClosedPublic

Authored by RKSimon on Jan 20 2017, 5:57 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Jan 20 2017, 5:57 AM
craig.topper added inline comments.Jan 20 2017, 8:27 PM
lib/Transforms/InstCombine/InstCombineCalls.cpp
532

SrcScalarSizeInBits is unused in release builds.

539

Can you reverse this if as an early out?

RKSimon added inline comments.Jan 22 2017, 6:20 AM
lib/Transforms/InstCombine/InstCombineCalls.cpp
539

Sure - I was hoping to extend this at some point to support non-constant cases where saturation won't happen (and can be safely converted to a shuffle + truncate) but that can wait for now.

RKSimon updated this revision to Diff 85391.Jan 23 2017, 7:47 AM

Updated based on Craig's feedback.

This revision is now accepted and ready to land.Jan 24 2017, 10:00 PM
This revision was automatically updated to reflect the committed changes.