Skip to content
  • Stephen Lin's avatar
    AArch64/PowerPC/SystemZ/X86: This patch fixes the interface, usage, and all · 73de7bf5
    Stephen Lin authored
    in-tree implementations of TargetLoweringBase::isFMAFasterThanMulAndAdd in
    order to resolve the following issues with fmuladd (i.e. optional FMA)
    intrinsics:
    
    1. On X86(-64) targets, ISD::FMA nodes are formed when lowering fmuladd
    intrinsics even if the subtarget does not support FMA instructions, leading
    to laughably bad code generation in some situations.
    
    2. On AArch64 targets, ISD::FMA nodes are formed for operations on fp128,
    resulting in a call to a software fp128 FMA implementation.
    
    3. On PowerPC targets, FMAs are not generated from fmuladd intrinsics on types
    like v2f32, v8f32, v4f64, etc., even though they promote, split, scalarize,
    etc. to types that support hardware FMAs.
    
    The function has also been slightly renamed for consistency and to force a
    merge/build conflict for any out-of-tree target implementing it. To resolve,
    see comments and fixed in-tree examples.
    
    llvm-svn: 185956
    73de7bf5
Loading