Skip to content
Commit 8b1e81f0 authored by Mikael Holmen's avatar Mikael Holmen
Browse files

[builtins] Fix -Wshift-count-overflow warnings for targets with 16-bit int

Without this fix we got warnings like
 /repo/llvm/compiler-rt/lib/builtins/floattidf.c:67:29: warning: shift count >= width of type [-Wshift-count-overflow]
                 ((e + 1023) << 20) |              // exponent
                             ^  ~~
 1 warning generated.
when compiling for a target with 16-bit int.

In floatundisf.c the type of "e" was already changed to "si_int" in
4d41df64, now we do the same in a couple of other files where "e" is
also left shifted 20/23 steps.

Differential Revision: https://reviews.llvm.org/D147509
parent b507bda4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment