jump table crash with x64 JIT


I’m successfully using LLVM in my compiler project, but it works only if I disable jump tables codegen.

In the following gist you can find the generated LLVM IR and x64 code for the buggy and working version of the same program. The ok.ll and bug.ll differs only in a “no-jump-tables”=“true” function attribute.
I’ve investigated a little and turned out that the code crashes at this point:
BTW the generated code code seems fine for me.

Do you have any idea what is going on?

Is there any extra alignment requirement?


Csaba Hruska