<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Hi David, </div><div><br></div><div><blockquote type="cite"><div style="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;"><br>It seems the only solution is to create an intrinsic:<br><br>llvm_int_load_masked mask, [addr]<br><br>But this unnecessarily shuts down optimization.<br><br></div></blockquote><div><br></div><div>I think that using intrinsics is the right solution. I imagine that most interesting load/store optimizations happen before vectorization, so I am not sure how much we can gain by optimizing masked load/stores. </div><div><br></div><blockquote type="cite"><div style="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;">Similar problems exist with any trapping instruction (div, mod, etc.).<br>It gets even worse when you consider than any floating point operation<br>can trap on a signalling NaN input.<br></div></blockquote><div><br></div><div>For DIV/MOD you can blend the inputs BEFORE the operation. You can place ones or zeros depending on the operation. </div><br><blockquote type="cite"><div style="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;"><br>So are there any ideas out there for how to efficiently handle this?<br>We've talked about llvm and masks before and it's clear that there is<br>strong resistance to adding masks to the IR. </div></blockquote><div><br></div><div>Yes. I think that the consensus is that we don't need to predicate the IR itself to support MIC-like processors. </div></div><div><br></div><div>Thanks,</div><div>Nadav</div></body></html>