<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 2, 2016, at 10:06 AM, Lin, Jin via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(32, 56, 100);" class="">Hi,<o:p class=""></o:p></span></p><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="color: rgb(32, 56, 100);" class="">The phase of instruction combine cannot handle the instruction<span class="Apple-converted-space"> </span></span><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(32, 56, 100);" class="">%4 = select i1 %tobool.i, metadata !12, metadata !10 generated by the phase of CFG simplification and the compiler generates an assertion failure.<o:p class=""></o:p></span></p><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(32, 56, 100);" class="">I wonder whe</span><span style="font-size: 10pt; font-family: Verdana, sans-serif; color: rgb(32, 56, 100);" class="">ther this is valid LLVM IR:<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: Verdana, sans-serif; color: rgb(32, 56, 100);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(32, 56, 100);" class="">%4 = select i1 %tobool.i, metadata !12, metadata !10</span></div></div></div></blockquote><div><br class=""></div><div><br class=""></div><div>No this does not seem valid to me.</div><div>Is the verifier accepting it? (This is usually the easiest way to figure).</div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div>—</div><div>Mehdi</div><div><br class=""></div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: Verdana, sans-serif; color: rgb(32, 56, 100);" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><a name="_MailEndCompose" class=""></a><span style="font-size: 10pt; font-family: Verdana, sans-serif; color: rgb(32, 56, 100);" class=""><o:p class=""> </o:p></span></div><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(32, 56, 100);" class=""><o:p class=""> </o:p></span></p><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(32, 56, 100);" class="">Before CFGSimplify<o:p class=""></o:p></span></p><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(32, 56, 100);" class="">cond.true.i: ; preds = %entry<br class=""> %add.ptr.i = getelementptr inbounds i8, i8* %2, i64 8<br class=""> %left_.i.i = bitcast i8* %add.ptr.i to i32**<br class=""> %3 = call i32** @llvm.fakeload.p0p0i32(i32** %left_.i.i, metadata !8) #6 br label %_ZN1G7insert_Ev.exit<br class=""><br class="">cond.false.i: ; preds = %entry<br class=""> %right_.i.i = getelementptr inbounds i8, i8* %2, i64 16<br class=""> %4 = bitcast i8* %right_.i.i to i32**<br class=""> %5 = call i32** @llvm.fakeload.p0p0i32(i32** %4, metadata !11) #6<br class=""> br label %_ZN1G7insert_Ev.exit<br class=""><br class=""><o:p class=""></o:p></span></p><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(32, 56, 100);" class="">After CFGSimplify<br class=""><br class=""></span><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: red;" class=""> %4 = select i1 %tobool.i, metadata !12, metadata !10</span><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(32, 56, 100);" class=""><br class=""> %add.ptr.i = getelementptr inbounds i8, i8* %2, i64 %3<br class=""> %left_.i.i = bitcast i8* %add.ptr.i to i32**<br class=""> %5 = call i32** @llvm.fakeload.p0p0i32(i32** %left_.i.i, metadata %4) #6<br class=""> %6 = load i32*, i32** %5, align 8, !tbaa !8</span><span style="color: rgb(32, 56, 100);" class=""><o:p class=""></o:p></span></p><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="color: rgb(32, 56, 100);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="color: rgb(32, 56, 100);" class="">Thanks,<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="color: rgb(32, 56, 100);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="color: rgb(32, 56, 100);" class="">Jin<o:p class=""></o:p></span></div></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">LLVM Developers mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:llvm-dev@lists.llvm.org" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">llvm-dev@lists.llvm.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a></div></blockquote></div><br class=""></body></html>