<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 Jan 25, 2015, at 12:31 PM, Jingyue Wu <<a href="mailto:jingyue@google.com" class="">jingyue@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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; color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: small; float: none; background-color: rgb(255, 255, 255); display: inline !important;" class="">Owen, could you explain more on the approach of using branch-if-none instructions in your mind? I believe you have lots of great insights, but<span class="Apple-converted-space"> </span></span><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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="">I don't see how cbranch.ifnone instructions directly solve my issue. The issue I am trying to solve is that certain CFG optimizations transform the CFG into a "bad" structure which hurts the performance of the compiled code in the presence of divergent branches. On the other hand, I don't want to disable jump threading all together because it is still beneficial for non-divergent branches. As far as I can understand, cbranch.ifnone provides a fast path so that a warp can jump over the region that no threads in the warp ever execute. However, it doesn't help the case where the branches are indeed divergent. </span></div></blockquote></div><br class=""><div class="">I don’t have any specific advice to offer you about JumpThreading.  My experience has been that it generally not worth using for GPU targets.  I suspect that an enhanced model that allowed the target to assign a cost-per-duplication of instructions might make it more profitable.</div><div class=""><br class=""></div><div class="">—Owen</div></body></html>