-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[RISCV][VLOPT] Add strided, unit strided, and indexed loads to isSupported #121705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
3ae4b43
c90d5b8
3d05abd
bd1fcfe
6cfaaf8
a477435
7039289
bdcb9ee
74d84d6
fc079b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -257,17 +257,32 @@ static OperandInfo getOperandInfo(const MachineOperand &MO, | |
| // Vector Unit-Stride Instructions | ||
| // Vector Strided Instructions | ||
| /// Dest EEW encoded in the instruction and EMUL=(EEW/SEW)*LMUL | ||
| case RISCV::VLM_V: | ||
| case RISCV::VSM_V: | ||
michaelmaitland marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0); | ||
| case RISCV::VLE8_V: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Eventually, we want to refactor so that we can share this code with getEEWForLoadStore in RISCVInsertVSETVLI.cpp. |
||
| case RISCV::VSE8_V: | ||
| case RISCV::VLSE8_V: | ||
| case RISCV::VSSE8_V: | ||
| case RISCV::VLE8FF_V: | ||
| return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(3, MI), 3); | ||
| case RISCV::VLE16_V: | ||
| case RISCV::VSE16_V: | ||
| case RISCV::VLSE16_V: | ||
| case RISCV::VSSE16_V: | ||
| case RISCV::VLE16FF_V: | ||
| return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(4, MI), 4); | ||
| case RISCV::VLE32_V: | ||
| case RISCV::VSE32_V: | ||
| case RISCV::VLSE32_V: | ||
| case RISCV::VSSE32_V: | ||
| case RISCV::VLE32FF_V: | ||
| return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(5, MI), 5); | ||
| case RISCV::VLE64_V: | ||
| case RISCV::VSE64_V: | ||
| case RISCV::VLSE64_V: | ||
| case RISCV::VSSE64_V: | ||
| case RISCV::VLE64FF_V: | ||
| return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(6, MI), 6); | ||
|
|
||
| // Vector Indexed Instructions | ||
|
|
@@ -732,6 +747,30 @@ static bool isSupportedInstr(const MachineInstr &MI) { | |
| return false; | ||
|
|
||
| switch (RVV->BaseInstr) { | ||
| // Vector Unit-Stride Instructions | ||
| // Vector Strided Instructions | ||
| case RISCV::VLE8_V: | ||
| case RISCV::VLM_V: | ||
| case RISCV::VLSE8_V: | ||
| case RISCV::VLE8FF_V: | ||
|
||
| case RISCV::VLE16_V: | ||
| case RISCV::VLSE16_V: | ||
| case RISCV::VLE16FF_V: | ||
| case RISCV::VLE32_V: | ||
| case RISCV::VLSE32_V: | ||
| case RISCV::VLE32FF_V: | ||
| case RISCV::VLE64_V: | ||
| case RISCV::VLSE64_V: | ||
| case RISCV::VLE64FF_V: | ||
| // Vector Indexed Instructions | ||
| case RISCV::VLUXEI8_V: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This part - the volatile check for existing LD/ST opcodes - is a functional fix that really should be extracted and submitted as it's own review with a clear description making clear it is a bug fix.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There wasn't a bug prior to this patch was there?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, I'm sorry, I misread. We'd previously only supported stores, and since we weren't reducing their widths anyways, no there isn't. |
||
| case RISCV::VLOXEI8_V: | ||
| case RISCV::VLUXEI16_V: | ||
| case RISCV::VLOXEI16_V: | ||
| case RISCV::VLUXEI32_V: | ||
| case RISCV::VLOXEI32_V: | ||
| case RISCV::VLUXEI64_V: | ||
| case RISCV::VLOXEI64_V: | ||
| // Vector Single-Width Integer Add and Subtract | ||
| case RISCV::VADD_VI: | ||
| case RISCV::VADD_VV: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.