-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMItenet-performancePerformance related issuePerformance related issue
Milestone
Description
Repro:
static float Lerp(float v0, float v1, float t) =>
MathF.FusedMultiplyAdd(t, v1,
MathF.FusedMultiplyAdd(-t, v0, v0));arm64:
; Method Program:Lerp(float,float,float):float
G_M22020_IG01: ;; offset=0000H
A9BF7BFD stp fp, lr, [sp,#-16]!
910003FD mov fp, sp
;; bbWeight=1 PerfScore 1.50
G_M22020_IG02: ;; offset=0008H
1E204010 fmov s16, s0
1E204000 fmov s0, s0
1E204051 fmov s17, s2
1F11C000 fmsub s0, s0, s17, s16
1E204000 fmov s0, s0
1E204021 fmov s1, s1
1E204042 fmov s2, s2
1F020020 fmadd s0, s1, s2, s0
;; bbWeight=1 PerfScore 9.00
G_M22020_IG03: ;; offset=0028H
A8C17BFD ldp fp, lr, [sp],#16
D65F03C0 ret lr
;; bbWeight=1 PerfScore 2.00
; Total bytes of code: 48namely:
1E204000 fmov s0, s0
1E204021 fmov s1, s1
1E204042 fmov s2, s2Expected codegen: https://godbolt.org/z/9e91zE3j3
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMItenet-performancePerformance related issuePerformance related issue