[Mlir-commits] [mlir] [MLIR][Math] add canonicalize-f32-promotion pass (PR #92482)

Zhennan Qin llvmlistbot at llvm.org
Wed May 22 16:49:03 PDT 2024


================
@@ -109,4 +135,14 @@ void LegalizeToF32Pass::runOnOperation() {
   math::populateLegalizeToF32Patterns(patterns, typeConverter);
   if (failed(applyPartialConversion(op, target, std::move(patterns))))
     return signalPassFailure();
+  
+  if (useCanonicalizeF32Promotion) {
----------------
ZhennanQin wrote:

@krzysz00  May I know what's the difference between the existing truncf / extf and auto-generated ones? Why we can only eliminate the truncf / extf generated from `legalize-to-f32`, but not from any other passes? Would you please provide a use scenario?

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


More information about the Mlir-commits mailing list