This is an archive of the discontinued LLVM Phabricator instance.

[flang] Add PowerPC vec_splat, vec_splats and vec_splat_s32 intrinsic
ClosedPublic

Authored by kkwli0 on Aug 11 2023, 8:32 AM.

Details

Summary

This patch adds PowerPC vec_splat, vec_splats and vec_splat_s32 intrinsic. It includes semantic check for the arguments of vec_splat and vec_splat_s32.

Co-authored-by: @pscoro

Diff Detail

Event Timeline

kkwli0 created this revision.Aug 11 2023, 8:32 AM
kkwli0 requested review of this revision.Aug 11 2023, 8:32 AM
DanielCChen added inline comments.Aug 14 2023, 6:53 AM
flang/lib/Optimizer/Builder/PPCIntrinsicCall.cpp
1668

llvm_unreachable?

kkwli0 updated this revision to Diff 549931.Aug 14 2023, 7:47 AM
kkwli0 marked an inline comment as done.

Address review comments

flang/lib/Optimizer/Builder/PPCIntrinsicCall.cpp
1668

Will change it to call llvm_unreachable.

This revision is now accepted and ready to land.Aug 14 2023, 8:53 AM
pscoro accepted this revision.Aug 14 2023, 9:03 AM
pscoro added inline comments.
flang/test/Semantics/PowerPC/ppc-vector-intrinsics.f90
21

Nit: Inconsistent spacing ! Error -> !Error, also not related to the splat intrinsics but maybe its trivial enough to not matter.

Otherwise LGTM, apologies for not being an active reviewer on other recent patches relevant to me.

pscoro added inline comments.Aug 14 2023, 9:19 AM
flang/test/Semantics/PowerPC/ppc-vector-intrinsics.f90
21

Edit: just realized that CheckArgumentIsConstantExprInRange is modified in the patch so this is ok, ignore my nit