-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
performanceMust go fasterMust go fasterupstreamThe issue is with an upstream dependency, e.g. LLVMThe issue is with an upstream dependency, e.g. LLVM
Description
Currently, f(x,y,z) = @fastmath muladd(x, y, -z) generates an explicit negation operation for the -z in the case of floating-point arguments, as can be seen by @code_native f(3.0, 4.0, 5.0). Similarly for muladd(-x, y, z) etcetera.
In #9881, @yuyichao indicated that this was due to the FastSel optimization in LLVM.
As I mentioned in #6330, it would be good to have access to fused multiply-subtract and similar operations. LLVM doesn't provide intrinsics for these, but it would be good to have a way to write code that LLVM can transform into such instructions when they are available, and that will avoid explicit negations when fused operations aren't available.
cc: @eschnett, @simonbyrne
Metadata
Metadata
Assignees
Labels
performanceMust go fasterMust go fasterupstreamThe issue is with an upstream dependency, e.g. LLVMThe issue is with an upstream dependency, e.g. LLVM