[PATCH] D98729: Mark gc.relocate and gc.result as readnone (try 2)

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 16 11:47:58 PDT 2021


reames created this revision.
reames added a reviewer: skatkov.
Herald added subscribers: dantrushin, mcrosier.
Herald added a reviewer: bollu.
reames requested review of this revision.
Herald added a subscriber: jdoerfert.
Herald added a project: LLVM.

As noted in the LangRef, these are semantically readnone projections from the result value of the associated statepoint.  However, it turned out we had a few latent bugs being covered up by the fact we were only marking them readonly (see PR49607 for context).

As of this change, all known issues are resolved.  This is a deliberately minimal patch to make it easy to test downstream and revert with minimal change if that turns out to be necessary.

Depends on:

- D98728 <https://reviews.llvm.org/D98728> [LICM] Fix a crash when sinking instructions w/token operands


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98729

Files:
  llvm/include/llvm/IR/Intrinsics.td


Index: llvm/include/llvm/IR/Intrinsics.td
===================================================================
--- llvm/include/llvm/IR/Intrinsics.td
+++ llvm/include/llvm/IR/Intrinsics.td
@@ -1182,11 +1182,11 @@
                                 ImmArg<ArgIndex<4>>]>;
 
 def int_experimental_gc_result   : Intrinsic<[llvm_any_ty], [llvm_token_ty],
-                                             [IntrReadMem]>;
+                                             [IntrNoMem]>;
 def int_experimental_gc_relocate : Intrinsic<[llvm_any_ty],
                                              [llvm_token_ty, llvm_i32_ty,
                                               llvm_i32_ty],
-                                             [IntrReadMem, ImmArg<ArgIndex<1>>,
+                                             [IntrNoMem, ImmArg<ArgIndex<1>>,
                                               ImmArg<ArgIndex<2>>]>;
 
 //===------------------------ Coroutine Intrinsics ---------------===//


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98729.331051.patch
Type: text/x-patch
Size: 972 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210316/6e7ef569/attachment.bin>


More information about the llvm-commits mailing list