[all-commits] [llvm/llvm-project] 6b9317: [InstCombine] Fold zero check followed by decremen...

clubby789 via All-commits all-commits at lists.llvm.org
Mon Jan 9 05:23:03 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b9317f52a66318a57a216da2e5e4890ef2aef7b
      https://github.com/llvm/llvm-project/commit/6b9317f52a66318a57a216da2e5e4890ef2aef7b
  Author: Jamie Hill-Daniel <jamie at hill-daniel.co.uk>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/saturating-add-sub.ll
    M llvm/test/Transforms/InstCombine/unsigned_saturated_sub.ll
    M llvm/test/Transforms/PhaseOrdering/pr44461-br-to-switch-rotate.ll

  Log Message:
  -----------
  [InstCombine] Fold zero check followed by decrement to usub.sat

Fold (a == 0) : 0 ? a - 1 into usub.sat(a, 1).

Differential Revision: https://reviews.llvm.org/D140798




More information about the All-commits mailing list