HomePhabricator

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

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

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
rL375373: Fix buildbot error in SIRegisterInfo.cpp.
Branches
Unknown
Tags
Unknown