[llvm] [InstCombine] Fold (sub (xor X, (sext C)), (sext C)) => (select C (neg X), X) (PR #79417)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 21:56:53 PST 2024


================
@@ -0,0 +1,19 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
+
+define  i64 @absdiff(i64 %0, i64 %1) {
----------------
dtcxzyw wrote:

What is the motivation of this patch? Does this pattern exist in some real-world applications?


https://github.com/llvm/llvm-project/pull/79417


More information about the llvm-commits mailing list