Joseph Pusdesris
2012-Nov-23 18:02 UTC
[LLVMdev] Prevention register promotion at the isel codegen phase
I am trying to implement mem-mem operations, but I can't seem to figure out how to prevent register promotion for most cases. I can successfully compile: int foo(int a, int b){ return a + b; } because it gets matched to store(add(load)(load)), but when I attempt to compile: int foo(int a, int b, int c){ return a + b + c; } I can't match the add anymore since it is of the form store(add(add(load)(load))(load)). I think I need to figure out how to force a load/store between the two adds. I am not sure where to load/store to though, I need to allocate a spill location or something I assume. Any insight would be greatly appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121123/1961c6ab/attachment.html>