I am getting an "Invalid getelementptr indices" when running some IR code that has been succesfully compiled and output by llvm-gcc. The "opt" doesn't like it even though it's output produced by llvm-gcc. Anyone know what could be causing this? opt: myFunction.bc:3:31: error: invalid getelementptr indices %0 = getelementptr inbounds %struct.MyFunction_Scratch_s* %scratch, i32 0, i32 4, i32 %stage -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120126/06532e7e/attachment.html>
On Jan 26, 2012, at 12:13 PM, Ryan Taylor wrote:> I am getting an "Invalid getelementptr indices" when running some IR code that has been succesfully compiled and output by llvm-gcc. The "opt" doesn't like it even though it's output produced by llvm-gcc. Anyone know what could be causing this? > > opt: myFunction.bc:3:31: error: invalid getelementptr indices > %0 = getelementptr inbounds %struct.MyFunction_Scratch_s* %scratch, i32 0, i32 4, i32 %stageHi Ryan, It's impossible to tell without more information, but llvm-gcc is long dead and isn't supported anymore. Please upgrade to clang. -Chris
I have done a clean checkout of llvm, polly and clang (via directions from polly website). Everything built and installed. Does clang not compile without a "main" function? On Thu, Jan 26, 2012 at 12:29 PM, Chris Lattner <clattner at apple.com> wrote:> > On Jan 26, 2012, at 12:13 PM, Ryan Taylor wrote: > > > I am getting an "Invalid getelementptr indices" when running some IR > code that has been succesfully compiled and output by llvm-gcc. The "opt" > doesn't like it even though it's output produced by llvm-gcc. Anyone know > what could be causing this? > > > > opt: myFunction.bc:3:31: error: invalid getelementptr indices > > %0 = getelementptr inbounds %struct.MyFunction_Scratch_s* %scratch, > i32 0, i32 4, i32 %stage > > Hi Ryan, > > It's impossible to tell without more information, but llvm-gcc is long > dead and isn't supported anymore. Please upgrade to clang. > > -Chris >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120127/c8bcd016/attachment.html>
Possibly Parallel Threads
- [LLVMdev] Invalid getelementptr indices?
- [LLVMdev] Invalid getelementptr indices?
- [LLVMdev] print the memory address computed by getelementptr
- [LLVMdev] print the memory address computed by getelementptr
- [LLVMdev] print the memory address computed by getelementptr