[all-commits] [llvm/llvm-project] da6f42: [InstCombine] Fold `(x < y) ? -1 : zext(x > y)` an...

Volodymyr Vasylkun via All-commits all-commits at lists.llvm.org
Fri Aug 23 14:31:25 PDT 2024


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

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/scmp.ll
    M llvm/test/Transforms/InstCombine/select-select.ll
    M llvm/test/Transforms/InstCombine/ucmp.ll

  Log Message:
  -----------
  [InstCombine] Fold `(x < y) ? -1 : zext(x > y)` and `(x > y) ? 1 : sext(x < y)` to `ucmp/scmp(x, y)` (#105272)

This patch expands already existing funcionality to include these two
additional folds, which are nearly identical to the ones already
implemented.

Proofs: https://alive2.llvm.org/ce/z/Xy7s4j



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