[PATCH] D38789: MachineInstr: Force isDef to match in isIdenticalTo
Krzysztof Parzyszek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 11 06:51:15 PDT 2017
kparzysz added a comment.
Here's a comment from `include/llvm/CodeGen/MachineInstr.h` (definition of `MachineInstrExpressionTrait`)
/// Special DenseMapInfo traits to compare MachineInstr* by *value* of the
/// instruction rather than by pointer value.
/// The hashing and equality testing functions ignore definitions so this is
/// useful for CSE, etc.
The `isEqual` function explicitly requests `IgnoreVRegDefs`, supposedly on the basis that `getHashValue` would do the same. Your observation is that this is not the case. Assuming that this comment was true at some point, it may be worthwhile to check how the deviation was introduced.
https://reviews.llvm.org/D38789
More information about the llvm-commits
mailing list