[PATCH] D87480: [InstCombine] Simplify select operand based on equality condition

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 13:31:56 PDT 2020


nikic added a comment.

This partially subsumes the foldSelectBinOpIdentity() fold at https://github.com/llvm/llvm-project/blob/cb19e8c6d192a108b72ab07362921864a9e244f9/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp#L57, which handles a special case of this (where the equality comparison is to the neutral element of a binary operator). However, that fold also handles floating point equalities, which are tricky due to signed zero, so it can't simply be dropped.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87480



More information about the llvm-commits mailing list