This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] [NFC] Add a function to customLegalizeToWOp by Intrinsic
ClosedPublic

Authored by Chenbing.Zheng on Jan 14 2022, 6:07 PM.

Details

Summary

These cases follows the same pattern,add a function to do it.

Diff Detail

Event Timeline

Chenbing.Zheng created this revision.Jan 14 2022, 6:07 PM
Chenbing.Zheng requested review of this revision.Jan 14 2022, 6:07 PM

modify CASE_EXTEND_TWO_OPERAND to CASE_EXTEND_TWO_OPERANDS

craig.topper added inline comments.Jan 14 2022, 6:19 PM
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
6381

Would a helper function be better?

Chenbing.Zheng retitled this revision from [RISCV] [NFC] Use macro to reduce repetive switch cases to [RISCV] [NFC] Add a function to customLegalizeToWOp by Intrinsic.
Chenbing.Zheng edited the summary of this revision. (Show Details)

use a helper function instead of macro

craig.topper added inline comments.Jan 14 2022, 10:25 PM
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
5814

I think "Intrinsic" is typically shortened to either "Intrin" or "Intr". I don't recall seeing "Intri" anywhere.

modify Intri to Intr

llvm/lib/Target/RISCV/RISCVISelLowering.cpp
5814

Thanks, I will modify it and pay more attention

Chenbing.Zheng marked an inline comment as done.Jan 14 2022, 10:41 PM
craig.topper accepted this revision.Jan 14 2022, 11:04 PM

LGTM with that one comment

llvm/lib/Target/RISCV/RISCVISelLowering.cpp
5833

This line needs to be reformatted to decrease indentation after the rename.

This revision is now accepted and ready to land.Jan 14 2022, 11:04 PM
benshi001 added inline comments.Jan 14 2022, 11:51 PM
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
5833

I will correct that format issue when help him commiting.

This revision was landed with ongoing or failed builds.Jan 15 2022, 12:28 AM
This revision was automatically updated to reflect the committed changes.