[all-commits] [llvm/llvm-project] 0f0243: [InstCombine] Fold (sub (xor X, (sext C)), (sext C...

Kai Luo via All-commits all-commits at lists.llvm.org
Sun Feb 25 17:43:32 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0f02431273faa2cd001c59fd5de767659bc0c976
      https://github.com/llvm/llvm-project/commit/0f02431273faa2cd001c59fd5de767659bc0c976
  Author: Kai Luo <lkail at cn.ibm.com>
  Date:   2024-02-26 (Mon, 26 Feb 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
    A llvm/test/Transforms/InstCombine/sub-xor-cmp.ll

  Log Message:
  -----------
  [InstCombine] Fold (sub (xor X, (sext C)), (sext C)) => (select C (neg X), X) (#79417)

This is useful when computing absdiff.

Correctness prove: https://alive2.llvm.org/ce/z/eMbxps,
https://alive2.llvm.org/ce/z/SNCWJe.

---------

Co-authored-by: Yingwei Zheng <dtcxzyw at qq.com>



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