[PATCH] D136234: [RFC][GISel] Add a way to ignore COPY instructions in InstructionSelector

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 03:44:06 PST 2023


arsenm accepted this revision.
arsenm added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstructions.td:2046
 
-// Definition from ISA doc:
-// (y & x) | (z & ~x)
-def : AMDGPUPat <
-  (DivergentBinFrag<or> (and i32:$y, i32:$x), (and i32:$z, (not i32:$x))),
-  (V_BFI_B32_e64 (COPY_TO_REGCLASS VSrc_b32:$x, VGPR_32),
-                 (COPY_TO_REGCLASS VSrc_b32:$y, VGPR_32),
-                 (COPY_TO_REGCLASS VSrc_b32:$z, VGPR_32))
->;
+let GIIgnoreCopies = 1 in {
+  // Definition from ISA doc:
----------------
I think it's cleaner to hide these in an AMDGPUPat subclass, like AMDGPUPatIgnoreCopies 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136234



More information about the llvm-commits mailing list