[PATCH] D52677: [AMDGPU] Match v_swap_b32

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 1 21:44:52 PDT 2018


rampitec marked 5 inline comments as done.
rampitec added inline comments.


================
Comment at: lib/Target/AMDGPU/SIInstrInfo.h:234-238
+static bool instReadsReg(const MachineInstr *MI,
+                         unsigned Reg, unsigned SubReg,
+                         const SIRegisterInfo &TRI) {
+  return instAccessReg(MI->uses(), Reg, SubReg, TRI);
+}
----------------
arsenm wrote:
> How is this different from MachineInstr::readsRegister? Does that just to add a subreg operand?
Yes, reads/modifiesRegister would return true if a super-register is modified even if a particular lane of interest does not. Some of the foldings in the test would fail if I use it.


https://reviews.llvm.org/D52677





More information about the llvm-commits mailing list