You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
327 B
19 lines
327 B
; RUN: llc < %s -march=avr | FileCheck %s
|
|
|
|
define i8 @neg8(i8 %x) {
|
|
; CHECK-LABEL: neg8:
|
|
; CHECK: neg r24
|
|
%sub = sub i8 0, %x
|
|
ret i8 %sub
|
|
}
|
|
|
|
define i16 @neg16(i16 %x) {
|
|
; CHECK-LABEL: neg16:
|
|
; CHECK: neg r25
|
|
; CHECK-next: neg r24
|
|
; CHECK-next: sbci r25, 0
|
|
; CHECK-next: ret
|
|
%sub = sub i16 0, %x
|
|
ret i16 %sub
|
|
}
|