This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Allow scalars for asm constraint "v" with VSX
ClosedPublic

Authored by nemanjai on Nov 10 2021, 5:48 PM.

Details

Summary

Similarly to what GCC does, we should allow scalars with the "v" constraint rather than introducing unnecessary new constraints for scalars in Altivec registers.

Diff Detail

Event Timeline

nemanjai created this revision.Nov 10 2021, 5:48 PM
nemanjai requested review of this revision.Nov 10 2021, 5:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 10 2021, 5:48 PM
saghir accepted this revision.Nov 17 2021, 9:42 AM
saghir added a subscriber: saghir.

LGTM.

This revision is now accepted and ready to land.Nov 17 2021, 9:42 AM
amyk added a subscriber: amyk.Nov 23 2021, 6:01 AM

I just had a couple minor comments.

llvm/lib/Target/PowerPC/PPCISelLowering.cpp
17696

Is it possible to add a comment to detail what exactly is going on here for future reference?

llvm/test/CodeGen/PowerPC/scalars-in-altivec-regs.ll
2

I think -ppc-asm-full-reg-names works with the AIX triple now. It would be good to add this option prior to committing.

This revision was landed with ongoing or failed builds.Nov 23 2021, 3:03 PM
This revision was automatically updated to reflect the committed changes.