[PATCH] D70698: [CodeGen] Fix hashing for RegMask operands.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 07:49:40 PST 2019


arsenm added a comment.

I think the way register masks are used, the pointer value is almost OK. The typical case is a tablgenerated target constant, which will be a unique address. The IPRA case does use non-constants, and I don't think it tries to unique them (although I suppose it could)



================
Comment at: llvm/unittests/CodeGen/MachineOperandTest.cpp:416-418
+  ASSERT_NE(&Mask1, &Mask2);
+  ASSERT_EQ(hash_value(MO1), hash_value(MO2));
+  ASSERT_TRUE(MO1.isIdenticalTo(MO2));
----------------
These should use EXPECT


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70698





More information about the llvm-commits mailing list