This is an archive of the discontinued LLVM Phabricator instance.

Add comment to scatter-bit operation, make it faster and rename it.
AcceptedPublic

Authored by ruiu on Jun 13 2018, 1:04 PM.

Details

Summary

Also swap the parameter position to make it consistent with
__builtin_ia32_pdep_si.

Event Timeline

ruiu created this revision.Jun 13 2018, 1:04 PM
sidneym accepted this revision.Jun 15 2018, 1:13 PM
sidneym added inline comments.
lld/ELF/Arch/Hexagon.cpp
57

The comment above is helpful but I'll be honest and say that the above line wouldn't be the first thing to pop into my head.

This revision is now accepted and ready to land.Jun 15 2018, 1:13 PM
ruiu updated this revision to Diff 156111.Jul 18 2018, 11:05 AM
  • restore the original code
  • renamed Result -> Ret for consistency with other functions
ruiu updated this revision to Diff 156115.Jul 18 2018, 11:11 AM
  • Actually, after I rename variables to be more lld-ish and rearranges so that it doesn't compute unnecessary temporary results, it looks similar to my code, but what this does is the same as your code.