[PATCH] D95324: [Test][AArch64] Add s32 legalizer test for UADDE/USUBE
Cassie Jones via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 25 10:53:54 PST 2021
porglezomp updated this revision to Diff 319061.
porglezomp added a comment.
Update test run line to match suggestions on D95323 <https://reviews.llvm.org/D95323>
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95324/new/
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 -mtriple aarch64 -verify-machineinstrs -run-pass=legalizer -debugify-and-strip-all-safe %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 -mtriple aarch64 -verify-machineinstrs -run-pass=legalizer -debugify-and-strip-all-safe %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.319061.patch
Type: text/x-patch
Size: 2494 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210125/d82d6b0a/attachment.bin>
More information about the llvm-commits
mailing list