[Mlir-commits] [flang] [mlir] [RFC][mlir] Conditional support for fast-math attributes. (PR #125620)
    Jakub Kuderski 
    llvmlistbot at llvm.org
       
    Tue Feb  4 08:30:02 PST 2025
    
    
  
kuhar wrote:
> For example, it enables vectorization of loops with min/max reductions in LLVM. Flang is currently producing `arith.select` without fast-math attrs.
> 
> In general, in LLVM any instruction that produces a floating point result may have fast-math flags. This includes FP PHIs and selects.
Can you link to some example that shows why this is necessary? I'd think that `arith.select` preserves bitpatterns of its operands, so I struggle to see why it needs fast math flags; if llvm needs them, couldn't it calculate them as the intersection of the fast math flags of the operands?
https://github.com/llvm/llvm-project/pull/125620
    
    
More information about the Mlir-commits
mailing list