[PATCH] D30038: [ADMGPU] SDWA peephole optimization pass.
Sam Kolton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 9 03:03:33 PST 2017
SamWot added inline comments.
================
Comment at: lib/Target/AMDGPU/SIPeepholeSDWA.cpp:218
+
+static bool isSubregOf(const MachineOperand &SubReg,
+ const MachineOperand &SuperReg,
----------------
rampitec wrote:
> TRI->getMatchingSuperReg() or TRI->getMatchingSuperRegClass() maybe?
This functions work with physical registers if I understand correctly, and I need to work with virtual regs.
================
Comment at: lib/Target/AMDGPU/SIPeepholeSDWA.cpp:231
+ LaneBitmask::Type SuperMask =
+ TRI->getSubRegIndexLaneMask(SuperReg.getSubReg()).getAsInteger();
+ LaneBitmask::Type SubMask =
----------------
rampitec wrote:
> No need to convert lanemask to integer and back.
I only convert from LaneBitmask to integer. This is done because getSubRegIndexLaneMask takes integer as input.
https://reviews.llvm.org/D30038
More information about the llvm-commits
mailing list