[PATCH] D133637: Bug fix on stable hash calculation for machine operands RegisterMask and RegisterLiveOut

Kyungwoo Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 10 08:02:22 PDT 2022


kyulee added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineStableHash.cpp:123
   case MachineOperand::MO_RegisterLiveOut:
-    return hash_combine(MO.getType(), MO.getTargetFlags(), MO.getRegMask());
+    return hash_combine(MO.getType(), MO.getTargetFlags(), *MO.getRegMask());
 
----------------
Strictly speaking, the mask pointer can be invalid or the mask size can be longer than int value. 
Should we iterate it similar to https://github.com/llvm/llvm-project/blob/main/llvm/lib/CodeGen/MachineOperand.cpp#L318?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133637



More information about the llvm-commits mailing list