[Mlir-commits] [mlir] ec94ac5 - [APFloat][NFCI] Move x87DoubleExtended next to the other native IEEE types (#223193)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Oct 15 17:45:53 PDT 2026
Author: Eric Ross
Date: 2026-10-15T18:45:45-06:00
New Revision: ec94ac53962a569a9d26cf107c3663a6880fe446
URL: https://github.com/llvm/llvm-project/commit/ec94ac53962a569a9d26cf107c3663a6880fe446
DIFF: https://github.com/llvm/llvm-project/commit/ec94ac53962a569a9d26cf107c3663a6880fe446.diff
LOG: [APFloat][NFCI] Move x87DoubleExtended next to the other native IEEE types (#223193)
Reordered the `APFloatBase::Semantics` so that `S_x87DoubleExtended` is
placed after the IEEE types and before the DoubleDouble types.
Previously, `S_x87DoubleExtended` was the very last `enum` value,
meaning that `SemanticsToEnum`/`bitcastToAPInt`/`initFromAPInt` would
test if `Sem` is one of the 13 GPU floating point types before testing
if `Sem` is `x87DoubleExtended`. Given that `x87DoubleExtended` is more
commonly used and a native LLVM IR type, I thought a better heuristic
would be to test if `Sem` is a `x87DoubleExtended` type before testing
if it is one of the 13 GPU floating point types.
I also made the order of other functions/fields more consistent across
`APFloat`.
Added:
Modified:
llvm/include/llvm/ADT/APFloat.h
llvm/lib/Support/APFloat.cpp
mlir/test/Conversion/ArithAndMathToAPFloat/arith-to-apfloat.mlir
mlir/test/Conversion/ArithAndMathToAPFloat/math-to-apfloat.mlir
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/APFloat.h b/llvm/include/llvm/ADT/APFloat.h
index b51b6256ad2c64..9b903fc888b4cf 100644
--- a/llvm/include/llvm/ADT/APFloat.h
+++ b/llvm/include/llvm/ADT/APFloat.h
@@ -163,6 +163,8 @@ class APFloatBase {
S_IEEEsingle,
S_IEEEdouble,
S_IEEEquad,
+ // TODO: Documentation is missing.
+ S_x87DoubleExtended,
// The IBM double-double semantics. Such a number consists of a pair of
// IEEE 64-bit doubles (Hi, Lo), where |Hi| > |Lo|, and if normal,
// (double)(Hi + Lo) == Hi. The numeric value it's modeling is Hi + Lo.
@@ -262,9 +264,7 @@ class APFloatBase {
// Unlike IEEE-754 types, there are no infinity values, and NaN is
// represented with the exponent and mantissa bits set to all 1s.
S_Float8E5M3FNU,
- // TODO: Documentation is missing.
- S_x87DoubleExtended,
- S_MaxSemantics = S_x87DoubleExtended,
+ S_MaxSemantics = S_Float8E5M3FNU,
};
LLVM_ABI static const llvm::fltSemantics &EnumToSemantics(Semantics S);
@@ -276,6 +276,9 @@ class APFloatBase {
LLVM_ABI static const fltSemantics semIEEEsingle;
LLVM_ABI static const fltSemantics semIEEEdouble;
LLVM_ABI static const fltSemantics semIEEEquad;
+ LLVM_ABI static const fltSemantics semX87DoubleExtended;
+ LLVM_ABI static const fltSemantics semPPCDoubleDouble;
+ LLVM_ABI static const fltSemantics semPPCDoubleDoubleLegacy;
LLVM_ABI static const fltSemantics semFloat8E5M2;
LLVM_ABI static const fltSemantics semFloat8E5M2FNUZ;
LLVM_ABI static const fltSemantics semFloat8E4M3;
@@ -289,10 +292,7 @@ class APFloatBase {
LLVM_ABI static const fltSemantics semFloat6E3M2FN;
LLVM_ABI static const fltSemantics semFloat6E2M3FN;
LLVM_ABI static const fltSemantics semFloat4E2M1FN;
- LLVM_ABI static const fltSemantics semX87DoubleExtended;
LLVM_ABI static const fltSemantics semBogus;
- LLVM_ABI static const fltSemantics semPPCDoubleDouble;
- LLVM_ABI static const fltSemantics semPPCDoubleDoubleLegacy;
friend class detail::IEEEFloat;
friend class detail::DoubleAPFloat;
@@ -304,6 +304,9 @@ class APFloatBase {
static const fltSemantics &IEEEsingle() { return semIEEEsingle; }
static const fltSemantics &IEEEdouble() { return semIEEEdouble; }
static const fltSemantics &IEEEquad() { return semIEEEquad; }
+ static const fltSemantics &x87DoubleExtended() {
+ return semX87DoubleExtended;
+ }
static const fltSemantics &PPCDoubleDouble() { return semPPCDoubleDouble; }
static const fltSemantics &PPCDoubleDoubleLegacy() {
return semPPCDoubleDoubleLegacy;
@@ -323,9 +326,6 @@ class APFloatBase {
static const fltSemantics &Float6E3M2FN() { return semFloat6E3M2FN; }
static const fltSemantics &Float6E2M3FN() { return semFloat6E2M3FN; }
static const fltSemantics &Float4E2M1FN() { return semFloat4E2M1FN; }
- static const fltSemantics &x87DoubleExtended() {
- return semX87DoubleExtended;
- }
/// A Pseudo fltsemantic used to construct APFloats that cannot conflict with
/// anything real.
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp
index 12b0fa789f2426..8a52888b874fdf 100644
--- a/llvm/lib/Support/APFloat.cpp
+++ b/llvm/lib/Support/APFloat.cpp
@@ -75,6 +75,21 @@ constexpr fltSemantics APFloatBase::semBFloat = {127, -126, 8, 16};
constexpr fltSemantics APFloatBase::semIEEEsingle = {127, -126, 24, 32};
constexpr fltSemantics APFloatBase::semIEEEdouble = {1023, -1022, 53, 64};
constexpr fltSemantics APFloatBase::semIEEEquad = {16383, -16382, 113, 128};
+constexpr fltSemantics APFloatBase::semX87DoubleExtended = {
+ 16383,
+ -16382,
+ 64,
+ 80,
+ fltNonfiniteBehavior::IEEE754,
+ fltNanEncoding::IEEE,
+ true,
+ true,
+ true,
+ true,
+ true};
+constexpr fltSemantics APFloatBase::semPPCDoubleDouble = {-1, 0, 0, 128};
+constexpr fltSemantics APFloatBase::semPPCDoubleDoubleLegacy = {
+ 1023, -1022 + 53, 53 + 53, 128};
constexpr fltSemantics APFloatBase::semFloat8E5M2 = {15, -14, 3, 8};
constexpr fltSemantics APFloatBase::semFloat8E5M2FNUZ = {
15, -15, 3, 8, fltNonfiniteBehavior::NanOnly, fltNanEncoding::NegativeZero};
@@ -116,22 +131,7 @@ constexpr fltSemantics APFloatBase::semFloat6E2M3FN = {
2, 0, 4, 6, fltNonfiniteBehavior::FiniteOnly};
constexpr fltSemantics APFloatBase::semFloat4E2M1FN = {
2, 0, 2, 4, fltNonfiniteBehavior::FiniteOnly};
-constexpr fltSemantics APFloatBase::semX87DoubleExtended = {
- 16383,
- -16382,
- 64,
- 80,
- fltNonfiniteBehavior::IEEE754,
- fltNanEncoding::IEEE,
- true,
- true,
- true,
- true,
- true};
constexpr fltSemantics APFloatBase::semBogus = {0, 0, 0, 0};
-constexpr fltSemantics APFloatBase::semPPCDoubleDouble = {-1, 0, 0, 128};
-constexpr fltSemantics APFloatBase::semPPCDoubleDoubleLegacy = {
- 1023, -1022 + 53, 53 + 53, 128};
const llvm::fltSemantics &APFloatBase::EnumToSemantics(Semantics S) {
switch (S) {
@@ -145,6 +145,8 @@ const llvm::fltSemantics &APFloatBase::EnumToSemantics(Semantics S) {
return IEEEdouble();
case S_IEEEquad:
return IEEEquad();
+ case S_x87DoubleExtended:
+ return x87DoubleExtended();
case S_PPCDoubleDouble:
return PPCDoubleDouble();
case S_PPCDoubleDoubleLegacy:
@@ -175,8 +177,6 @@ const llvm::fltSemantics &APFloatBase::EnumToSemantics(Semantics S) {
return Float6E2M3FN();
case S_Float4E2M1FN:
return Float4E2M1FN();
- case S_x87DoubleExtended:
- return x87DoubleExtended();
}
llvm_unreachable("Unrecognised floating semantics");
}
@@ -193,6 +193,8 @@ APFloatBase::SemanticsToEnum(const llvm::fltSemantics &Sem) {
return S_IEEEdouble;
else if (&Sem == &llvm::APFloat::IEEEquad())
return S_IEEEquad;
+ else if (&Sem == &llvm::APFloat::x87DoubleExtended())
+ return S_x87DoubleExtended;
else if (&Sem == &llvm::APFloat::PPCDoubleDouble())
return S_PPCDoubleDouble;
else if (&Sem == &llvm::APFloat::PPCDoubleDoubleLegacy())
@@ -223,8 +225,6 @@ APFloatBase::SemanticsToEnum(const llvm::fltSemantics &Sem) {
return S_Float6E2M3FN;
else if (&Sem == &llvm::APFloat::Float4E2M1FN())
return S_Float4E2M1FN;
- else if (&Sem == &llvm::APFloat::x87DoubleExtended())
- return S_x87DoubleExtended;
else
llvm_unreachable("Unknown floating semantics");
}
@@ -3721,6 +3721,10 @@ APInt IEEEFloat::bitcastToAPInt() const {
if (semantics == (const llvm::fltSemantics *)&APFloatBase::semIEEEquad)
return convertQuadrupleAPFloatToAPInt();
+ if (semantics ==
+ (const llvm::fltSemantics *)&APFloatBase::semX87DoubleExtended)
+ return convertF80LongDoubleAPFloatToAPInt();
+
if (semantics ==
(const llvm::fltSemantics *)&APFloatBase::semPPCDoubleDoubleLegacy)
return convertPPCDoubleDoubleLegacyAPFloatToAPInt();
@@ -3765,10 +3769,7 @@ APInt IEEEFloat::bitcastToAPInt() const {
if (semantics == (const llvm::fltSemantics *)&APFloatBase::semFloat4E2M1FN)
return convertFloat4E2M1FNAPFloatToAPInt();
- assert(semantics ==
- (const llvm::fltSemantics *)&APFloatBase::semX87DoubleExtended &&
- "unknown format!");
- return convertF80LongDoubleAPFloatToAPInt();
+ llvm_unreachable("unknown format!");
}
float IEEEFloat::convertToFloat() const {
@@ -4051,10 +4052,10 @@ void IEEEFloat::initFromAPInt(const fltSemantics *Sem, const APInt &api) {
return initFromFloatAPInt(api);
if (Sem == &APFloatBase::semIEEEdouble)
return initFromDoubleAPInt(api);
- if (Sem == &APFloatBase::semX87DoubleExtended)
- return initFromF80LongDoubleAPInt(api);
if (Sem == &APFloatBase::semIEEEquad)
return initFromQuadrupleAPInt(api);
+ if (Sem == &APFloatBase::semX87DoubleExtended)
+ return initFromF80LongDoubleAPInt(api);
if (Sem == &APFloatBase::semPPCDoubleDoubleLegacy)
return initFromPPCDoubleDoubleLegacyAPInt(api);
if (Sem == &APFloatBase::semFloat8E5M2)
diff --git a/mlir/test/Conversion/ArithAndMathToAPFloat/arith-to-apfloat.mlir b/mlir/test/Conversion/ArithAndMathToAPFloat/arith-to-apfloat.mlir
index 1128e5c39c68f5..3f3e62e0e9dee0 100644
--- a/mlir/test/Conversion/ArithAndMathToAPFloat/arith-to-apfloat.mlir
+++ b/mlir/test/Conversion/ArithAndMathToAPFloat/arith-to-apfloat.mlir
@@ -22,7 +22,7 @@
// CHECK: %[[BITCAST_1:.*]] = arith.bitcast %[[VAL_0]] : f8E4M3FN to i8
// CHECK: %[[EXTUI_1:.*]] = arith.extui %[[BITCAST_1]] : i8 to i64
// // fltSemantics semantics for f8E4M3FN
-// CHECK: %[[CONSTANT_1:.*]] = arith.constant 10 : i32
+// CHECK: %[[CONSTANT_1:.*]] = arith.constant 11 : i32
// CHECK: %[[VAL_1:.*]] = call @_mlir_apfloat_add(%[[CONSTANT_1]], %[[EXTUI_0]], %[[EXTUI_1]]) : (i32, i64, i64) -> i64
// CHECK: %[[TRUNCI_0:.*]] = arith.trunci %[[VAL_1]] : i64 to i8
// CHECK: %[[BITCAST_2:.*]] = arith.bitcast %[[TRUNCI_0]] : i8 to f8E4M3FN
@@ -35,7 +35,7 @@
// CHECK: %[[BITCAST_4:.*]] = arith.bitcast %[[VAL_2]] : f6E3M2FN to i6
// CHECK: %[[EXTUI_3:.*]] = arith.extui %[[BITCAST_4]] : i6 to i64
// // fltSemantics semantics for f6E3M2FN
-// CHECK: %[[CONSTANT_3:.*]] = arith.constant 16 : i32
+// CHECK: %[[CONSTANT_3:.*]] = arith.constant 17 : i32
// CHECK: %[[VAL_3:.*]] = call @_mlir_apfloat_add(%[[CONSTANT_3]], %[[EXTUI_2]], %[[EXTUI_3]]) : (i32, i64, i64) -> i64
// CHECK: %[[TRUNCI_1:.*]] = arith.trunci %[[VAL_3]] : i64 to i6
// CHECK: %[[BITCAST_5:.*]] = arith.bitcast %[[TRUNCI_1]] : i6 to f6E3M2FN
@@ -70,7 +70,7 @@ func.func @full_example() {
// -----
// CHECK: func.func private @_mlir_apfloat_add(i32, i64, i64) -> i64
-// CHECK: %[[sem:.*]] = arith.constant 18 : i32
+// CHECK: %[[sem:.*]] = arith.constant 19 : i32
// CHECK: call @_mlir_apfloat_add(%[[sem]], %{{.*}}, %{{.*}}) : (i32, i64, i64) -> i64
func.func @addf(%arg0: f4E2M1FN, %arg1: f4E2M1FN) {
%0 = arith.addf %arg0, %arg1 : f4E2M1FN
@@ -90,7 +90,7 @@ func.func @addf(%arg0: f4E2M1FN, %arg1: f4E2M1FN) {
// -----
// CHECK: func.func private @_mlir_apfloat_subtract(i32, i64, i64) -> i64
-// CHECK: %[[sem:.*]] = arith.constant 18 : i32
+// CHECK: %[[sem:.*]] = arith.constant 19 : i32
// CHECK: call @_mlir_apfloat_subtract(%[[sem]], %{{.*}}, %{{.*}}) : (i32, i64, i64) -> i64
func.func @subf(%arg0: f4E2M1FN, %arg1: f4E2M1FN) {
%0 = arith.subf %arg0, %arg1 : f4E2M1FN
@@ -100,7 +100,7 @@ func.func @subf(%arg0: f4E2M1FN, %arg1: f4E2M1FN) {
// -----
// CHECK: func.func private @_mlir_apfloat_multiply(i32, i64, i64) -> i64
-// CHECK: %[[sem:.*]] = arith.constant 18 : i32
+// CHECK: %[[sem:.*]] = arith.constant 19 : i32
// CHECK: call @_mlir_apfloat_multiply(%[[sem]], %{{.*}}, %{{.*}}) : (i32, i64, i64) -> i64
func.func @subf(%arg0: f4E2M1FN, %arg1: f4E2M1FN) {
%0 = arith.mulf %arg0, %arg1 : f4E2M1FN
@@ -110,7 +110,7 @@ func.func @subf(%arg0: f4E2M1FN, %arg1: f4E2M1FN) {
// -----
// CHECK: func.func private @_mlir_apfloat_divide(i32, i64, i64) -> i64
-// CHECK: %[[sem:.*]] = arith.constant 18 : i32
+// CHECK: %[[sem:.*]] = arith.constant 19 : i32
// CHECK: call @_mlir_apfloat_divide(%[[sem]], %{{.*}}, %{{.*}}) : (i32, i64, i64) -> i64
func.func @subf(%arg0: f4E2M1FN, %arg1: f4E2M1FN) {
%0 = arith.divf %arg0, %arg1 : f4E2M1FN
@@ -120,7 +120,7 @@ func.func @subf(%arg0: f4E2M1FN, %arg1: f4E2M1FN) {
// -----
// CHECK: func.func private @_mlir_apfloat_remainder(i32, i64, i64) -> i64
-// CHECK: %[[sem:.*]] = arith.constant 18 : i32
+// CHECK: %[[sem:.*]] = arith.constant 19 : i32
// CHECK: call @_mlir_apfloat_remainder(%[[sem]], %{{.*}}, %{{.*}}) : (i32, i64, i64) -> i64
func.func @remf(%arg0: f4E2M1FN, %arg1: f4E2M1FN) {
%0 = arith.remf %arg0, %arg1 : f4E2M1FN
@@ -130,7 +130,7 @@ func.func @remf(%arg0: f4E2M1FN, %arg1: f4E2M1FN) {
// -----
// CHECK: func.func private @_mlir_apfloat_convert(i32, i32, i64) -> i64
-// CHECK: %[[sem_in:.*]] = arith.constant 18 : i32
+// CHECK: %[[sem_in:.*]] = arith.constant 19 : i32
// CHECK: %[[sem_out:.*]] = arith.constant 2 : i32
// CHECK: call @_mlir_apfloat_convert(%[[sem_in]], %[[sem_out]], %{{.*}}) : (i32, i32, i64) -> i64
func.func @extf(%arg0: f4E2M1FN) {
@@ -142,7 +142,7 @@ func.func @extf(%arg0: f4E2M1FN) {
// CHECK: func.func private @_mlir_apfloat_convert(i32, i32, i64) -> i64
// CHECK: %[[sem_in:.*]] = arith.constant 1 : i32
-// CHECK: %[[sem_out:.*]] = arith.constant 18 : i32
+// CHECK: %[[sem_out:.*]] = arith.constant 19 : i32
// CHECK: call @_mlir_apfloat_convert(%[[sem_in]], %[[sem_out]], %{{.*}}) : (i32, i32, i64) -> i64
func.func @truncf(%arg0: bf16) {
%0 = arith.truncf %arg0 : bf16 to f4E2M1FN
@@ -178,7 +178,7 @@ func.func @fptoui(%arg0: f16) {
// -----
// CHECK: func.func private @_mlir_apfloat_convert_from_int(i32, i32, i1, i64) -> i64
-// CHECK: %[[sem_out:.*]] = arith.constant 18 : i32
+// CHECK: %[[sem_out:.*]] = arith.constant 19 : i32
// CHECK: %[[in_width:.*]] = arith.constant 32 : i32
// CHECK: %[[is_unsigned:.*]] = arith.constant false
// CHECK: %[[res:.*]] = call @_mlir_apfloat_convert_from_int(%[[sem_out]], %[[in_width]], %[[is_unsigned]], %{{.*}}) : (i32, i32, i1, i64) -> i64
@@ -190,7 +190,7 @@ func.func @sitofp(%arg0: i32) {
// -----
// CHECK: func.func private @_mlir_apfloat_convert_from_int(i32, i32, i1, i64) -> i64
-// CHECK: %[[sem_out:.*]] = arith.constant 18 : i32
+// CHECK: %[[sem_out:.*]] = arith.constant 19 : i32
// CHECK: %[[in_width:.*]] = arith.constant 32 : i32
// CHECK: %[[is_unsigned:.*]] = arith.constant true
// CHECK: %[[res:.*]] = call @_mlir_apfloat_convert_from_int(%[[sem_out]], %[[in_width]], %[[is_unsigned]], %{{.*}}) : (i32, i32, i1, i64) -> i64
@@ -202,7 +202,7 @@ func.func @uitofp(%arg0: i32) {
// -----
// CHECK: func.func private @_mlir_apfloat_compare(i32, i64, i64) -> i8
-// CHECK: %[[sem:.*]] = arith.constant 18 : i32
+// CHECK: %[[sem:.*]] = arith.constant 19 : i32
// CHECK: %[[cmp:.*]] = call @_mlir_apfloat_compare(%[[sem]], %{{.*}}, %{{.*}}) : (i32, i64, i64) -> i8
// CHECK: %[[c3:.*]] = arith.constant 3 : i8
// CHECK: %[[is_unordered:.*]] = arith.cmpi eq, %[[cmp]], %[[c3]] : i8
@@ -243,7 +243,7 @@ func.func @flush_denormals(%arg0: f32) {
// CHECK: func.func private @_mlir_apfloat_flush_denormals(i32, i64) -> i64
// CHECK-LABEL: func.func @flush_denormals_f8
-// CHECK: %[[sem:.*]] = arith.constant 10 : i32
+// CHECK: %[[sem:.*]] = arith.constant 11 : i32
// CHECK: call @_mlir_apfloat_flush_denormals(%[[sem]], %{{.*}}) : (i32, i64) -> i64
func.func @flush_denormals_f8(%arg0: f8E4M3FN) {
%0 = arith.flush_denormals %arg0 : f8E4M3FN
diff --git a/mlir/test/Conversion/ArithAndMathToAPFloat/math-to-apfloat.mlir b/mlir/test/Conversion/ArithAndMathToAPFloat/math-to-apfloat.mlir
index 2fe1d0cda1e387..375a4e93bbf133 100644
--- a/mlir/test/Conversion/ArithAndMathToAPFloat/math-to-apfloat.mlir
+++ b/mlir/test/Conversion/ArithAndMathToAPFloat/math-to-apfloat.mlir
@@ -29,7 +29,7 @@ func.func @full_example() {
// CHECK: %[[CONSTANT_0:.*]] = arith.constant -1.375000e+00 : f8E4M3FN
// CHECK: %[[BITCAST_0:.*]] = arith.bitcast %[[CONSTANT_0]] : f8E4M3FN to i8
// CHECK: %[[EXTUI_0:.*]] = arith.extui %[[BITCAST_0]] : i8 to i64
-// CHECK: %[[CONSTANT_1:.*]] = arith.constant 10 : i32
+// CHECK: %[[CONSTANT_1:.*]] = arith.constant 11 : i32
// CHECK: %[[VAL_0:.*]] = call @_mlir_apfloat_abs(%[[CONSTANT_1]], %[[EXTUI_0]]) : (i32, i64) -> i64
// CHECK: %[[TRUNCI_0:.*]] = arith.trunci %[[VAL_0]] : i64 to i8
// CHECK: %[[BITCAST_1:.*]] = arith.bitcast %[[TRUNCI_0]] : i8 to f8E4M3FN
@@ -42,25 +42,25 @@ func.func @full_example() {
// CHECK: %[[EXTUI_2:.*]] = arith.extui %[[BITCAST_3]] : i8 to i64
// CHECK: %[[BITCAST_4:.*]] = arith.bitcast %[[CONSTANT_4]] : f8E8M0FNU to i8
// CHECK: %[[EXTUI_3:.*]] = arith.extui %[[BITCAST_4]] : i8 to i64
-// CHECK: %[[CONSTANT_5:.*]] = arith.constant 15 : i32
+// CHECK: %[[CONSTANT_5:.*]] = arith.constant 16 : i32
// CHECK: %[[VAL_1:.*]] = call @_mlir_apfloat_fused_multiply_add(%[[CONSTANT_5]], %[[EXTUI_1]], %[[EXTUI_2]], %[[EXTUI_3]]) : (i32, i64, i64, i64) -> i64
// CHECK: %[[TRUNCI_1:.*]] = arith.trunci %[[VAL_1]] : i64 to i8
// CHECK: %[[BITCAST_5:.*]] = arith.bitcast %[[TRUNCI_1]] : i8 to f8E8M0FNU
// CHECK: %[[BITCAST_6:.*]] = arith.bitcast %[[CONSTANT_0]] : f8E4M3FN to i8
// CHECK: %[[EXTUI_4:.*]] = arith.extui %[[BITCAST_6]] : i8 to i64
-// CHECK: %[[CONSTANT_6:.*]] = arith.constant 10 : i32
+// CHECK: %[[CONSTANT_6:.*]] = arith.constant 11 : i32
// CHECK: %[[VAL_2:.*]] = call @_mlir_apfloat_isinfinite(%[[CONSTANT_6]], %[[EXTUI_4]]) : (i32, i64) -> i1
// CHECK: %[[BITCAST_7:.*]] = arith.bitcast %[[CONSTANT_0]] : f8E4M3FN to i8
// CHECK: %[[EXTUI_5:.*]] = arith.extui %[[BITCAST_7]] : i8 to i64
-// CHECK: %[[CONSTANT_7:.*]] = arith.constant 10 : i32
+// CHECK: %[[CONSTANT_7:.*]] = arith.constant 11 : i32
// CHECK: %[[VAL_3:.*]] = call @_mlir_apfloat_isnan(%[[CONSTANT_7]], %[[EXTUI_5]]) : (i32, i64) -> i1
// CHECK: %[[BITCAST_8:.*]] = arith.bitcast %[[CONSTANT_0]] : f8E4M3FN to i8
// CHECK: %[[EXTUI_6:.*]] = arith.extui %[[BITCAST_8]] : i8 to i64
-// CHECK: %[[CONSTANT_8:.*]] = arith.constant 10 : i32
+// CHECK: %[[CONSTANT_8:.*]] = arith.constant 11 : i32
// CHECK: %[[VAL_4:.*]] = call @_mlir_apfloat_isnormal(%[[CONSTANT_8]], %[[EXTUI_6]]) : (i32, i64) -> i1
// CHECK: %[[BITCAST_9:.*]] = arith.bitcast %[[CONSTANT_0]] : f8E4M3FN to i8
// CHECK: %[[EXTUI_7:.*]] = arith.extui %[[BITCAST_9]] : i8 to i64
-// CHECK: %[[CONSTANT_9:.*]] = arith.constant 10 : i32
+// CHECK: %[[CONSTANT_9:.*]] = arith.constant 11 : i32
// CHECK: %[[VAL_5:.*]] = call @_mlir_apfloat_isfinite(%[[CONSTANT_9]], %[[EXTUI_7]]) : (i32, i64) -> i1
// CHECK: return
// CHECK: }
More information about the Mlir-commits
mailing list