HomePhabricator

[SROA] Teach SROA to perform no-op pointer conversion.

Authored by hliao on Jun 15 2020, 10:17 PM.

Description

[SROA] Teach SROA to perform no-op pointer conversion.

Summary:

  • When promoting a pointer from memory to register, SROA skips pointers from different address spaces. However, as ptrtoint and inttoptr are defined as no-op casts if that integer type has the same as the pointer value, generate the pair of ptrtoint/inttoptr (no-op cast) sequence to convert pointers from different address spaces if they have the same size.

Reviewers: arsenm, chandlerc, lebedev.ri

Subscribers:

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

Details

Committed
hliaoJun 22 2020, 10:49 PM
Differential Revision
D81943: [SROA] Teach SROA to perform no-op pointer conversion.
Parents
rG9bff376e5c10: [InstCombine] Replace selects with Phis
Branches
Unknown
Tags
Unknown