Skip to content
Commit 8a065483 authored by Nathan Slingerland's avatar Nathan Slingerland
Browse files

[Support] Fix SaturatingMultiply<T>() to be correct (and fast), Re-enable Unit Tests

Summary:
This change fixes the SaturatingMultiply<T>() function template to not cause undefined behavior with T=uint16_t.
Thanks to Richard Smith's contribution, it also no longer requires an integer division.

Patch by Richard Smith.

Reviewers: silvas, davidxl

Subscribers: rsmith, davidxl, llvm-commits

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

llvm-svn: 253870
parent e02c8681
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment