<div dir="ltr">Hi Brian,<div><br></div><div>I actually solved this exact problem for the upstream WebAssembly backend in the last couple of weeks. I was originally going to use the OmitRangeCheck field, but after prompting from my reviewers on <a href="https://reviews.llvm.org/D80778">https://reviews.llvm.org/D80778</a> I ended up removing the range checks in the backend instead. You can see the pass I added to do that here: <a href="https://github.com/llvm/llvm-project/blob/master/llvm/lib/Target/WebAssembly/WebAssemblyFixBrTableDefaults.cpp">https://github.com/llvm/llvm-project/blob/master/llvm/lib/Target/WebAssembly/WebAssemblyFixBrTableDefaults.cpp</a> I think it probably wouldn't be too hard to adapt that pass to a different backend, but feel free to reach out if you have any questions about it!</div><div><br></div><div>Best,</div><div><br></div><div>Thomas</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 19, 2020 at 12:55 PM Bagel via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I am working on a back end for an architecture whose jump via table instruction <br>
includes the range check. Therefore I don't need the range check generated (in <br>
SelectionDAGBuilder ?).<br>
<br>
There appears to be a struct JumpTableHeader which contains a field <br>
OmitRangeCheck which, when true, does what I want. However, there doesn't <br>
appear to be a mechanism for a back end to set it.<br>
<br>
Anyone have any ideas?<br>
<br>
Thanks,<br>
brian<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>