[PATCH] D90724: [NFC] Use Register/MCRegister

Gaurav Jain via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 4 10:06:56 PST 2020


gjain added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp:142
   unsigned CmpSubReg = AndCC->getSubReg();
-  if (CmpReg == ExecReg) {
+  if (CmpReg == Register(ExecReg)) {
     AndCC = &And->getOperand(2);
----------------
mtrofin wrote:
> gjain wrote:
> > Does it make sense that instead of converting a MCRegister to a Register we should just compare the id's? I would think we we'd want to avoid easy conversions of MCRegister to Register.
> > 
> > Another options is we actually provide a comparison operator between MCRegister and Register.
> Probably a pair == & != operators would be reasonable; I hit this a couple of times... hmm... may be best to do it in one swoop.
> 
> I'd add them in a subsequent patch, wdyt?
Of course!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90724



More information about the llvm-commits mailing list