Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sve gather scatter offset sinking #66994

Commits on Sep 20, 2023

  1. [SVE][CodeGenPrepare] Sink address calculations that match SVE gather…

    …/scatter addressing modes.
    
    SVE supports scalar+vector and scalar+extw(vector) addressing modes.
    However, the masked gather/scatter intrinsics take a vector of
    addresses, which means address computations can be hoisted out of
    loops.  The is especially true for things like offsets where the
    true size of offsets is lost by the time you get to code generation.
    
    This is problematic because it forces the code generator to legalise
    towards `<vscale x 2 x ty>` vectors that will not maximise bandwidth
    if the main block datatypes is in fact i32 or smaller.
    
    This patch sinks GEPs and extends for cases where one of the above
    addressing modes can be used.
    
    NOTE: There are cases where it would be better to split the extend
    in two with one half hoisted out of a loop and the other within the
    loop.  Whilst true I think this switch of default is still better
    than before because the extra extends are an improvement over being
    forced to split a gather/scatter.
    paulwalker-arm committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    efb9e83 View commit details
    Browse the repository at this point in the history