1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+ndd -verify-machineinstrs | FileCheck %s
3 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+ndd,nf -verify-machineinstrs | FileCheck --check-prefix=NF %s
5 define i8 @dec8r(i8 noundef %a) {
7 ; CHECK: # %bb.0: # %entry
8 ; CHECK-NEXT: decb %dil, %al
12 ; NF: # %bb.0: # %entry
13 ; NF-NEXT: {nf} decb %dil, %al
20 define i16 @dec16r(i16 noundef %a) {
21 ; CHECK-LABEL: dec16r:
22 ; CHECK: # %bb.0: # %entry
23 ; CHECK-NEXT: decw %di, %ax
27 ; NF: # %bb.0: # %entry
28 ; NF-NEXT: {nf} decw %di, %ax
35 define i32 @dec32r(i32 noundef %a) {
36 ; CHECK-LABEL: dec32r:
37 ; CHECK: # %bb.0: # %entry
38 ; CHECK-NEXT: decl %edi, %eax
42 ; NF: # %bb.0: # %entry
43 ; NF-NEXT: {nf} decl %edi, %eax
50 define i64 @dec64r(i64 noundef %a) {
51 ; CHECK-LABEL: dec64r:
52 ; CHECK: # %bb.0: # %entry
53 ; CHECK-NEXT: decq %rdi, %rax
57 ; NF: # %bb.0: # %entry
58 ; NF-NEXT: {nf} decq %rdi, %rax
65 define i8 @dec8m(ptr %ptr) {
67 ; CHECK: # %bb.0: # %entry
68 ; CHECK-NEXT: decb (%rdi), %al
72 ; NF: # %bb.0: # %entry
73 ; NF-NEXT: {nf} decb (%rdi), %al
76 %a = load i8, ptr %ptr
81 define i16 @dec16m(ptr %ptr) {
82 ; CHECK-LABEL: dec16m:
83 ; CHECK: # %bb.0: # %entry
84 ; CHECK-NEXT: decw (%rdi), %ax
88 ; NF: # %bb.0: # %entry
89 ; NF-NEXT: {nf} decw (%rdi), %ax
92 %a = load i16, ptr %ptr
97 define i32 @dec32m(ptr %ptr) {
98 ; CHECK-LABEL: dec32m:
99 ; CHECK: # %bb.0: # %entry
100 ; CHECK-NEXT: decl (%rdi), %eax
104 ; NF: # %bb.0: # %entry
105 ; NF-NEXT: {nf} decl (%rdi), %eax
108 %a = load i32, ptr %ptr
113 define i64 @dec64m(ptr %ptr) {
114 ; CHECK-LABEL: dec64m:
115 ; CHECK: # %bb.0: # %entry
116 ; CHECK-NEXT: decq (%rdi), %rax
120 ; NF: # %bb.0: # %entry
121 ; NF-NEXT: {nf} decq (%rdi), %rax
124 %a = load i64, ptr %ptr
129 define void @dec8m_legacy(ptr %ptr) {
130 ; CHECK-LABEL: dec8m_legacy:
131 ; CHECK: # %bb.0: # %entry
132 ; CHECK-NEXT: decb (%rdi)
135 ; NF-LABEL: dec8m_legacy:
136 ; NF: # %bb.0: # %entry
137 ; NF-NEXT: decb (%rdi)
140 %a = load i8, ptr %ptr
142 store i8 %dec, ptr %ptr
146 define void @dec16m_legacy(ptr %ptr) {
147 ; CHECK-LABEL: dec16m_legacy:
148 ; CHECK: # %bb.0: # %entry
149 ; CHECK-NEXT: decw (%rdi)
152 ; NF-LABEL: dec16m_legacy:
153 ; NF: # %bb.0: # %entry
154 ; NF-NEXT: decw (%rdi)
157 %a = load i16, ptr %ptr
159 store i16 %dec, ptr %ptr
163 define void @dec32m_legacy(ptr %ptr) {
164 ; CHECK-LABEL: dec32m_legacy:
165 ; CHECK: # %bb.0: # %entry
166 ; CHECK-NEXT: decl (%rdi)
169 ; NF-LABEL: dec32m_legacy:
170 ; NF: # %bb.0: # %entry
171 ; NF-NEXT: decl (%rdi)
174 %a = load i32, ptr %ptr
176 store i32 %dec, ptr %ptr
180 define void @dec64m_legacy(ptr %ptr) {
181 ; CHECK-LABEL: dec64m_legacy:
182 ; CHECK: # %bb.0: # %entry
183 ; CHECK-NEXT: decq (%rdi)
186 ; NF-LABEL: dec64m_legacy:
187 ; NF: # %bb.0: # %entry
188 ; NF-NEXT: decq (%rdi)
191 %a = load i64, ptr %ptr
193 store i64 %dec, ptr %ptr