This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Legalize saturating vector add/sub
ClosedPublic

Authored by nemanjai on Dec 27 2019, 9:34 AM.

Details

Reviewers
hfinkel
lkail
Group Reviewers
Restricted Project
Commits
rG9c64f04df8ec: [PowerPC] Legalize saturating vector add/sub
Summary

These intrinsics and the corresponding ISD nodes were recently added. PPC has instructions that do this for vectors. Legalize them and add patterns to emit the satuarting instructions.

Diff Detail

Event Timeline

nemanjai created this revision.Dec 27 2019, 9:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 27 2019, 9:34 AM
lkail accepted this revision.Dec 29 2019, 6:27 PM
lkail added a subscriber: lkail.

LGTM with one nit.

llvm/lib/Target/PowerPC/PPCInstrAltivec.td
871

Add // Saturates. before this line to separate following instructions from other classes of instructions?

This revision is now accepted and ready to land.Dec 29 2019, 6:27 PM
nemanjai marked an inline comment as done.Dec 30 2019, 6:12 AM
nemanjai added inline comments.
llvm/lib/Target/PowerPC/PPCInstrAltivec.td
871

Sounds good.

nemanjai updated this revision to Diff 235594.Dec 30 2019, 6:21 AM

Add a comment for the patterns.

This revision was automatically updated to reflect the committed changes.