1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+ndd -verify-machineinstrs | FileCheck %s
define i8 @not8r(i8 noundef %a) {
; CHECK-LABEL: not8r:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: notb %dil, %al
; CHECK-NEXT: retq
entry:
%not = xor i8 %a, -1
ret i8 %not
}
define i16 @not16r(i16 noundef %a) {
; CHECK-LABEL: not16r:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: notw %di, %ax
; CHECK-NEXT: retq
entry:
%not = xor i16 %a, -1
ret i16 %not
}
define i32 @not32r(i32 noundef %a) {
; CHECK-LABEL: not32r:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: notl %edi, %eax
; CHECK-NEXT: retq
entry:
%not = xor i32 %a, -1
ret i32 %not
}
define i64 @not64r(i64 noundef %a) {
; CHECK-LABEL: not64r:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: notq %rdi, %rax
; CHECK-NEXT: retq
entry:
%not = xor i64 %a, -1
ret i64 %not
}
define i8 @not8m(ptr %ptr) {
; CHECK-LABEL: not8m:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: notb (%rdi), %al
; CHECK-NEXT: retq
entry:
%a = load i8, ptr %ptr
%not = xor i8 %a, -1
ret i8 %not
}
define i16 @not16m(ptr %ptr) {
; CHECK-LABEL: not16m:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: notw (%rdi), %ax
; CHECK-NEXT: retq
entry:
%a = load i16, ptr %ptr
%not = xor i16 %a, -1
ret i16 %not
}
define i32 @not32m(ptr %ptr) {
; CHECK-LABEL: not32m:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: notl (%rdi), %eax
; CHECK-NEXT: retq
entry:
%a = load i32, ptr %ptr
%not = xor i32 %a, -1
ret i32 %not
}
define i64 @not64m(ptr %ptr) {
; CHECK-LABEL: not64m:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: notq (%rdi), %rax
; CHECK-NEXT: retq
entry:
%a = load i64, ptr %ptr
%not = xor i64 %a, -1
ret i64 %not
}
define void @not8m_legacy(ptr %ptr) {
; CHECK-LABEL: not8m_legacy:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: notb (%rdi)
; CHECK-NEXT: retq
entry:
%a = load i8, ptr %ptr
%not = xor i8 %a, -1
store i8 %not, ptr %ptr
ret void
}
define void @not16m_legacy(ptr %ptr) {
; CHECK-LABEL: not16m_legacy:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: notw (%rdi)
; CHECK-NEXT: retq
entry:
%a = load i16, ptr %ptr
%not = xor i16 %a, -1
store i16 %not, ptr %ptr
ret void
}
define void @not32m_legacy(ptr %ptr) {
; CHECK-LABEL: not32m_legacy:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: notl (%rdi)
; CHECK-NEXT: retq
entry:
%a = load i32, ptr %ptr
%not = xor i32 %a, -1
store i32 %not, ptr %ptr
ret void
}
define void @not64m_legacy(ptr %ptr) {
; CHECK-LABEL: not64m_legacy:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: notq (%rdi)
; CHECK-NEXT: retq
entry:
%a = load i64, ptr %ptr
%not = xor i64 %a, -1
store i64 %not, ptr %ptr
ret void
}
|