[PATCH] D119533: [MC] Define and use MCRegisterInfo::regsOverlap
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 11 02:49:23 PST 2022
foad added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:422
+ if (RegA.isPhysical() && RegB.isPhysical())
+ return MCRegisterInfo::regsOverlap(RegA.asMCReg(), RegB.asMCReg());
return false;
----------------
Seems like I need MCRegisterInfo:: here because the overloads can't be disambiguated from the argument type, Register vs MCRegister.
================
Comment at: llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:3380
if (Src.isReg()) {
- const unsigned SrcReg = mc2PseudoReg(Src.getReg());
- if (isRegIntersect(DstReg, SrcReg, TRI)) {
+ if (TRI->regsOverlap(Dst.getReg(), Src.getReg())) {
+ const unsigned SrcReg = mc2PseudoReg(Src.getReg());
----------------
I no longer call mc2PseudoReg on the arguments here because I don't understand what it's for. Is that OK?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119533/new/
https://reviews.llvm.org/D119533
More information about the llvm-commits
mailing list