Sanjay Patel

Results 21 comments of Sanjay Patel

> That increases use count of %offset, which is generally not > the preferred direction, even if that doesn't have undef problems. That's correct in general, but for x86 with...

This pattern is more specialized than the one in issue #56653, so we should probably just handle it (and its inverse logic) directly in -instsimplify: https://alive2.llvm.org/ce/z/NHsj-o ```ll define i1 @src(i32...

On 2nd thought, we might be able to get this and the other pattern with improvements to llvm::isImpliedCondition() and its callers in InstSimplify.

We may want to enhance a conditional branch fold in instcombine that swaps the destination blocks to also match a select-of-bools: https://alive2.llvm.org/ce/z/__bcRG Note that currently we would canonicalize the new...

> https://alive2.llvm.org/ce/z/8fQRvn > Both are equivelent to `xor` instruction. That one looks like an obvious missing reduction, so: d85505a9323a (not sure if that changes anything for the motivating source example)

I think the examples here are fixed now, so closing. We still have missing folds for logical-and and logical-or: #58589 ...so if you find other examples, please do file another...

I'm not sure how to match it (need to calculate sums/diffs of ranges?), but it's an extension of an existing instcombine for urem (and we'd prefer regular "sub" to the...

> Looks like if I add the `exact` flag to the sdiv and run InstCombine, we do turn it into a shift. So I guess we're missing logic to set...

Looks fixed after: [e5ee0b0](https://github.com/llvm/llvm-project/commit/e5ee0b06d694fe7749b56706f1bf67e22eaef628)