Skip to content

Commit fdbfda2

Browse files
committed
[Test][AArch64] Add s32 legalizer test for UADDE/USUBE
Differential Revision: https://reviews.llvm.org/D95324
1 parent 2ba1f9c commit fdbfda2

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2+
# RUN: llc -mtriple aarch64 -verify-machineinstrs -run-pass=legalizer -debugify-and-strip-all-safe %s -o - | FileCheck %s
3+
4+
---
5+
name: test_scalar_uadde_32
6+
body: |
7+
bb.0.entry:
8+
; CHECK-LABEL: name: test_scalar_uadde_32
9+
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
10+
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
11+
; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $w2
12+
; CHECK: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[COPY2]](s32)
13+
; CHECK: [[UADDE:%[0-9]+]]:_(s32), [[UADDE1:%[0-9]+]]:_(s1) = G_UADDE [[COPY]], [[COPY1]], [[TRUNC]]
14+
; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[COPY2]](s32)
15+
; CHECK: $w0 = COPY [[UADDE]](s32)
16+
; CHECK: $w1 = COPY [[COPY3]](s32)
17+
%0:_(s32) = COPY $w0
18+
%1:_(s32) = COPY $w1
19+
%2:_(s32) = COPY $w2
20+
%3:_(s1) = G_TRUNC %2
21+
%4:_(s32), %5:_(s1) = G_UADDE %0, %1, %3
22+
%6:_(s32) = G_ANYEXT %3
23+
$w0 = COPY %4(s32)
24+
$w1 = COPY %6(s32)
25+
26+
...
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2+
# RUN: llc -mtriple aarch64 -verify-machineinstrs -run-pass=legalizer -debugify-and-strip-all-safe %s -o - | FileCheck %s
3+
4+
---
5+
name: test_scalar_usube_32
6+
body: |
7+
bb.0.entry:
8+
; CHECK-LABEL: name: test_scalar_usube_32
9+
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
10+
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
11+
; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $w2
12+
; CHECK: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[COPY2]](s32)
13+
; CHECK: [[USUBE:%[0-9]+]]:_(s32), [[USUBE1:%[0-9]+]]:_(s1) = G_USUBE [[COPY]], [[COPY1]], [[TRUNC]]
14+
; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[COPY2]](s32)
15+
; CHECK: $w0 = COPY [[USUBE]](s32)
16+
; CHECK: $w1 = COPY [[COPY3]](s32)
17+
%0:_(s32) = COPY $w0
18+
%1:_(s32) = COPY $w1
19+
%2:_(s32) = COPY $w2
20+
%3:_(s1) = G_TRUNC %2
21+
%4:_(s32), %5:_(s1) = G_USUBE %0, %1, %3
22+
%6:_(s32) = G_ANYEXT %3
23+
$w0 = COPY %4(s32)
24+
$w1 = COPY %6(s32)
25+
26+
...

0 commit comments

Comments
 (0)