[all-commits] [llvm/llvm-project] d4b857: [compiler-rt] Fix src_rep_t_clz and clz_in_sig_frac

Alexander Shaposhnikov via All-commits all-commits at lists.llvm.org
Sat Oct 28 03:21:19 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d4b8572f11869fd47a4606ea91ee59d2833ce23c
      https://github.com/llvm/llvm-project/commit/d4b8572f11869fd47a4606ea91ee59d2833ce23c
  Author: Alexander Shaposhnikov <ashaposhnikov at google.com>
  Date:   2023-10-28 (Sat, 28 Oct 2023)

  Changed paths:
    M compiler-rt/lib/builtins/fp_extend.h
    M compiler-rt/test/builtins/Unit/extenddftf2_test.c

  Log Message:
  -----------
  [compiler-rt] Fix src_rep_t_clz and clz_in_sig_frac

This is a follow-up to 910a4bf5b.

1. __builtin_clz takes unsigned int, thus for uint16_t
src_rep_t_clz can't use it directly but should subtract 16
(leading 16 bits of the promoted argument are zero).

2. Fix (and simplify) clz_in_sig_frac.

Test plan: ninja check-compiler-rt
(extendhfsf2_test.c and extenddftf2_test.c)




More information about the All-commits mailing list