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

Gaurav Jain via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 15:54:06 PST 2020


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


================
Comment at: llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp:142
   unsigned CmpSubReg = AndCC->getSubReg();
-  if (CmpReg == ExecReg) {
+  if (CmpReg == Register(ExecReg)) {
     AndCC = &And->getOperand(2);
----------------
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.


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