HomePhabricator

[CodeGen] Fix hashing for MO_ExternalSymbol MachineOperands.

Authored by efriedma on May 31 2019, 5:08 PM.

Description

[CodeGen] Fix hashing for MO_ExternalSymbol MachineOperands.

We were hashing the string pointer, not the string, so two instructions
could be identical (isIdenticalTo), but have different hash codes.

This showed up as a very rare, non-deterministic assertion failure
rehashing a DenseMap constructed by MachineOutliner. So there's no
"real" testcase, just a unittest which checks that the hash function
behaves correctly.

I'm a little scared fixing this is going to cause a regression in
outlining or MachineCSE, but hopefully we won't run into any issues.

Differential Revision: https://reviews.llvm.org/D61975

llvm-svn: 362281

Details

Committed
efriedmaMay 31 2019, 5:08 PM
Differential Revision
D61975: [CodeGen] Fix hashing for MO_ExternalSymbol MachineOperands.
Parents
rGeb4d6142dcd5: [COFF, ARM64] Add CodeView register mapping
Branches
Unknown
Tags
Unknown