Skip to content

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

@AndyAyersMS

Description

@AndyAyersMS

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.

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