[PATCH] D148986: [InstSimplify] with logical ops: (X | Y) ? 0 : X --> 0

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 05:51:22 PDT 2023


nikic added a comment.

In D148986#4290283 <https://reviews.llvm.org/D148986#4290283>, @nikic wrote:

> @Allen My bad -- we need an additional change in order to remove that code. For now you can just leave it.

Actually, I think I confused myself here. We should be able to remove this code now. From a local test, this works. (Well, if you also handle the and / -1 case.)



================
Comment at: llvm/test/Transforms/InstCombine/select-ctlz-to-cttz.ll:144
 
+; TODO: https://alive2.llvm.org/ce/z/X6QjcB
 define i64 @select_clz_to_ctz_i64_wrong_xor(i64 %a) {
----------------
Unrelated change?


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

https://reviews.llvm.org/D148986



More information about the llvm-commits mailing list