Dhruv Chawla

Results comments of Dhruv Chawla

I'd like to fix this, but I'm not able to find the exact transform in `InstCombine` causing this. It appears that the newer clang is converting `a ^ (~b)` into...

> This probably needs a generalization of simplifyWithOpReplaced to look at more than one instruction. @nikic: Not entirely sure where this plays in. Stepping through the code, the transformation comes...

Fixed by https://reviews.llvm.org/D153575 :)

@luxufan Are you still working on this? I have a patch almost ready to fix this.

Candidate PR: https://github.com/llvm/llvm-project/pull/67282

> `%i4 = icmp eq i32 %i3, 1` what if the `1` were `0`? That would be equivalent to `not(or(x, y))`: https://alive2.llvm.org/ce/z/8z7Q4G

> so the `xor` case holds for `eq` and `1` only Yes, if you sketch out the truth table for this function you will see it is equivalent to the...

I think `foldICmpAddConstant` may be what you're looking for: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp#L2898

> The issue is that SROA appears to have super-linear scaling. As I understand it, the issue isn't in SROA itself, its the knock-on effects it has on MemCpyOpt and...