HomePhabricator

[OpaquePtr] Handle addrspacecasts in InstCombine

Authored by nikic on Jun 21 2021, 1:32 PM.

Description

[OpaquePtr] Handle addrspacecasts in InstCombine

This adds support for addrspace casts involving opaque pointers to
InstCombine, as well as the isEliminableCastPair() helper
(otherwise the assertion failure would just move there).

Add PointerType::hasSameElementTypeAs() to hide the element type
details.

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