[all-commits] [llvm/llvm-project] 01a49d: [libc++][bit] Improves rotate functions. (#98032)

Mark de Wever via All-commits all-commits at lists.llvm.org
Sat Aug 10 02:53:10 PDT 2024


  Branch: refs/heads/release/19.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 01a49d21c757fa80b3d6cf5cb153840cc94f8830
      https://github.com/llvm/llvm-project/commit/01a49d21c757fa80b3d6cf5cb153840cc94f8830
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2024-08-10 (Sat, 10 Aug 2024)

  Changed paths:
    M libcxx/include/__bit/rotate.h
    M libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp
    M libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp

  Log Message:
  -----------
  [libc++][bit] Improves rotate functions. (#98032)

Investigating #96612 shows our implementation was different from the
Standard and could cause UB. Testing the codegen showed quite a bit of
assembly generated for these functions. The functions have been written
differently which allows Clang to optimize the code to use simple CPU
rotate instructions.

Fixes: https://github.com/llvm/llvm-project/issues/96612



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list