This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Implement Move to VSR Mask builtins in LLVM/Clang
ClosedPublic

Authored by amyk on Jun 28 2020, 12:32 PM.

Details

Summary

This patch implements the vec_gen[b|h|w|d|q]m function prototypes in altivec.h in order
to utilize the move to VSR with mask instructions introduced in Power10.

Depends on D82675.

Diff Detail

Event Timeline

amyk created this revision.Jun 28 2020, 12:32 PM
amyk added a comment.Jul 27 2020, 3:57 PM

I will need to update this patch to remove the instruction definition and MC tests.

amyk retitled this revision from [PowerPC][Power10] Implement Move to VSR Mask builtins in LLVM/Clang to [PowerPC] Implement Move to VSR Mask builtins in LLVM/Clang.Jul 27 2020, 3:58 PM
amyk edited the summary of this revision. (Show Details)
amyk edited the summary of this revision. (Show Details)
amyk updated this revision to Diff 283113.Aug 4 2020, 8:02 PM

Rebased patch, and removed MC tests from the original patch.

steven.zhang added inline comments.
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
10332

Can we handle this inside the .td ? i.e. change the definition of the instr as:

def MTVSRBMI : DXForm<4, 10, (outs vrrc:$vD), (ins u8imm64:$D),
                      "mtvsrbmi $vD, $D", IIC_VecGeneral,
                      [(set v16i8:$vD,
                            (int_ppc_altivec_mtvsrbm imm:$D))]>;

And add the missing u8imm64 as what we did for u16imm64 ?

amyk added inline comments.Sep 17 2020, 3:05 PM
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
10332

I actually made a mistake when I was implementing this patch. The immediate should fit within 16-bits and not 8-bits. Sorry about that. I will update the patch to remove this handling as it is unnecessary and not correct.

amyk updated this revision to Diff 292634.Sep 17 2020, 3:08 PM
  • Rebased patch.
  • Update patch to remove unnecessary immediate handling.
This revision is now accepted and ready to land.Sep 17 2020, 4:27 PM
This revision was landed with ongoing or failed builds.Sep 18 2020, 4:16 PM
This revision was automatically updated to reflect the committed changes.