Implement basic support of the several simple Xtensa Options with 1-4 instructions for each option. The Sign Extend Option (SEXT). The NSA Option. The Minimum/Maximum Integer 32-bit Option and Loop Option. Fixed address operands, added OPERAND_PCREL to operands descriptions.
24 lines
644 B
LLVM
24 lines
644 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: llc -mtriple=xtensa --mattr=+sext -verify-machineinstrs < %s \
|
|
; RUN: | FileCheck -check-prefix=XTENSA %s
|
|
|
|
define i32 @sext_i8(i8 %a) {
|
|
; XTENSA-LABEL: sext_i8:
|
|
; XTENSA: .cfi_startproc
|
|
; XTENSA-NEXT: # %bb.0:
|
|
; XTENSA-NEXT: sext a2, a2, 7
|
|
; XTENSA-NEXT: ret
|
|
%res = sext i8 %a to i32
|
|
ret i32 %res
|
|
}
|
|
|
|
define i32 @sext_i16(i16 %a) {
|
|
; XTENSA-LABEL: sext_i16:
|
|
; XTENSA: .cfi_startproc
|
|
; XTENSA-NEXT: # %bb.0:
|
|
; XTENSA-NEXT: sext a2, a2, 15
|
|
; XTENSA-NEXT: ret
|
|
%res = sext i16 %a to i32
|
|
ret i32 %res
|
|
}
|