Uh oh!
There was an error while loading. Please reload this page.
Optimize "(vec & cns) == zero" on arm64 - #102705
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
EgorBo
commented
May 26, 2024
@EgorBot -arm64 -profiler usingBenchmarkDotNet.Attributes;usingSystem.Buffers;usingSystem.Text;usingBenchmarkDotNet.Running;BenchmarkRunner.Run<Perf_Ascii>(args:args);[DisassemblyDiagnoser(maxDepth:5)]publicclassPerf_Ascii{byte[]_bytes=newbyte[128];char[]_characters=newchar[128];[Benchmark]publicOperationStatusToUtf16()=>Ascii.ToUtf16(_bytes,_characters,out_);} |
EgorBot
commented
May 27, 2024
Results on Arm64
See BDN_Artifacts.zip for details. 🔥ProfilerFlame graphs: Main vs PR (interactive!) NotesFor clean |
| // If op is "vec & cnsVec" where both u64 components in that cnsVec are the same (for both SIMD12 and | ||
| // SIMD16) then we'd better do this AND on top of TYP_LONG NI_AdvSimd_Extract in the end - it produces a | ||
| // more optimal codegen. | ||
| if (op->OperIsHWIntrinsic(NI_AdvSimd_And) && op->AsHWIntrinsic()->Op(2)->OperIs(GT_CNS_VEC)) |
There was a problem hiding this comment.
This doesn't have to be a constant right?
Just any (x & y) == zero or (x & y) != zero can be optimzied down to a tst (on both xarch and arm64).
Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it. |
xtqqczze
commented
Jul 18, 2024
Blocks #105047. |
Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it. |
Fixes#100922 regression - it was regressed by #99982
Main:
PR: