<div dir="ltr">Real world code [*] sometimes has the denominator of a 'udiv' be a 'select' but the select operands may not have the same structural form.<div><br></div><div>The attached patch treats the true and false operands as right hand sides of a divide and feeds them into the same logical than simplified 'udiv' instructions.</div>
<div><br></div><div>I wouldn't be surprised if there was a better/more systematic way of dealing with this problem, I'd be happy to implement suggestions.</div><div><br></div><div>-- </div><div>David Majnemer<br><div>
<br></div><div style>[*] AddressSanitizerModule::runOnModule</div></div></div>