[PATCH] D107611: [ARC] Add codegen for llvm.ctlz intrinsic for the ARC backend

2021-08-05 Thread Thomas Johnson via Phabricator via cfe-commits
thomasjohns created this revision. thomasjohns added a reviewer: marksl. Herald added a subscriber: hiraditya. thomasjohns requested review of this revision. Herald added projects: clang, LLVM. Herald added a subscriber: cfe-commits. Add a CTLZ pseudo instruction to tablegen and the ability to exp

[PATCH] D107611: [ARC] Add codegen for llvm.ctlz intrinsic for the ARC backend

2021-08-05 Thread Thomas Johnson via Phabricator via cfe-commits
thomasjohns added inline comments. Comment at: llvm/lib/Target/ARC/ARCInstrInfo.td:314 defm NORMH : ArcUnaryEXT5Inst<0b001000,"normh">; + +// TODO: Add `Requires<[HasBitScan]>` predicate when available. I just realized I made a bad merge here and dropped the `

[PATCH] D107611: [ARC] Add codegen for llvm.ctlz intrinsic for the ARC backend

2021-08-05 Thread Thomas Johnson via Phabricator via cfe-commits
thomasjohns added inline comments. Comment at: llvm/lib/Target/ARC/ARCInstrInfo.td:314 defm NORMH : ArcUnaryEXT5Inst<0b001000,"normh">; + +// TODO: Add `Requires<[HasBitScan]>` predicate when available. thomasjohns wrote: > I just realized I made a bad merge h

[PATCH] D107611: [ARC] Add codegen for llvm.ctlz intrinsic for the ARC backend

2021-08-05 Thread Thomas Johnson via Phabricator via cfe-commits
thomasjohns updated this revision to Diff 364657. thomasjohns added a comment. Fix missing `}` after bad merge. Move CTLZ next to other pseudo instructions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107611/new/ https://reviews.llvm.org/D107611 Files: clang/lib/Basic/Targets/ARC.h

[PATCH] D107611: [ARC] Add codegen for llvm.ctlz intrinsic for the ARC backend

2021-08-06 Thread Thomas Johnson via Phabricator via cfe-commits
thomasjohns updated this revision to Diff 364806. thomasjohns added a comment. llvm clang-tidy rule: prefer `Register` over `unsinged int`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107611/new/ https://reviews.llvm.org/D107611 Files: clang/lib/Basic/Targets/ARC.h llvm/lib/Targe

[PATCH] D107611: [ARC] Add codegen for llvm.ctlz intrinsic for the ARC backend

2021-08-06 Thread Thomas Johnson via Phabricator via cfe-commits
thomasjohns updated this revision to Diff 364855. thomasjohns added a comment. 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