This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Use temporary stack in expanding SPLAT_VECTOR_SPLIT_I64_VL node
ClosedPublic

Authored by Yunzezhu on Jun 26 2023, 12:51 AM.

Details

Summary

There is issue: https://github.com/llvm/llvm-project/issues/63515
This issue is because when expanding SPLAT_VECTOR_SPLIT_I64_VL node, only memoperand is used to create dependency. However in ScheduleDAGNodes, dependency is checked with chain only, and breaks order of store/load instructions.
I think in llvm.bitreverse.nxv2i64 intrinsic SPLAT_VECTOR_SPLIT_I64_VL nodes are parallel processed, so no chain should be add to these nodes.
Using temporary in expanding SPLAT_VECTOR_SPLIT_I64_VL node can keep vlse instruction get correct value no matter order of store instructions is changed.

Diff Detail

Event Timeline

Yunzezhu created this revision.Jun 26 2023, 12:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 26 2023, 12:51 AM
Yunzezhu requested review of this revision.Jun 26 2023, 12:51 AM

Does mean scalar FP code we copied the frame index from also has this bug?

Yunzezhu updated this revision to Diff 534498.Jun 26 2023, 4:28 AM

Updated some affected test cases.

Does mean scalar FP code we copied the frame index from also has this bug?

I think no. These code comes from emitSplitF64Pseudo/emitBuildPairF64Pseudo, and pseudo instructions expand after ScheduleDAGNodes so memoperand could covers all later schedule parts.

This revision is now accepted and ready to land.Jun 26 2023, 3:57 PM