<div dir="ltr"><div><div><div><div><div><div>Hi,<br><br></div>I'm successfully using LLVM in my compiler project, but it works only if I disable <i>jump tables</i> codegen.<br></div>In the following <a href="https://gist.github.com/csabahruska/0122b73529f4c377173454e1743eeea4">gist</a> you can find the generated LLVM IR and x64 code for the <a href="https://gist.github.com/csabahruska/0122b73529f4c377173454e1743eeea4#file-bug-s">buggy</a> and <a href="https://gist.github.com/csabahruska/0122b73529f4c377173454e1743eeea4#file-ok-s">working</a> version of the same program. The ok.ll and bug.ll differs only in a <i>"no-jump-tables"="true"</i> function attribute.<br>I've investigated a little and turned out that the code crashes at this point:<br><a href="https://gist.github.com/csabahruska/0122b73529f4c377173454e1743eeea4#file-bug-s-L212">https://gist.github.com/csabahruska/0122b73529f4c377173454e1743eeea4#file-bug-s-L212<br></a>BTW the generated code code seems fine for me.<br></div>Do you have any idea what is going on?<br></div>Is there any extra alignment requirement?<br><br></div>Regards,<br></div>Csaba Hruska<br></div>