[Mlir-commits] [mlir] [mlir][arith] Improve `extf` folder (PR #80232)

Jakub Kuderski llvmlistbot at llvm.org
Thu Feb 1 09:31:44 PST 2024


================
@@ -701,6 +701,15 @@ func.func @extFPConstant() -> f64 {
   return %0 : f64
 }
 
+// CHECK-LABEL: @extFPVectorConstant
+//       CHECK:   %[[cres:.+]] = arith.constant dense<[0.000000e+00, 1.000000e+00]> : vector<2xf128>
+//       CHECK:   return %[[cres]]
+func.func @extFPVectorConstant() -> vector<2xf128> {
----------------
kuhar wrote:

This is the case for f8m2e5fnuz and f16 but I don't know how to find/generate the exact number:
```
  EXPECT_FALSE(APFloat::isRepresentableAsNormalIn(APFloat::Float8E5M2FNUZ(), APFloat::IEEEhalf()));
```

Any suggestions on getting the constant? Maybe @krzysz00 knows?

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


More information about the Mlir-commits mailing list