[llvm] [InstCombine] Reducing rust i128::midpoint instructions (PR #99614)

Julius Alexandre via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 19 11:25:43 PDT 2024


================
@@ -0,0 +1,152 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
+
+define noundef i128 @xor_lshr_and(i128 noundef %x, i128 noundef %y) unnamed_addr #0 {
+; check-label: define noundef i128 @xor_lshr_and(
+; check-same: i128 noundef [[x:%.*]], i128 noundef [[y:%.*]]) unnamed_addr {
+; check-next:  [[start:.*:]]
+; check-next:    [[xor:%.*]] = xor i128 [[y]], [[x]]
+; check-next:    [[lshr:%.*]] = lshr i128 [[xor]], 1
+; check-next:    [[and:%.*]] = and i128 [[y]], [[x]]
+; check-next:    [[add:%.*]] = add i128 [[lshr]], [[and]]
+; check-next:    ret i128 [[add]]
+;
----------------
medievalghoul wrote:

done, fixed

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


More information about the llvm-commits mailing list