<html><body><p><tt><font size="2">Jonas Paulsson <paulsson@linux.vnet.ibm.com> wrote on 09.06.2017 14:51:58:<br><br>> Interestingly enough, a similar test in ARM/trap.ll looks like:<br>> <br>> define void @t() nounwind {<br>> entry:<br>>   call void @llvm.trap()<br>>   unreachable<br>> }<br>> <br>> , which of course passes also on SystemZ with or without the barrier<br>> and terminator flag.<br>> <br>> So it is then a question if we need to test ret after trap...<br></font></tt><br><tt><font size="2">Ah, interesting.  Which is the "canonical" LLVM IR version?</font></tt><br><br><tt><font size="2">Can you check what clang generates from something like:</font></tt><br><br><tt><font size="2">void test (void)</font></tt><br><tt><font size="2">{</font></tt><br><tt><font size="2">  __builtin_trap();</font></tt><br><tt><font size="2">}</font></tt><br><br><tt><font size="2">or maybe:</font></tt><br><br><tt><font size="2">int test (void)</font></tt><br><tt><font size="2">{</font></tt><br><tt><font size="2">  __builtin_trap();</font></tt><br><tt><font size="2">  return 0;</font></tt><br><tt><font size="2">}</font></tt><br><br><tt><font size="2">Bye,</font></tt><br><tt><font size="2">Ulrich</font></tt><br><BR>
</body></html>