Alive2: https://alive2.llvm.org/ce/z/rPN1GB
Fixes: https://github.com/llvm/llvm-project/issues/62238
Depends on D150377
Signed-off-by: Jun Zhang <jun@junz.org>
Differential D150378
[Instsimplfy] X == Y ? 0 : X - Y --> X - Y junaire on May 11 2023, 8:47 AM. Authored by
Details Alive2: https://alive2.llvm.org/ce/z/rPN1GB Depends on D150377 Signed-off-by: Jun Zhang <jun@junz.org>
Diff Detail
Unit Tests Event Timeline
Comment Actions I updated the patch. The transform I wrote is based on my understanding of the code and I'm not super confident that's what you meant. Educate me please if it's wrong, thanks!
Comment Actions LGTM I've clarified the preconditions for this function in https://github.com/llvm/llvm-project/commit/8d2bae8c227debdcd0632ce364c58883bd12ad84, so we can actually justify the transform.
|
I think this can just return zero.