[PATCH] D105632: [LV] Use lookThroughAnd with logical reductions

Kerry McLaughlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 16 08:27:36 PDT 2021


kmclaughlin added a comment.

Hi @dmgreen, thank you for taking another look at this & for explaining the problem with min & max here again. I think I understand now :)
I tried your example with a mask of 127 without `-instcombine` as @david-arm suggested, and there is no additional `and` after the `select` which would ensure we get the correct result on the final iteration.

The min/max cases haven't come up in practice from C code. I've changed the condition in IVDescriptors so that the only other instructions which we call `lookThroughAnd` for are and, or & xor.


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

https://reviews.llvm.org/D105632



More information about the llvm-commits mailing list