This is an archive of the discontinued LLVM Phabricator instance.

[Clang][RISCV] Update operand order for vmerge and vcompress
ClosedPublic

Authored by eopXD on Dec 27 2022, 1:13 AM.

Details

Summary

From:

vint32m1_t vmerge_vvm_i32m1 (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl);
vint32m1_t vcompress_vm_i32m1 (vbool32_t mask, vint32m1_t src, size_t vl);

To:

vint32m1_t vmerge_vvm_i32m1 (vint32m1_t op1, vint32m1_t op2, vbool32_t selector, size_t vl);
vint32m1_t vcompress_vm_i32m1 (vint32m1_t src, vbool32_t selector, size_t vl);

Address issues:
riscv-non-isa/rvv-intrinsic-doc#140
riscv-non-isa/rvv-intrinsic-doc#167

Pull request:
riscv-non-isa/rvv-intrinsic-doc#185

Diff Detail

Event Timeline

eopXD created this revision.Dec 27 2022, 1:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 27 2022, 1:13 AM
eopXD requested review of this revision.Dec 27 2022, 1:13 AM
eopXD retitled this revision from [Clang][RISCV] Update operand order for vmerge and vcompress to [WIP][Clang][RISCV] Update operand order for vmerge and vcompress.Dec 27 2022, 1:14 AM
eopXD added a comment.Dec 27 2022, 1:16 AM

This patch is not ready yet since currently we don't have a pull request under rvv-intrinsic-doc to match to this. The pull request will be created in the near future.

clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vcompress.c
514 ↗(On Diff #485359)

The change from poison to undef is due to value filled in back in the default under RISCVVEmitter.cpp. I will have another patch amend this and rebase this patch upon the fix.

eopXD edited the summary of this revision. (Show Details)Dec 27 2022, 1:17 AM
eopXD edited the summary of this revision. (Show Details)
eopXD updated this revision to Diff 485363.Dec 27 2022, 2:33 AM

Update code, recovered ManualCodeGen for vcompress and vmerge.
Deleted the std::rotate since it is not needed now due to the operand order change.

clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vcompress.c
514 ↗(On Diff #485359)

Turns out I should fix the ManaulCodeGen. Fixed in latest update.

eopXD updated this revision to Diff 485961.Jan 3 2023, 5:01 AM

Update test cases for vfmerge.

eopXD updated this revision to Diff 487194.Jan 8 2023, 8:28 AM

Rebase upon D141198.

eopXD updated this revision to Diff 488093.Jan 11 2023, 12:24 AM

Rebase on top of landing of D141198.

eopXD retitled this revision from [WIP][Clang][RISCV] Update operand order for vmerge and vcompress to [Clang][RISCV] Update operand order for vmerge and vcompress.Jan 11 2023, 12:25 AM
eopXD edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jan 12 2023, 11:20 AM