2021-01-26 17:50:56 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
|
|
; RUN: llc < %s -mtriple=avr | FileCheck %s
|
2016-11-10 07:46:52 +08:00
|
|
|
|
|
|
|
define i8 @neg8(i8 %x) {
|
|
|
|
; CHECK-LABEL: neg8:
|
2021-01-26 17:50:56 +08:00
|
|
|
; CHECK: ; %bb.0:
|
|
|
|
; CHECK-NEXT: neg r24
|
|
|
|
; CHECK-NEXT: ret
|
2016-11-10 07:46:52 +08:00
|
|
|
%sub = sub i8 0, %x
|
|
|
|
ret i8 %sub
|
|
|
|
}
|
2020-11-17 17:51:58 +08:00
|
|
|
|
|
|
|
define i16 @neg16(i16 %x) {
|
|
|
|
; CHECK-LABEL: neg16:
|
2021-01-26 17:50:56 +08:00
|
|
|
; CHECK: ; %bb.0:
|
|
|
|
; CHECK-NEXT: neg r25
|
|
|
|
; CHECK-NEXT: neg r24
|
|
|
|
; CHECK-NEXT: sbci r25, 0
|
|
|
|
; CHECK-NEXT: ret
|
2020-11-17 17:51:58 +08:00
|
|
|
%sub = sub i16 0, %x
|
|
|
|
ret i16 %sub
|
|
|
|
}
|