Add a CTLZ pseudo instruction to tablegen and the ability to expand this pseudo instruction instruction to ARC assembly code.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/ARC/ARCInstrInfo.td | ||
---|---|---|
314 | I just realized I made a bad merge here and dropped the }. Fixing it now. |
llvm/lib/Target/ARC/ARCInstrInfo.td | ||
---|---|---|
314 | I'll also move this pseudo instruction to be next to the other pseudo instructions |
llvm/lib/Target/ARC/ARCExpandPseudos.cpp | ||
---|---|---|
86 | I know you're following ExpandStore above in using "SI" here, but let's switch to "MI" as that is the most common practice. I think he used "SI" because it was a store instruction. All your readers will recognize MI as a MachineInstr, but they will have no such association to SI. | |
93 | This is not right. The final instruction of the sequence must write to DestReg. |
Thanks for the feedback, Mark.
This change prefers MI over SI naming, updates instruction writing, and makes the test case more precise (the generated code was improved and no longer had an unneeded mov %r1, %r0.
clang-tidy: warning: invalid case style for function 'ExpandCTLZ' [readability-identifier-naming]
not useful