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
4 define i8 @dec8r(i8 noundef %a) {
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: decb %dil, %al
14 define i16 @dec16r(i16 noundef %a) {
15 ; CHECK-LABEL: dec16r:
16 ; CHECK: # %bb.0: # %entry
17 ; CHECK-NEXT: decl %edi, %eax
18 ; CHECK-NEXT: # kill: def $ax killed $ax killed $eax
25 define i32 @dec32r(i32 noundef %a) {
26 ; CHECK-LABEL: dec32r:
27 ; CHECK: # %bb.0: # %entry
28 ; CHECK-NEXT: decl %edi, %eax
35 define i64 @dec64r(i64 noundef %a) {
36 ; CHECK-LABEL: dec64r:
37 ; CHECK: # %bb.0: # %entry
38 ; CHECK-NEXT: decq %rdi, %rax
45 define i8 @dec8m(ptr %ptr) {
47 ; CHECK: # %bb.0: # %entry
48 ; CHECK-NEXT: decb (%rdi), %al
51 %a = load i8, ptr %ptr
56 define i16 @dec16m(ptr %ptr) {
57 ; CHECK-LABEL: dec16m:
58 ; CHECK: # %bb.0: # %entry
59 ; CHECK-NEXT: movzwl (%rdi), %eax
60 ; CHECK-NEXT: decl %eax
61 ; CHECK-NEXT: # kill: def $ax killed $ax killed $eax
64 %a = load i16, ptr %ptr
69 define i32 @dec32m(ptr %ptr) {
70 ; CHECK-LABEL: dec32m:
71 ; CHECK: # %bb.0: # %entry
72 ; CHECK-NEXT: decl (%rdi), %eax
75 %a = load i32, ptr %ptr
80 define i64 @dec64m(ptr %ptr) {
81 ; CHECK-LABEL: dec64m:
82 ; CHECK: # %bb.0: # %entry
83 ; CHECK-NEXT: decq (%rdi), %rax
86 %a = load i64, ptr %ptr
91 define void @dec8m_legacy(ptr %ptr) {
92 ; CHECK-LABEL: dec8m_legacy:
93 ; CHECK: # %bb.0: # %entry
94 ; CHECK-NEXT: decb (%rdi)
97 %a = load i8, ptr %ptr
99 store i8 %dec, ptr %ptr
103 define void @dec16m_legacy(ptr %ptr) {
104 ; CHECK-LABEL: dec16m_legacy:
105 ; CHECK: # %bb.0: # %entry
106 ; CHECK-NEXT: decw (%rdi)
109 %a = load i16, ptr %ptr
111 store i16 %dec, ptr %ptr
115 define void @dec32m_legacy(ptr %ptr) {
116 ; CHECK-LABEL: dec32m_legacy:
117 ; CHECK: # %bb.0: # %entry
118 ; CHECK-NEXT: decl (%rdi)
121 %a = load i32, ptr %ptr
123 store i32 %dec, ptr %ptr
127 define void @dec64m_legacy(ptr %ptr) {
128 ; CHECK-LABEL: dec64m_legacy:
129 ; CHECK: # %bb.0: # %entry
130 ; CHECK-NEXT: decq (%rdi)
133 %a = load i64, ptr %ptr
135 store i64 %dec, ptr %ptr