<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Consider this IR fragment produced after -O3:<br>
<blockquote type="cite"><tt>%7:<br>
%8 = phi i8* [ blockaddress(@0, %19), %19 ], [ %12, %11 ]<br>
%9 = phi i32 [ %20, %19 ], [ 0, %11 ]<br>
indirectbr i8* %8, [label %4, label %19]<br>
<br>
%19:</tt>
<tt><br>
%20 = add nsw i32 %9, 1<br>
%21 = icmp eq i32 %9, 9999<br>
br i1 %21, label %16, label %7</tt></blockquote>
the br in %19 should be optimized to branch directly to itself
rather than going back to %7 (note that the arg %8 to the indirectbr
will always be the address of %19 when coming from %19).<br>
Is this a known missed optimization?<br>
<br>
<div class="moz-signature">-- <br>
<style type="text/css">
.signature {
}
.signature a, .signature a:link, .signature a:hover, .signature a:active,
</style>
<div style="background:#eee; border:1px solid #ddd; padding:7px
9px; display:inline-block; border-radius:8px;
-moz-border-radius:6px;"> Carlo Alberto Ferraris <<a
href="mailto:cafxx@strayorange.com">cafxx@strayorange.com</a>><br>
<a href="http://cafxx.strayorange.com">website/blog</a> - +39
333 7643 235
</div>
</div>
</body>
</html>