This is an archive of the discontinued LLVM Phabricator instance.

[MVE] Fixup order of gather writeback intrinsic outputs.
ClosedPublic

Authored by dmgreen on Jan 24 2020, 9:33 AM.

Details

Summary

The MVE_VLDRWU32_qi_pre, like the other _pre/_post mve loads returns the writeback as result 0, the value as result 1. The llvm ir intrinsic seems to have this the other way around though, and so when lowering from one to the other we need to switch the first two outputs.

I've also fixed up the types of _pre/_post on normal MVE loads. There we were already getting the values the right way around, just not for the types. I don't believe this was causing anything to go wrong, it was just very confusing to read in the debug output.

Diff Detail

Event Timeline

dmgreen created this revision.Jan 24 2020, 9:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 24 2020, 9:33 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
simon_tatham added inline comments.Jan 27 2020, 2:43 AM
llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
2525

This line looks redundant?

dmgreen marked an inline comment as done.Jan 27 2020, 4:13 AM
dmgreen added inline comments.
llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
2525

The ReplaceUses? It's attempting to replace the chain operand of N with New. We have to create a new node now (I think), as opposed to morphing the existing value, so need to transfer over the chain too.

simon_tatham accepted this revision.Jan 27 2020, 4:33 AM
simon_tatham marked an inline comment as done.
simon_tatham added inline comments.
llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
2525

Oh yes. Blame Monday morning. I somehow misread it as the common idiom of updating a node in place.

This revision is now accepted and ready to land.Jan 27 2020, 4:33 AM
This revision was automatically updated to reflect the committed changes.