This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add some missing blsr patterns
ClosedPublic

Authored by GBuella on Jan 26 2019, 9:32 PM.

Details

Summary

The add+and sequence followed by a branch can happen e.g. when looping over the set bits of an integer:

while (x != 0) {
   func(x & ~x);
   x &= x - 1;
}

Diff Detail

Repository
rL LLVM

Event Timeline

GBuella created this revision.Jan 26 2019, 9:32 PM

The two corresponding test cases are not yet commited,
https://reviews.llvm.org/D57297

This revision is now accepted and ready to land.Jan 26 2019, 9:41 PM
This revision was automatically updated to reflect the committed changes.