JIT: clear patchpoint flags during block split (#46637)
authorAndy Ayers <andya@microsoft.com>
Wed, 6 Jan 2021 21:09:26 +0000 (13:09 -0800)
committerGitHub <noreply@github.com>
Wed, 6 Jan 2021 21:09:26 +0000 (13:09 -0800)
We only want the patchpoint flags to apply to the original block,
not the split remainder block.

src/coreclr/jit/flowgraph.cpp

index cab86e8..e70f192 100644 (file)
@@ -9642,8 +9642,9 @@ BasicBlock* Compiler::fgSplitBlockAtEnd(BasicBlock* curr)
     newBlock->bbFlags = curr->bbFlags;
 
     // Remove flags that the new block can't have.
-    newBlock->bbFlags &= ~(BBF_TRY_BEG | BBF_LOOP_HEAD | BBF_LOOP_CALL0 | BBF_LOOP_CALL1 | BBF_HAS_LABEL |
-                           BBF_JMP_TARGET | BBF_FUNCLET_BEG | BBF_LOOP_PREHEADER | BBF_KEEP_BBJ_ALWAYS);
+    newBlock->bbFlags &=
+        ~(BBF_TRY_BEG | BBF_LOOP_HEAD | BBF_LOOP_CALL0 | BBF_LOOP_CALL1 | BBF_HAS_LABEL | BBF_JMP_TARGET |
+          BBF_FUNCLET_BEG | BBF_LOOP_PREHEADER | BBF_KEEP_BBJ_ALWAYS | BBF_PATCHPOINT | BBF_BACKWARD_JUMP_TARGET);
 
     // Remove the GC safe bit on the new block. It seems clear that if we split 'curr' at the end,
     // such that all the code is left in 'curr', and 'newBlock' just gets the control flow, then