[llvm] [InstCombine] Simplification for (-a * b) / (a * b) and (a - b) / (b - a). (PR #71768)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 8 21:37:17 PST 2023
================
@@ -1432,6 +1432,36 @@ define <2 x i8> @sdiv_sdiv_mul_nsw(<2 x i8> %x, <2 x i8> %y, <2 x i8> %z) {
ret <2 x i8> %r
}
+; -(X * Y) / (X * Y) --> -1
----------------
dtcxzyw wrote:
Please add some negative tests (e.g., `sub` w/o `nsw` flags)
https://github.com/llvm/llvm-project/pull/71768
More information about the llvm-commits
mailing list