[PATCH] D95324: [Test][AArch64] Add s32 legalizer test for UADDE/USUBE

Cassie Jones via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 24 17:54:50 PST 2021


porglezomp created this revision.
porglezomp added reviewers: paquette, aemerson.
Herald added subscribers: danielkiss, kristof.beyls.
porglezomp requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95324

Files:
  llvm/test/CodeGen/AArch64/GlobalISel/legalize-uadde.mir
  llvm/test/CodeGen/AArch64/GlobalISel/legalize-usube.mir


Index: llvm/test/CodeGen/AArch64/GlobalISel/legalize-usube.mir
===================================================================
--- /dev/null
+++ llvm/test/CodeGen/AArch64/GlobalISel/legalize-usube.mir
@@ -0,0 +1,26 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -march=aarch64 -run-pass=legalizer %s -o - | FileCheck %s
+
+---
+name:            test_scalar_usube_32
+body:             |
+  bb.0.entry:
+    ; CHECK-LABEL: name: test_scalar_usube_32
+    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
+    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
+    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $w2
+    ; CHECK: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[COPY2]](s32)
+    ; CHECK: [[USUBE:%[0-9]+]]:_(s32), [[USUBE1:%[0-9]+]]:_(s1) = G_USUBE [[COPY]], [[COPY1]], [[TRUNC]]
+    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[COPY2]](s32)
+    ; CHECK: $w0 = COPY [[USUBE]](s32)
+    ; CHECK: $w1 = COPY [[COPY3]](s32)
+    %0:_(s32) = COPY $w0
+    %1:_(s32) = COPY $w1
+    %2:_(s32) = COPY $w2
+    %3:_(s1) = G_TRUNC %2
+    %4:_(s32), %5:_(s1) = G_USUBE %0, %1, %3
+    %6:_(s32) = G_ANYEXT %3
+    $w0 = COPY %4(s32)
+    $w1 = COPY %6(s32)
+
+...
Index: llvm/test/CodeGen/AArch64/GlobalISel/legalize-uadde.mir
===================================================================
--- /dev/null
+++ llvm/test/CodeGen/AArch64/GlobalISel/legalize-uadde.mir
@@ -0,0 +1,26 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -march=aarch64 -run-pass=legalizer %s -o - | FileCheck %s
+
+---
+name:            test_scalar_uadde_32
+body:             |
+  bb.0.entry:
+    ; CHECK-LABEL: name: test_scalar_uadde_32
+    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
+    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
+    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $w2
+    ; CHECK: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[COPY2]](s32)
+    ; CHECK: [[UADDE:%[0-9]+]]:_(s32), [[UADDE1:%[0-9]+]]:_(s1) = G_UADDE [[COPY]], [[COPY1]], [[TRUNC]]
+    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[COPY2]](s32)
+    ; CHECK: $w0 = COPY [[UADDE]](s32)
+    ; CHECK: $w1 = COPY [[COPY3]](s32)
+    %0:_(s32) = COPY $w0
+    %1:_(s32) = COPY $w1
+    %2:_(s32) = COPY $w2
+    %3:_(s1) = G_TRUNC %2
+    %4:_(s32), %5:_(s1) = G_UADDE %0, %1, %3
+    %6:_(s32) = G_ANYEXT %3
+    $w0 = COPY %4(s32)
+    $w1 = COPY %6(s32)
+
+...


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95324.318883.patch
Type: text/x-patch
Size: 2388 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210125/c5c26097/attachment.bin>


More information about the llvm-commits mailing list