[PATCH] D73030: GlobalISel: Assume G_INTRINSIC* are convergent

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 20 04:35:39 PST 2020


arsenm created this revision.
arsenm added reviewers: aemerson, paquette, aditya_nandakumar, dsanders.
Herald added subscribers: Petar.Avramovic, rovka, wdng.
Herald added a project: LLVM.

This is safer in case anyone tries to run MI optimization passes on
pre-selected MIR. If there turns out to be a real reason to do this,
we might need to add separate convergent intrinsic opcodes.


https://reviews.llvm.org/D73030

Files:
  llvm/include/llvm/Target/GenericOpcodes.td


Index: llvm/include/llvm/Target/GenericOpcodes.td
===================================================================
--- llvm/include/llvm/Target/GenericOpcodes.td
+++ llvm/include/llvm/Target/GenericOpcodes.td
@@ -960,6 +960,10 @@
   let OutOperandList = (outs);
   let InOperandList = (ins unknown:$intrin, variable_ops);
   let hasSideEffects = 0;
+
+  // Conservatively assume this is convergent. If there turnes out to
+  // be a need, there should be separate convergent intrinsic opcode.s
+  let isConvergent = 1;
 }
 
 // Intrinsic with side effects.
@@ -969,6 +973,10 @@
   let hasSideEffects = 1;
   let mayLoad = 1;
   let mayStore = 1;
+
+  // Conservatively assume this is convergent. If there turnes out to
+  // be a need, there should be separate convergent intrinsic opcode.s
+  let isConvergent = 1;
 }
 
 //------------------------------------------------------------------------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73030.239076.patch
Type: text/x-patch
Size: 906 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200120/c26542ea/attachment.bin>


More information about the llvm-commits mailing list