]> granicus.if.org Git - llvm/commit
[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)
commitc409d22837eb49abcc7b62c1c795df63902bc2d7
tree18a0a27f032ec6f475674d35da900c2221f03069
parent8da42128393482e767d74f00837daf56d1936c37
[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