File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
tools/clang/unittests/HLSLExec Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -714,15 +714,15 @@ template <typename T> uint32_t CountBits(T A) {
714714// returns the index of the first high/low bit found.
715715template <typename T> uint32_t ScanFromMSB (T A, bool LookingForZero) {
716716 if (A == 0 )
717- return ~ 0 ;
717+ return std::numeric_limits< uint32_t >:: max () ;
718718
719719 constexpr uint32_t NumBits = sizeof (T) * 8 ;
720720 for (int32_t I = NumBits - 1 ; I >= 0 ; --I) {
721721 bool BitSet = (A & (static_cast <T>(1 ) << I)) != 0 ;
722722 if (BitSet != LookingForZero)
723723 return static_cast <uint32_t >(I);
724724 }
725- return ~ 0 ;
725+ return std::numeric_limits< uint32_t >:: max () ;
726726}
727727
728728template <typename T>
@@ -742,14 +742,14 @@ template <typename T> uint32_t FirstBitLow(T A) {
742742 const uint32_t NumBits = sizeof (T) * 8 ;
743743
744744 if (A == 0 )
745- return ~ 0 ;
745+ return std::numeric_limits< uint32_t >:: max () ;
746746
747747 for (uint32_t I = 0 ; I < NumBits; ++I) {
748748 if (A & (static_cast <T>(1 ) << I))
749749 return static_cast <T>(I);
750750 }
751751
752- return ~ 0 ;
752+ return std::numeric_limits< uint32_t >:: max () ;
753753}
754754
755755DEFAULT_OP_2 (OpType::And, (A & B));
You can’t perform that action at this time.
0 commit comments