[all-commits] [llvm/llvm-project] 6e6d26: [libc++] Fix one case in saturate_cast.pass.cpp fo...

zibi2 via All-commits all-commits at lists.llvm.org
Wed Mar 27 06:50:47 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6e6d266fb8cc1398e7d5a220a9332d88ce074464
      https://github.com/llvm/llvm-project/commit/6e6d266fb8cc1398e7d5a220a9332d88ce074464
  Author: zibi2 <62662650+zibi2 at users.noreply.github.com>
  Date:   2024-03-27 (Wed, 27 Mar 2024)

  Changed paths:
    M libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/saturate_cast.pass.cpp

  Log Message:
  -----------
  [libc++] Fix one case in saturate_cast.pass.cpp for 64-bit on z/OS (#86724)

On z/OS int128 is disabled causing one of the cases in
`saturate_cast.pass.cpp` to fail. The failure is only in 64-bit mode.
In this case `the std::numeric_limits<long long int>::max()` is within
`std::numeric_limits<unsigned long int>::min()`
and `std::numeric_limits<unsigned long int>::max()` therefore,
saturate_cast<unsigned long int>( sBigMax) == LONG_MAX and not ULONG_MAX
as original test.

In 32-bit, `saturate_cast<unsigned long int>( sBigMax) == ULONG_MAX`
like on other platforms where int128 is enabled.

This PR is required to pass this test case on z/OS and possibly on other
platforms where int128 is not supported/enabled.

---------

Co-authored-by: Sean Perry <perry at ca.ibm.com>



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