Skip to content

Don't cause flag spill in gc transition end/pause expansion #124

Description

Currently we generate the following code leading to the post-pinvoke check for GC:

    CMP32mi8 %RCX<kill>, 1, %noreg, 0, %noreg, 0, %EFLAGS<imp-def>; mem:LD4[bitcast (i64* @CaptureThreadGlobal to i32*)]
    %EDX<def> = COPY %EFLAGS
    MOV32mr %RBP, 1, %noreg, -92, %noreg, %EDX<kill>; mem:ST4[FixedStack12]
    JE_1 <BB#8>, %EFLAGS<imp-use>

We should be able to avoid the flag spill by passing the flag value to the pause, instead of the result of the flag compare.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions