[clang] [llvm] [AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

Stanislav Mekhanoshin via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 16 10:49:44 PST 2024


================
@@ -2652,6 +2652,23 @@ bool isInlinableLiteral32(int32_t Literal, bool HasInv2Pi) {
          (Val == 0x3e22f983 && HasInv2Pi);
 }
 
+bool isInlinableLiteralBF16(int16_t Literal, bool HasInv2Pi) {
+  if (!HasInv2Pi)
+    return false;
----------------
rampitec wrote:

It does not change the behavior, but generally it shall only matter when you compare value to 0x3E22.

https://github.com/llvm/llvm-project/pull/80908


More information about the cfe-commits mailing list