[EarlyCSE] Common gc.relocate calls.
authorDenis Antrushin <dantrushin@gmail.com>
Fri, 22 May 2020 14:03:02 +0000 (17:03 +0300)
committerDenis Antrushin <dantrushin@gmail.com>
Tue, 2 Jun 2020 09:25:43 +0000 (12:25 +0300)
commit3c626c714c9d1521b57ff07b1211f9d21cbeceef
tree54742c06b3c4d295471d78cd102d69082a167e0b
parentcbfae97ca82b11ab2b54562055c49817baa1e26b
[EarlyCSE] Common gc.relocate calls.

gc.relocate intrinsic is special in that its second and third operands
are not real values, but indices into relocate's parent statepoint list
of GC pointers.
To be CSE'd, they need special handling in `isEqual()` and `getHashCode()`.

Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D80445
llvm/lib/Transforms/Scalar/EarlyCSE.cpp
llvm/test/Transforms/EarlyCSE/gc_relocate.ll [new file with mode: 0644]