HomePhabricator

[InstCombine] Fold uadd.sat(a, b) == 0 and usub.sat(a, b) == 0

Authored by nikic on Oct 20 2019, 1:19 PM.

Description

[InstCombine] Fold uadd.sat(a, b) == 0 and usub.sat(a, b) == 0

This adds folds for comparing uadd.sat/usub.sat with zero:

  • uadd.sat(a, b) == 0 => a == 0 && b == 0 => (a | b) == 0
  • usub.sat(a, b) == 0 => a <= b

And inverted forms for !=.

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

llvm-svn: 375374

Details

Committed
nikicOct 20 2019, 1:19 PM
Differential Revision
D69224: [InstCombine] Fold uadd.sat(a, b) == 0 and usub.sat(a, b) == 0
Parents
rG5fa36e42c43b: Fix buildbot error in SIRegisterInfo.cpp.
Branches
Unknown
Tags
Unknown