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

Fix lowering of must_preserve_tags memset without capabilities #734

Merged

Commits on Apr 15, 2024

  1. [CHERI-Generic] Add baseline test for capability copies from a constant

    Copying from a zero-constant can be optimized to a memset() and should
    therefore not trigger the underaligned capability warnings. This is also
    a baseline test for a crash found in the Morello backend where this
    memcpy->memset optimization triggers an assertion in
    diagnoseInefficientCheriMemOp().
    arichardson committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    36f1c53 View commit details
    Browse the repository at this point in the history
  2. [SelectionDAG] Handle ISD::PTRADD in isMemSrcFromConstant()

    Noticed while writing tests for copying capabilities from constants.
    arichardson committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    8ce084e View commit details
    Browse the repository at this point in the history
  3. [SelectionDAG] Lower must_preserve_tags memset without capabilities

    When a must_preserve_tags memcpy is converted to a memset, we may end up
    using a non-capability MVT as the copy type. This change allow us to use
    inline integer memset lowering for copies from zero constants that are
    not necessarily sufficiently aligned. This also fixes an assertion
    found while compiling ICU4C for Morello where a copy from a large zero
    constant was lowered using NEON registers instead of capability ones.
    arichardson committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    91363bf View commit details
    Browse the repository at this point in the history