[PATCH] D115611: [X86][BF16] delete `typedef unsigned short __bfloat16`
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 13 10:26:34 PST 2021
craig.topper added inline comments.
================
Comment at: clang/lib/Headers/avx512vlbf16intrin.h:416
/// and fraction field is truncated to 7 bits.
-static __inline__ __bfloat16 __DEFAULT_FN_ATTRS128 _mm_cvtness_sbh(float __A) {
+static __inline__ short __DEFAULT_FN_ATTRS128 _mm_cvtness_sbh(float __A) {
__v4sf __V = {__A, 0, 0, 0};
----------------
I'm not sure if this change is a good idea this late. Users could have been dependent on it being an unsigned value before. I believe this changes the behavior of this code
```
int result = _mm_cvtness_sbh(X)
```
Previously it would have zero extended, but now it will sign extend.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115611/new/
https://reviews.llvm.org/D115611
More information about the cfe-commits
mailing list