llvm-project
84497c6f - [SimplifyCFG] Remove limitation on sinking of load/store of alloca (#104788)

Commit
1 year ago
[SimplifyCFG] Remove limitation on sinking of load/store of alloca (#104788) This is a followup to https://github.com/llvm/llvm-project/pull/104579 to remove the limitation on sinking loads/stores of allocas entirely, even if this would introduce a phi node. Nowadays, SROA supports speculating load/store over select/phi. Additionally, SimplifyCFG with sinking only runs at the end of the function simplification pipeline, after SROA. I checked that the two tests modified here still successfully SROA after the SimplifyCFG transform. We should, however, keep the limitation on lifetime intrinsics. SROA does not have speculation support for these, and I've also found that the way these are handled in the backend is very problematic (https://github.com/llvm/llvm-project/issues/104776), so I think we should leave them alone.
Author
Parents
Loading