[PATCH] D14596: [SROA] Choose more profitable type in findCommonType
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 16 15:20:38 PST 2015
chandlerc added a comment.
So, the problem here is that the instcombine pass tries to remove the bitcast from i32 to float, but fails because of the phi node.
Specifically, we have a combine that handles bitcasts of loads and bitcasts prior to stores, but we don't have anything that looks through phi-nodes. If you were to reg-to-mem the phi nodes so that they were replaced with loads and stores to an i32 alloca, I believe you would find that instcombine would remove the bitcasts and make all of these floating point.
The key will be to push this to handle phi nodes as well. This may be a bit trickier because you really want to handle even complex cycles of phi-nodes. Does this make sense? I'm familiar with this part of instcombine if it would be helpful for me to help you craft this change.
http://reviews.llvm.org/D14596
More information about the llvm-commits
mailing list