[all-commits] [llvm/llvm-project] da140b: [InstCombine] Pre-commit tests for #100008 (NFC)

Rose Silicon via All-commits all-commits at lists.llvm.org
Wed Aug 7 14:17:22 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: da140bc1e3be4dfd49e17c2f4cc496ae75ff8693
      https://github.com/llvm/llvm-project/commit/da140bc1e3be4dfd49e17c2f4cc496ae75ff8693
  Author: Rose <gfunni234 at gmail.com>
  Date:   2024-08-07 (Wed, 07 Aug 2024)

  Changed paths:
    M llvm/test/Transforms/InstCombine/saturating-add-sub.ll

  Log Message:
  -----------
  [InstCombine] Pre-commit tests for #100008 (NFC)


  Commit: ede49fa5f3f32796618a71880038e2564c9d4db9
      https://github.com/llvm/llvm-project/commit/ede49fa5f3f32796618a71880038e2564c9d4db9
  Author: Rose <gfunni234 at gmail.com>
  Date:   2024-08-07 (Wed, 07 Aug 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/saturating-add-sub.ll

  Log Message:
  -----------
  [InstCombine] Canonicalize more saturated-add variants (#100008)

LLVM is not evaluating X u > C, a, b the same way it evaluates X <= C, b, a.

To fix this, let's move the folds to after the canonicalization of -1 to TrueVal.

Let's allow splat vectors with poison elements to be recognized too!

Finally, for completion, handle the one case that isn't caught by the above checks because it is canonicalized to eq:
X == -1 ? -1 : X + 1 -> uadd.sat(X, 1)

Alive2 Proof:
https://alive2.llvm.org/ce/z/WEcgYH


Compare: https://github.com/llvm/llvm-project/compare/2d95dee0c066...ede49fa5f3f3

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