[PATCH] D72396: [InstCombine] fold zext of masked bit set/clear

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 18 18:15:29 PDT 2021


aqjune added a comment.

There were many plumbings done to existing transformations to recognize select instead of and/or, and then D99674 <https://reviews.llvm.org/D99674> did conditional disabling of the select folding.
There hasn't been a performance regression reported, except instruction cost related issue which is immediately patched later.

This is a very hopeful news because the patch is virtually disabling the folding in most cases.
The patch blocks `select a, b, false -> and a, b` (and similarly for `or`) if `b` contains op that creates poison, e.g. `icmp (add nsw), x`.

In the patch I promised to fully remove the select folding if there is no performanace regression for 2 weeks, and now the duration has passed, so maybe it is time to remove it.
In a day or two I'll have a time to make a patch for its full removal.


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

https://reviews.llvm.org/D72396



More information about the llvm-commits mailing list