I have a very simple kernel that exposes a bug in the backend I am
working on and I cannot figure out how to fix the problem. I've narrowed
down the issue to be with dynamic stack allocation. The problem I am
having is that if I declare a variable inside of the loop, the code that
my backend generates produces incorrect results; however, if I move this
declaration outside of the loop the generated code works correctly.
I've attached the two files two files.
My backend does not have a stack pointer and no memory allocations. So I
really can't use any of the approaches of the currently implemented
backends. What I would like to do is to just turn all of the stack
allocations into register moves to virtual registers. Any tips or hints
would be greatly appreciated.
Advanced Technology & Performance
Advanced Micro Devices Inc.
S1-609 One AMD Place
Sunnyvale, CA. 94085
a-bad.ll (5.01 KB)
a-good.ll (5.01 KB)