1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc --mtriple=xtensa < %s | FileCheck %s --check-prefix=XTENSA
4 define i32 @m_offset_0(ptr %p) nounwind {
5 ; XTENSA-LABEL: m_offset_0:
7 ; XTENSA-NEXT: l32i a2, a2, 0
10 %1 = call i32 asm "l32i $0, $1", "=r,*m"(ptr elementtype(i32) %p)
14 define i32 @m_offset_1020(ptr %p) nounwind {
15 ; XTENSA-LABEL: m_offset_1020:
17 ; XTENSA-NEXT: l32i a2, a2, 1020
18 ; XTENSA-NEXT: #NO_APP
20 %1 = getelementptr inbounds i8, ptr %p, i32 1020
21 %2 = call i32 asm "l32i $0, $1", "=r,*m"(ptr elementtype(i32) %1)
25 define i8 @m_i8_offset_7(ptr %p) nounwind {
26 ; XTENSA-LABEL: m_i8_offset_7:
27 ; XTENSA: addi a8, a2, 7
29 ; XTENSA-NEXT: l8ui a2, a8, 0
30 ; XTENSA-NEXT: #NO_APP
32 %1 = getelementptr inbounds i8, ptr %p, i32 7
33 %2 = call i8 asm "l8ui $0, $1", "=r,*m"(ptr elementtype(i8) %1)
37 define i16 @m_i16_offset_10(ptr %p) nounwind {
38 ; XTENSA-LABEL: m_i16_offset_10:
40 ; XTENSA-NEXT: l16si a2, a2, 20
41 ; XTENSA-NEXT: #NO_APP
43 %1 = getelementptr inbounds i16, ptr %p, i32 10
44 %2 = call i16 asm "l16si $0, $1", "=r,*m"(ptr elementtype(i16) %1)