Skip to content

[libc] Wrong guards for totalorderbf16 and totalordermagbf16#188241

Merged
lntue merged 2 commits intollvm:mainfrom
Sukumarsawant:totalorder_guard
Mar 25, 2026
Merged

[libc] Wrong guards for totalorderbf16 and totalordermagbf16#188241
lntue merged 2 commits intollvm:mainfrom
Sukumarsawant:totalorder_guard

Conversation

@Sukumarsawant
Copy link
Copy Markdown
Contributor

@Sukumarsawant Sukumarsawant commented Mar 24, 2026

Currently the guards for totalorderbf16 and totalordermagbf16 are as follows:

#ifndef LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H
#define LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H
-
#endif // LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H

and

#ifndef LLVM_LIBC_SRC_MATH_TOTALORDERF16_H
#define LLVM_LIBC_SRC_MATH_TOTALORDERF16_H
-
#endif // LLVM_LIBC_SRC_MATH_TOTALORDERF16_H

As we can see these are for F16 and not BF16 .
This Pr intends to fix that with correct guards as TOTALORDERBF16 and TOTALORDERMAGBF16

@llvmbot llvmbot added the libc label Mar 24, 2026
@llvmbot
Copy link
Copy Markdown
Member

llvmbot commented Mar 24, 2026

@llvm/pr-subscribers-libc

Author: Zorojuro (Sukumarsawant)

Changes

Currently the guards for totalorderbf16 and totalordermagbf16 are as follows:

#ifndef LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H
#define LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H
-
#endif // LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H

and

#ifndef LLVM_LIBC_SRC_MATH_TOTALORDERF16_H
#define LLVM_LIBC_SRC_MATH_TOTALORDERF16_H
-
#endif // LLVM_LIBC_SRC_MATH_TOTALORDERF16_H

This Pr intends to fix that with correct guards as TOTALORDERBF16 and TOTALORDERMAGBF16


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

2 Files Affected:

  • (modified) libc/src/math/totalorderbf16.h (+3-3)
  • (modified) libc/src/math/totalordermagbf16.h (+3-3)
diff --git a/libc/src/math/totalorderbf16.h b/libc/src/math/totalorderbf16.h
index 2414852db92b8..31daec4ac64fb 100644
--- a/libc/src/math/totalorderbf16.h
+++ b/libc/src/math/totalorderbf16.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIBC_SRC_MATH_TOTALORDERF16_H
-#define LLVM_LIBC_SRC_MATH_TOTALORDERF16_H
+#ifndef LLVM_LIBC_SRC_MATH_TOTALORDERBF16_H
+#define LLVM_LIBC_SRC_MATH_TOTALORDERBF16_H
 
 #include "src/__support/macros/config.h"
 #include "src/__support/macros/properties/types.h"
@@ -18,4 +18,4 @@ int totalorderbf16(const bfloat16 *x, const bfloat16 *y);
 
 } // namespace LIBC_NAMESPACE_DECL
 
-#endif // LLVM_LIBC_SRC_MATH_TOTALORDERF16_H
+#endif // LLVM_LIBC_SRC_MATH_TOTALORDERBF16_H
diff --git a/libc/src/math/totalordermagbf16.h b/libc/src/math/totalordermagbf16.h
index c48de1ca8e540..e60d28bf1d450 100644
--- a/libc/src/math/totalordermagbf16.h
+++ b/libc/src/math/totalordermagbf16.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H
-#define LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H
+#ifndef LLVM_LIBC_SRC_MATH_TOTALORDERMAGBF16_H
+#define LLVM_LIBC_SRC_MATH_TOTALORDERMAGBF16_H
 
 #include "src/__support/macros/config.h"
 #include "src/__support/macros/properties/types.h"
@@ -18,4 +18,4 @@ int totalordermagbf16(const bfloat16 *x, const bfloat16 *y);
 
 } // namespace LIBC_NAMESPACE_DECL
 
-#endif // LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H
+#endif // LLVM_LIBC_SRC_MATH_TOTALORDERMAGBF16_H

@Sukumarsawant Sukumarsawant changed the title [libc] wrong guards in totalorderbf16 and totalordermagbf16 [libc] wrong guards for totalorderbf16 and totalordermagbf16 Mar 24, 2026
@lntue lntue changed the title [libc] wrong guards for totalorderbf16 and totalordermagbf16 [libc] Wrong guards for totalorderbf16 and totalordermagbf16 Mar 25, 2026
@lntue lntue merged commit 408bb4d into llvm:main Mar 25, 2026
28 checks passed
ZXShady pushed a commit to ZXShady/llvm-project that referenced this pull request Mar 26, 2026
…m#188241)

Currently the guards for `totalorderbf16` and `totalordermagbf16` are as
follows:
```
#ifndef LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H
#define LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H
-
#endif // LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H
```
and 
```
#ifndef LLVM_LIBC_SRC_MATH_TOTALORDERF16_H
#define LLVM_LIBC_SRC_MATH_TOTALORDERF16_H
-
#endif // LLVM_LIBC_SRC_MATH_TOTALORDERF16_H
```
As we can see these are for F16 and not BF16 .
This Pr intends to fix that with correct guards as `TOTALORDERBF16` and
`TOTALORDERMAGBF16`
ambergorzynski pushed a commit to ambergorzynski/llvm-project that referenced this pull request Mar 27, 2026
…m#188241)

Currently the guards for `totalorderbf16` and `totalordermagbf16` are as
follows:
```
#ifndef LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H
#define LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H
-
#endif // LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H
```
and 
```
#ifndef LLVM_LIBC_SRC_MATH_TOTALORDERF16_H
#define LLVM_LIBC_SRC_MATH_TOTALORDERF16_H
-
#endif // LLVM_LIBC_SRC_MATH_TOTALORDERF16_H
```
As we can see these are for F16 and not BF16 .
This Pr intends to fix that with correct guards as `TOTALORDERBF16` and
`TOTALORDERMAGBF16`
Aadarsh-Keshri pushed a commit to Aadarsh-Keshri/llvm-project that referenced this pull request Mar 28, 2026
…m#188241)

Currently the guards for `totalorderbf16` and `totalordermagbf16` are as
follows:
```
#ifndef LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H
#define LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H
-
#endif // LLVM_LIBC_SRC_MATH_TOTALORDERMAGF16_H
```
and 
```
#ifndef LLVM_LIBC_SRC_MATH_TOTALORDERF16_H
#define LLVM_LIBC_SRC_MATH_TOTALORDERF16_H
-
#endif // LLVM_LIBC_SRC_MATH_TOTALORDERF16_H
```
As we can see these are for F16 and not BF16 .
This Pr intends to fix that with correct guards as `TOTALORDERBF16` and
`TOTALORDERMAGBF16`
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.

3 participants