[TargetLowering] Refactor BuildSDIV in preparation for D50765. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 16 Aug 2018 16:54:06 +0000 (16:54 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 16 Aug 2018 16:54:06 +0000 (16:54 +0000)
commitede4905375a88865e19183f4e03714217652f4d8
treee76d627d15aea96f11c14daa8d39e58043275caa
parentb25e645ef11d1b38644d91d43de1b52068cc379d
[TargetLowering] Refactor BuildSDIV in preparation for D50765. NFCI.

Pull out magic factor calculators into a helper function, use 0/+1/-1 multiplication factor to (optionally) add/sub the numerator.

llvm-svn: 339898
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp