[InstCombine] Don't use AddOne/SubOne to see if two APInts are 1 apart. Use APInt...
authorCraig Topper <craig.topper@intel.com>
Sun, 21 Jul 2019 05:26:05 +0000 (05:26 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 21 Jul 2019 05:26:05 +0000 (05:26 +0000)
commit8fabdfe9fcd2927a0a7cbdf3a15c7cf9b7a52019
tree11bb3236c4eedc2ec71aff8ecfb97aa18ea81259
parentb4e06328fc260881ba6069ff3012f82aefe9765b
[InstCombine] Don't use AddOne/SubOne to see if two APInts are 1 apart. Use APInt operations instead. NFCI

AddOne/SubOne create new Constant objects. That seems heavy for
comparing ConstantInts which wrap APInts. Just do the math on
on the APInts and compare them.

llvm-svn: 366648
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp