[Mlir-commits] [mlir] [MLIR][Math] add canonicalize-f32-promotion	pass (PR #92482)
    Krzysztof Drewniak 
    llvmlistbot at llvm.org
       
    Wed May 22 06:51:01 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) {
----------------
krzysz00 wrote:
I propose the one stage approach because it *doesn't* optimize explicit truncf / extf pairs 
Explicitly rewriting away all truncf/extf pairs shouldn't be hiding in a type legalization. The legalization can, using the one stage approach, refrain from creating such pairs to improve numerical precision, but it should not eliminate existing ones.
https://github.com/llvm/llvm-project/pull/92482
    
    
More information about the Mlir-commits
mailing list