[PATCH] D79217: Process gep (select ptr1, ptr2) in SROA
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 5 14:36:11 PDT 2020
rampitec added inline comments.
================
Comment at: llvm/test/Transforms/SROA/select-gep.ll:17
+ %gep = getelementptr inbounds %pair, %pair* %select, i32 0, i32 1
+ %load = load i32, i32* %gep, align 4
+ ret i32 %load
----------------
arsenm wrote:
> This increases the instruction count if the load won't be eliminated. Can you add a test with a volatile load or something else to prevent it?
It may increase instruction count, but if it will remain after SROA there is a pattern in InstCombine to revert it back. That is actually the reason why D79145 was over complicated and I have switched to processing it right in SROA.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79217/new/
https://reviews.llvm.org/D79217
More information about the llvm-commits
mailing list