diff options
author | Matt Turner <[email protected]> | 2017-08-25 20:15:24 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2017-08-29 15:20:57 -0700 |
commit | 50e4099edff93b666325e4ba7e607eafc29d2e92 (patch) | |
tree | 2bc9a8d425c0aa3bad9411db46c947d9f5e13412 /src/intel | |
parent | 02ba0d5a7bd514c7e84111854bb29de1b07eb8cd (diff) |
nir: Remove series of unnecessary conversions
Clang warns:
warning: absolute value function 'fabsf' given an argument of type
'const float64_t' (aka 'const double') but has parameter of type 'float'
which may cause truncation of value [-Wabsolute-value]
float64_t dst = bit_size == 64 ? fabs(src0) : fabsf(src0);
The type of the ternary expression will be the common type of fabs() and
fabsf(): double. So fabsf(src0) will be implicitly converted to double.
We may as well just convert src0 to double before a call to fabs() and
remove the needless complexity, à la
float64_t dst = fabs(src0);
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/intel')
0 files changed, 0 insertions, 0 deletions