[X86] Merge ADDSUB/SUBADD detection into single methods that can detect either and...
authorCraig Topper <craig.topper@intel.com>
Fri, 16 Mar 2018 18:25:59 +0000 (18:25 +0000)
committerCraig Topper <craig.topper@intel.com>
Fri, 16 Mar 2018 18:25:59 +0000 (18:25 +0000)
commitf0815e01d822d7a4913b5a429f4308e4740aab65
tree5cacea134e154e3386c29c661843dad6db55eecf
parentf546d943f67b7fe31bc210b0348bbb646e3331f0
[X86] Merge ADDSUB/SUBADD detection into single methods that can detect either and indicate what they found.

Previously, we called the same functions twice with a bool flag determining whether we should look for ADDSUB or SUBADD. It would be more efficient to run the code once and detect either pattern with a flag to tell which type it found.

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

llvm-svn: 327730
llvm/lib/Target/X86/X86ISelLowering.cpp