This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Create new instructions in SIInstrInfo::moveToVALU
ClosedPublic

Authored by foad on Nov 3 2022, 3:47 AM.

Details

Summary

Create new VALU instructions in moveToVALU instead of mutating the
existing SALU instruction. This makes it easier to add extra operands so
we can convert to the VOP3 form of VALU instructions.

NFCI but it does have the minor side effect of removing duplicate
implicit operands that were present on the original SALU if they are
default implicit operands for the VALU.

Diff Detail

Event Timeline

foad created this revision.Nov 3 2022, 3:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 3 2022, 3:47 AM
foad requested review of this revision.Nov 3 2022, 3:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 3 2022, 3:47 AM

This part of the commit message is worded confusingly for me.

"NFCI but it does have the minor side effect of not duplicating implicit
operands that are default for the VALU but were also present on the
original SALU."

I would probably change it to something like

NFCI but it does have the minor side effect of removing duplicate implicit
operands that were present on the
original SALU if they are default implicit operands for the VALU.

foad edited the summary of this revision. (Show Details)Nov 3 2022, 8:37 AM

This part of the commit message is worded confusingly for me.

"NFCI but it does have the minor side effect of not duplicating implicit
operands that are default for the VALU but were also present on the
original SALU."

I would probably change it to something like

NFCI but it does have the minor side effect of removing duplicate implicit
operands that were present on the
original SALU if they are default implicit operands for the VALU.

Done, thanks.

This revision is now accepted and ready to land.Nov 3 2022, 11:11 AM
This revision was automatically updated to reflect the committed changes.