[llvm-dev] mem2reg not working in this case?

Johannes Doerfert via llvm-dev llvm-dev at lists.llvm.org
Sun Oct 31 09:07:31 PDT 2021


While this doesn't answer your question it might still solve your problem:

opt -sroa < module_eval0.ll

~ Johannes


On 10/29/21 11:56, Frank Winter via llvm-dev wrote:
> I can't get the alloca in attached function to be promoted to (a) register(s).
>
> I try with
>
> opt -mem2reg < module_eval0.ll
>
> but the output is unchanged. Using LLVM 13 release.
>
> Can anyone see why it's not working? Is this too complicated for mem2reg? The alloca is moved to the beginning.. is this the problem?
>
> Frank
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list