[PATCH] D154766: [GlobalISel] convergent intrinsics

Yashwant Singh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 8 11:04:06 PDT 2023


yassingh added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/MachineInstr.h:1373-1383
+  bool isIntrinsic() const {
+    switch (getOpcode()) {
+    case TargetOpcode::G_INTRINSIC:
+    case TargetOpcode::G_INTRINSIC_W_SIDE_EFFECTS:
+    case TargetOpcode::G_INTRINSIC_CONVERGENT:
+    case TargetOpcode::G_INTRINSIC_CONVERGENT_W_SIDE_EFFECTS:
+      return true;
----------------
Can this fit in GenericMachineInstrs.h? Also the name can be modified a bit to reflect it only queries generic instructions.


================
Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:1520
       if (!NoSideEffects && !DeclHasSideEffects) {
         report("G_INTRINSIC_W_SIDE_EFFECTS used with readnone intrinsic", MI);
         break;
----------------
Will these error messages suffice for CONVERGENT intrinsics too? 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154766/new/

https://reviews.llvm.org/D154766



More information about the llvm-commits mailing list