[all-commits] [llvm/llvm-project] 796efa: [Float2Int] Fix pessimization in the MinBW calcula...

Craig Topper via All-commits all-commits at lists.llvm.org
Thu Mar 21 11:10:01 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 796efa8cd5800a42eb8362564be64f3d72512a05
      https://github.com/llvm/llvm-project/commit/796efa8cd5800a42eb8362564be64f3d72512a05
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-03-21 (Thu, 21 Mar 2024)

  Changed paths:
    M llvm/lib/Transforms/Scalar/Float2Int.cpp

  Log Message:
  -----------
  [Float2Int] Fix pessimization in the MinBW calculation. (#86051)

The MinBW was being calculated using the significant bits of the upper
and lower bounds. The upper bound is 1 past the last value in the range
so I don't think it should be included. Instead use ConstantRange::getMinSignedBits.

I'm still not sure if the +1 is needed after the getMinSignedBits call.



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