[APFloat] Improve asserts in isSignificandAllOnes and isSignificandAllZeros so they...
authorCraig Topper <craig.topper@intel.com>
Thu, 1 Oct 2020 02:31:08 +0000 (19:31 -0700)
committerCraig Topper <craig.topper@intel.com>
Thu, 1 Oct 2020 02:32:34 +0000 (19:32 -0700)
commit12bdd427b33a75bd7abb5d4cb095d0b983328034
tree36c967fd3d262314167e90bae763f50bcdeb7075
parentd4a1db4f3fd7ce701454127465dd0ddbdb7face2
[APFloat] Improve asserts in isSignificandAllOnes and isSignificandAllZeros so they protect shift operations from undefined behavior.

For example, the assert in isSignificandAllZeros allowed NumHighBits
to be integerPartWidth. But since it is used directly as a shift amount
it must be less than integerPartWidth.
llvm/lib/Support/APFloat.cpp