This is an archive of the discontinued LLVM Phabricator instance.

[ARC] Add codegen for count trailing zeros intrinsic for the ARC backend
ClosedPublic

Authored by thomasjohns on Aug 10 2021, 7:50 AM.

Details

Summary

This makes the __builtin_ctz(x) intrinsic generate ffs.f %r, %r (find first set) and mov.eq %r, 32 (conditional move) ARC instructions. This change also added the ffs instruction to tablegen with a disassembly test.

Diff Detail

Event Timeline

thomasjohns created this revision.Aug 10 2021, 7:50 AM
thomasjohns requested review of this revision.Aug 10 2021, 7:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2021, 7:50 AM
marksl accepted this revision.Aug 10 2021, 8:13 AM

Looks good

This revision is now accepted and ready to land.Aug 10 2021, 8:13 AM

Attempt to fix clang-tidy lints in ARCExpandPseudos.cpp.

marksl accepted this revision.Aug 10 2021, 9:57 AM

Thanks for fixing the clang-tidy issue

This revision was landed with ongoing or failed builds.Aug 10 2021, 12:09 PM
This revision was automatically updated to reflect the committed changes.