This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Add vec_vsx_ld and vec_vsx_st intrinsics
ClosedPublic

Authored by wschmidt on Nov 5 2014, 2:34 PM.

Details

Summary

This patch enables the vec_vsx_ld and vec_vsx_st intrinsics for PowerPC, which provide programmer access to the lxvd2x, lxvw4x, stxvd2x, and stxvw4x instructions.

New code in altivec.h defines these in terms of new builtins, which are themselves defined in BuiltinsPPC.def. The builtins are converted to LLVM intrinsics in CGBuiltin.cpp. Additional code is added to builtins-ppc-vsx.c to verify the correct generation of the intrinsics.

Note that I moved the other VSX builtins so all VSX builtins will be alphabetical in their own section in BuiltinsPPC.def.

There is a companion patch for LLVM, to be reviewed separately.

Diff Detail

Event Timeline

wschmidt updated this revision to Diff 15831.Nov 5 2014, 2:34 PM
wschmidt retitled this revision from to [PowerPC] Add vec_vsx_ld and vec_vsx_st intrinsics.
wschmidt updated this object.
wschmidt edited the test plan for this revision. (Show Details)
wschmidt added reviewers: hfinkel, seurer, willschm.
wschmidt added a subscriber: Unknown Object (MLST).
wschmidt added a subscriber: Unknown Object (MLST).

Adding cfe-commits as a subscriber. I mistakenly put llvm-commits on this one the first time...

hfinkel accepted this revision.Nov 11 2014, 12:21 AM
hfinkel edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Nov 11 2014, 12:21 AM
wschmidt closed this revision.Nov 11 2014, 8:12 PM

r221768, thanks!