[llvm] GVN: generalize impliesEquivalence (NFC) (PR #111416)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 08:50:08 PDT 2024
https://github.com/nikic requested changes to this pull request.
I agree that doing the transform with nsz wouldn't be valid, given its peculiar semantics.
However, `!isZeroValue` does not imply that the value isn't zero. It could either be a vector that has zero elements (but is not entirely zero) or a constant expression that evaluates to zero.
Additionally, when it comes to replacements based on vector comparisons you have to be quite careful, because they are only legal if no cross-lane operations are involved.
If we wanted to do the select fold, we'd do this in InstCombine rather than GVN. InstCombine already does this for integer comparisons, but not float comparisons.
https://github.com/llvm/llvm-project/pull/111416
More information about the llvm-commits
mailing list