mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
b6991ff67e
Reviewed By: arichardson Differential Revision: https://reviews.llvm.org/D95240
50 lines
1.0 KiB
LLVM
50 lines
1.0 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc < %s -mtriple=avr | FileCheck %s
|
|
|
|
define i8 @com8(i8 %x) {
|
|
; CHECK-LABEL: com8:
|
|
; CHECK: ; %bb.0:
|
|
; CHECK-NEXT: com r24
|
|
; CHECK-NEXT: ret
|
|
%neg = xor i8 %x, -1
|
|
ret i8 %neg
|
|
}
|
|
|
|
define i16 @com16(i16 %x) {
|
|
; CHECK-LABEL: com16:
|
|
; CHECK: ; %bb.0:
|
|
; CHECK-NEXT: com r24
|
|
; CHECK-NEXT: com r25
|
|
; CHECK-NEXT: ret
|
|
%neg = xor i16 %x, -1
|
|
ret i16 %neg
|
|
}
|
|
|
|
define i32 @com32(i32 %x) {
|
|
; CHECK-LABEL: com32:
|
|
; CHECK: ; %bb.0:
|
|
; CHECK-NEXT: com r22
|
|
; CHECK-NEXT: com r23
|
|
; CHECK-NEXT: com r24
|
|
; CHECK-NEXT: com r25
|
|
; CHECK-NEXT: ret
|
|
%neg = xor i32 %x, -1
|
|
ret i32 %neg
|
|
}
|
|
|
|
define i64 @com64(i64 %x) {
|
|
; CHECK-LABEL: com64:
|
|
; CHECK: ; %bb.0:
|
|
; CHECK-NEXT: com r18
|
|
; CHECK-NEXT: com r19
|
|
; CHECK-NEXT: com r20
|
|
; CHECK-NEXT: com r21
|
|
; CHECK-NEXT: com r22
|
|
; CHECK-NEXT: com r23
|
|
; CHECK-NEXT: com r24
|
|
; CHECK-NEXT: com r25
|
|
; CHECK-NEXT: ret
|
|
%neg = xor i64 %x, -1
|
|
ret i64 %neg
|
|
}
|