[all-commits] [llvm/llvm-project] 682fa7: InstCombine/Select: remove redundant code (NFC) (#...

Ramkumar Ramachandra via All-commits all-commits at lists.llvm.org
Wed Oct 16 04:44:32 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 682fa797b7358733df9e439241a9ef2906003adf
      https://github.com/llvm/llvm-project/commit/682fa797b7358733df9e439241a9ef2906003adf
  Author: Ramkumar Ramachandra <ramkumar.ramachandra at codasip.com>
  Date:   2024-10-16 (Wed, 16 Oct 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    A llvm/test/Transforms/InstCombine/select-icmp-xor.ll

  Log Message:
  -----------
  InstCombine/Select: remove redundant code (NFC) (#112388)

InstCombinerImpl::foldSelectInstWithICmp has some inlined code for
select-icmp-xor simplification, but this simplification is already done
by other code, via another path:

  (X & Y) == 0 ? X : X ^ Y ->
  ((X & Y) == 0 ? 0 : Y) ^ X ->
  (X & Y) ^ X ->
  X & ~Y

Cover the cases that it claims to simplify, and demonstrate that
stripping it doesn't cause test changes.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list