-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.Performancearch-loong64Issues solely affecting the loongson architecture.Issues solely affecting the loongson architecture.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
Description
This issue is mainly for tracking the implementation progress of various low-hanging fruits regarding loong64 optimizations.
There are many missed optimization chances on loong64. A quick survey on SSA intrinsics uncovers:
-
runtime.publicationBarrierdmb stonarm64dbar 0x1Aon LA64 v1.10+ (gracefully downgrading todbar 0on LA64 v1.00) CL 577515
-
runtime.Bswap{32,64}revb.{2w,d}on LA64 v1.00: CL 483357
-
runtime/internal/sys.Prefetch{,Streamed}preldon LA64 v1.00
-
runtime/internal/atomic.{And,Or}am{and,or}.don LA64 v1.00: CL 482756
- ❗
not possible with LA64 v1.00math.{Trunc,Ceil,Floor,RoundToEven}- LA64 v1.00
frint.[sd]is not orthogonal: no fixed rounding mode variants (unlike e.g.ftintr{m,p,z,ne}).
- LA64 v1.00
- ❓
math.Roundfrint.[sd]on LA64 v1.00 -- have to check if the rounding mode behavior is tolerable
-
math.Absfabs.[sd]on LA64 v1.00: CL 580280
-
math.Copysignfcopysign.[sd]on LA64 v1.00: CL 580280
-
math.FMAf{,n}m{add,sub}.[sd]on LA64 v1.00: CL 483355
-
math/bits.TrailingZeros{64,32}(ssa.OpCtz{64,32})ctz.[wd]on LA64 v1.00: CL 479498
-
math/bits.Len{64,32,}(ssa.OpBitLen{64,32})clz.[wd]on LA64 v1.00: CL 483356significant performance regression across the board, needs investigationconfirmed to be micro-architecture quirk, alleviated somewhat by various alignment tricks
-
math/bits.Reverse{64,32,8}(ssa.OpBitRev{64,32,8})bitrev.{d,w,4b}on LA64 v1.00: CL 483656
We may want to implement (and preferably benchmark) all of the above.
cc @golang/loong64
Metadata
Metadata
Assignees
Labels
NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.Performancearch-loong64Issues solely affecting the loongson architecture.Issues solely affecting the loongson architecture.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.