[all-commits] [llvm/llvm-project] 7bed2c: [InstCombine] Add extra tests for overflow_to_sat....

David Green via All-commits all-commits at lists.llvm.org
Sun Nov 17 02:54:50 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7bed2cb8535085cf041f6f5d0c65135a898c302e
      https://github.com/llvm/llvm-project/commit/7bed2cb8535085cf041f6f5d0c65135a898c302e
  Author: David Green <david.green at arm.com>
  Date:   2019-11-17 (Sun, 17 Nov 2019)

  Changed paths:
    M llvm/test/Transforms/InstCombine/overflow_to_sat.ll

  Log Message:
  -----------
  [InstCombine] Add extra tests for overflow_to_sat.ll. NFC


  Commit: 03fce6b12e677144968045288df60da92fea2968
      https://github.com/llvm/llvm-project/commit/03fce6b12e677144968045288df60da92fea2968
  Author: David Green <david.green at arm.com>
  Date:   2019-11-17 (Sun, 17 Nov 2019)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/overflow_to_sat.ll

  Log Message:
  -----------
  [InstCombine] Canonicalize sadd.with.overflow with clamp to sadd.sat

This adds to D69245, adding extra signed patterns for folding from a
sadd_with_overflow to a sadd_sat. These are more complex than the
unsigned patterns, as the overflow can occur in either direction.

For the add case, the positive overflow can only occur if both of the
values are positive (same for both the values being negative). So there
is an extra select on whether to use the positive or negative overflow
limit.

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


  Commit: 08390c52a2902502cd9b25472aa4c6380230c18e
      https://github.com/llvm/llvm-project/commit/08390c52a2902502cd9b25472aa4c6380230c18e
  Author: David Green <david.green at arm.com>
  Date:   2019-11-17 (Sun, 17 Nov 2019)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/overflow_to_sat.ll

  Log Message:
  -----------
  [InstCombine] Canonicalize ssub.with.overflow with clamp to ssub.sat

Working on top of D69252, this adds canonicalisation patterns for ssub.with.overflow to ssub.sats.

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


Compare: https://github.com/llvm/llvm-project/compare/c9276fbfdf0c...08390c52a290


More information about the All-commits mailing list