[all-commits] [llvm/llvm-project] be7d08: [InstCombine] Fold `sext(A < B) + zext(A > B)` int...

Volodymyr Vasylkun via All-commits all-commits at lists.llvm.org
Wed Aug 21 15:15:45 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: be7d08cd59b0f23eea88e791b2413b44301949d3
      https://github.com/llvm/llvm-project/commit/be7d08cd59b0f23eea88e791b2413b44301949d3
  Author: Volodymyr Vasylkun <vvmposeydon at gmail.com>
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
    M llvm/test/Transforms/InstCombine/add.ll
    A llvm/test/Transforms/InstCombine/sext-a-lt-b-plus-zext-a-gt-b-to-uscmp.ll

  Log Message:
  -----------
  [InstCombine] Fold `sext(A < B) + zext(A > B)` into `ucmp/scmp(A, B)` (#103833)

This change also covers the fold of `zext(A > B) - zext(A < B)` since it
is already being canonicalized into the aforementioned pattern.

Proof: https://alive2.llvm.org/ce/z/AgnfMn



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