Skip to content

[libc][stdfix] Fix buildbot failure because of a typo. #126291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 7, 2025

Conversation

krishna2803
Copy link
Contributor

Fix build-bot failure caused by #125356

@llvmbot llvmbot added the libc label Feb 7, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 7, 2025

@llvm/pr-subscribers-libc

Author: Krishna Pandey (krishna2803)

Changes

Fix build-bot failure caused by #125356


Full diff: https://github.com/llvm/llvm-project/pull/126291.diff

1 Files Affected:

  • (modified) libc/src/__support/fixed_point/fx_bits.h (+2-2)
diff --git a/libc/src/__support/fixed_point/fx_bits.h b/libc/src/__support/fixed_point/fx_bits.h
index 21985e644253441..b9c065a3226d1c0 100644
--- a/libc/src/__support/fixed_point/fx_bits.h
+++ b/libc/src/__support/fixed_point/fx_bits.h
@@ -188,8 +188,8 @@ countls(T f) {
   constexpr int PADDING_LEN = CONTAIN_LEN - FXRep::TOTAL_LEN;
 
   if constexpr (FXRep::SIGN_LEN != 0) {
-    if (x < 0)
-      x = bit_not(x);
+    if (f < 0)
+      f = bit_not(f);
   }
 
   BitType value_bits = FXBits(x)::get_bits();

if (x < 0)
x = bit_not(x);
if (f < 0)
f = bit_not(f);
}

BitType value_bits = FXBits(x)::get_bits();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about x here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah.. sorry about that! fixed in caa32e6e

if (x < 0)
x = bit_not(x);
if (f < 0)
f = bit_not(f);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved in caa32e6e

@jhuber6 jhuber6 merged commit bada922 into llvm:main Feb 7, 2025
12 of 13 checks passed

BitType value_bits = FXBits(x)::get_bits();
BitType value_bits = FXBits(f)::get_bits();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still failing on the buildbots:

libc/src/__support/fixed_point/fx_bits.h:194:11: error: no viable conversion from 'FXBits' (aka 'FXBits<unsigned long _Fract>') to 'BitType' (aka 'unsigned int')
  194 |   BitType value_bits = FXBits(f)::get_bits();
      |           ^            ~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-bootstrap-build/llvm-project/libc/src/stdfix/countlsulr.cpp:17:23: note: in instantiation of function template specialization '__llvm_libc_20_0_0_git::fixed_point::countls<unsigned long _Fract>' requested here
   17 |   return fixed_point::countls(f);
      |                       ^

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was :: supposed to be .?

jhuber6 added a commit that referenced this pull request Feb 7, 2025
…)"

This reverts commit bada922.

Revert "[libc][stdfix] Implement fixed point `countlsfx` functions in llvm-libc (#125356)"

This reverts commit f2a1103.
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
…126291)"

This reverts commit bada922.

Revert "[libc][stdfix] Implement fixed point `countlsfx` functions in llvm-libc (llvm#125356)"

This reverts commit f2a1103.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants