[InstCombine] Don't use AddOne/SubOne to see if two APInts are 1 apart. Use APInt...
commitca511bd7e55f64e3e2335359c145cedce29583e2
authorCraig Topper <craig.topper@intel.com>
Sun, 21 Jul 2019 05:26:05 +0000 (21 05:26 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 21 Jul 2019 05:26:05 +0000 (21 05:26 +0000)
tree18a0a27f032ec6f475674d35da900c2221f03069
parent998651f611dca08173f3c7c4885cb902af4d0c30
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366648 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp