[PATCH] D132237: [SDAG] expand is-power-of-2 pattern that uses popcount

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 23 01:55:20 PDT 2022


dmgreen added reviewers: RKSimon, craig.topper.
dmgreen added a comment.
Herald added a subscriber: StephenFan.

I had almost written something into 57225 that said, effectively, custom isn't a very good costmodel as it can mean so many things, so adding a target hook sounds like a good way forward.

This sounds good for AArch64. Could there be cases where the CTPOP (+setcc) is custom lowered but cheaper than the Add+And+setcc+setcc+and/or? My guess would probably be no, it would either be legal or quite expensive.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132237/new/

https://reviews.llvm.org/D132237



More information about the llvm-commits mailing list