[llvm] [DAGCombiner][AArch64] Make combineCarryDiamond avoid creating UADDO_CARRY with carry in larger than setcc result type. (PR #89121)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 12:34:41 PDT 2024
================
@@ -0,0 +1,28 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
+; RUN: llc < %s -mtriple=aarch64 | FileCheck %s
+
+define i32 @f(ptr %0, i41 %1, ptr %2) {
+; CHECK-LABEL: f:
+; CHECK: // %bb.0:
+; CHECK-NEXT: and w9, w1, #0x1
+; CHECK-NEXT: mov w10, #1 // =0x1
+; CHECK-NEXT: mov x8, x0
+; CHECK-NEXT: cmp w9, #1
+; CHECK-NEXT: mov w0, wzr
+; CHECK-NEXT: adc x9, xzr, x10
+; CHECK-NEXT: str x9, [x2]
+; CHECK-NEXT: str xzr, [x8]
+; CHECK-NEXT: ret
+ %new0 = and i41 %1, 1
+ %last = trunc i41 %new0 to i1
+ %4 = add i64 0, 1
----------------
arsenm wrote:
Use named values
https://github.com/llvm/llvm-project/pull/89121
More information about the llvm-commits
mailing list