[all-commits] [llvm/llvm-project] 462bf4: [InstCombine] Refactor the code for folding logico...

Jim Lin via All-commits all-commits at lists.llvm.org
Thu Apr 24 19:59:23 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 462bf4746fd6dcb004ecc9c450b0e45a00101297
      https://github.com/llvm/llvm-project/commit/462bf4746fd6dcb004ecc9c450b0e45a00101297
  Author: Jim Lin <jim at andestech.com>
  Date:   2025-04-25 (Fri, 25 Apr 2025)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/test/Transforms/InstCombine/and-xor-or.ll

  Log Message:
  -----------
  [InstCombine] Refactor the code for folding logicop and sext/zext. NFC. (#137132)

This refactoring is for more easily adding the code to preserve disjoint
or in the PR https://github.com/llvm/llvm-project/pull/136815.

Both casts must have one use for folding logicop and sext/zext when the
src type differ to avoid creating an extra instruction. If the src type
of casts are the same, only one of the casts needs to have one use. This
PR also adds more tests for the same src type.



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