[Support] Add saturating multiply-add support function
authorNathan Slingerland <slingn@gmail.com>
Tue, 12 Jan 2016 22:34:00 +0000 (22:34 +0000)
committerNathan Slingerland <slingn@gmail.com>
Tue, 12 Jan 2016 22:34:00 +0000 (22:34 +0000)
commit21314fb7684a3055e440155016b95b91c7cae9bb
treec6923fd2f926e5b9c990e995b4af777e775de7ab
parent469e6b09820b91baa7536a6343904ee0913103c6
[Support] Add saturating multiply-add support function

Summary: Add SaturatingMultiplyAdd convenience function template since A + (X * Y) comes up frequently when doing weighted arithmetic.

Reviewers: davidxl, silvas

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15385

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257532 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ProfileData/SampleProf.h
include/llvm/Support/MathExtras.h
lib/ProfileData/InstrProf.cpp
unittests/Support/MathExtrasTest.cpp