This is an archive of the discontinued LLVM Phabricator instance.

[LegalizeVectorTypes] Create correct memoperands in SplitVecRes_INSERT_SUBVECTOR.
ClosedPublic

Authored by craig.topper on May 16 2020, 12:22 AM.

Details

Summary

Previously this code just used a default constructed
MachinePointerInfo. But we know the accesses are to a fixed stack
object or at least somewhere on the stack.

I don't think this function is currently exercised in tree so I
don't know how to test it. I just noticed it when I removed
non-constant index support in this function.

Diff Detail

Event Timeline

craig.topper created this revision.May 16 2020, 12:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 16 2020, 12:22 AM
Herald added a subscriber: hiraditya. · View Herald Transcript

getUnknownStack() doesn't actually do anything at the moment except set the correct address-space. But I guess that's still an improvement.

llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
1165

While you're here, please pass the alignment consistently to all the load/store operations where it applies.

Pass Alignment to all the loads and stores

efriedma added inline comments.May 19 2020, 8:29 PM
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
1170

Not sure the alignment of the subvector store is right?

craig.topper marked an inline comment as done.May 19 2020, 9:04 PM
craig.topper added inline comments.
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
1170

Oops. You're right. I got carried away.

-Remove Alignment from the subvector store.
-Add alignment to the very similar code in SplitVecRes_INSERT_VECTOR_ELT

This revision is now accepted and ready to land.May 20 2020, 2:18 PM
This revision was automatically updated to reflect the committed changes.