Closed
Description
I tried to disable the opaque pointer in rust-lang/rust#115339 to get the SLPVectorizer optimization.
See https://godbolt.org/z/GqdPGarsn.
According to my investigation, the success of optimization in non-opaque pointer mode relates to SROA.cpp#L1831-L1845 or InstructionCombining.cpp#L2220-L2274. Unfortunately, these two transformations have been removed during opaque pointer migration.
My plan is to restore the behavior of InstructionCombining.cpp#L2220-L2274 using alloc
instead of bitcast
.
Looking at the code comments, this seems to be an important optimization. So it might be worth backporting to LLVM 17?