This is an archive of the discontinued LLVM Phabricator instance.

Activate Altivec "vector bool long long" for Power
ClosedPublic

Authored by seurer on Jan 28 2015, 1:18 PM.

Details

Summary

This change activates "vector bool long long" (and alternate spellings) as a valid type for Altivec support for Power.

There are two test case updates for very basic testing. While I was editing cxx-altivec.cpp I also updated it to better match some other changes in altivec.c.

Note: "vector bool long" was not also added because its use is considered deprecated.

Diff Detail

Event Timeline

seurer updated this revision to Diff 18914.Jan 28 2015, 1:18 PM
seurer retitled this revision from to Activate Altivec "vector bool long long" for Power.
seurer updated this object.
seurer edited the test plan for this revision. (Show Details)
seurer added reviewers: hfinkel, wschmidt, kbarton, echristo.
seurer added a subscriber: Unknown Object (MLST).
hfinkel edited edge metadata.Jan 28 2015, 3:53 PM

vector bool long long requires VSX, right? If so, we need to check for vsx support for it, and update the tests as appropriate.

/home/seurer/llvm/llvm-checkin/tools/clang/lib/Sema/DeclSpec.cpp
1000 ↗(On Diff #18914)

Note: We have some vsx-predicated type checking here.

wschmidt edited edge metadata.Jan 29 2015, 5:12 AM

Agreed, please look at what was done for vector double in the code and the tests for examples.

I did not know about the VSX requirement and will update things accordingly.

Is there a list of stuff like that somewhere? I searched but did not find anything.

Actually, hm. POWER8 adds some instructions (like vpopcntd) that operate on v2i64 in the VMX registers. So really this will be somewhat dependent on Kit's current patch that enables that. All forms of vector long long should be enabled for VSX, as well as for Altivec + POWER8 (the Power8Altivec feature that Kit proposes).

kbarton edited edge metadata.Jan 29 2015, 3:25 PM

Yes, P8 added doubleword variations for several of the VMX instructions. My fix enables the v2i64 type for the VMX registers, which will be a prereq for these new variations. When talking with Bill, these should NOT be coupled with VSX, so we need to add the v2i64 type to the VRRC in addition to it being in the VSRC.

seurer updated this revision to Diff 21101.Mar 3 2015, 6:28 AM
seurer edited edge metadata.

I added the check for VSX support being enabled and adjusted the test cases accordingly.

wschmidt accepted this revision.Mar 3 2015, 6:59 AM
wschmidt edited edge metadata.

LGTM. Thanks, Bill!

This revision is now accepted and ready to land.Mar 3 2015, 6:59 AM
seurer closed this revision.Mar 3 2015, 12:11 PM

Committed revision 231118