mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-10 22:55:57 +00:00
U test/CodeGen/ARM/tls2.ll U test/CodeGen/ARM/arm-negative-stride.ll U test/CodeGen/ARM/2009-10-30.ll U test/CodeGen/ARM/globals.ll U test/CodeGen/ARM/str_pre-2.ll U test/CodeGen/ARM/ldrd.ll U test/CodeGen/ARM/2009-10-27-double-align.ll U test/CodeGen/Thumb2/thumb2-strb.ll U test/CodeGen/Thumb2/ldr-str-imm12.ll U test/CodeGen/Thumb2/thumb2-strh.ll U test/CodeGen/Thumb2/thumb2-ldr.ll U test/CodeGen/Thumb2/thumb2-str_pre.ll U test/CodeGen/Thumb2/thumb2-str.ll U test/CodeGen/Thumb2/thumb2-ldrh.ll U utils/TableGen/TableGen.cpp U utils/TableGen/DisassemblerEmitter.cpp D utils/TableGen/RISCDisassemblerEmitter.h D utils/TableGen/RISCDisassemblerEmitter.cpp U Makefile.rules U lib/Target/ARM/ARMInstrNEON.td U lib/Target/ARM/Makefile U lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp U lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp U lib/Target/ARM/AsmPrinter/ARMInstPrinter.h D lib/Target/ARM/Disassembler U lib/Target/ARM/ARMInstrFormats.td U lib/Target/ARM/ARMAddressingModes.h U lib/Target/ARM/Thumb2ITBlockPass.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98640 91177308-0d34-0410-b5e6-96231b3b80d8
77 lines
1.7 KiB
LLVM
77 lines
1.7 KiB
LLVM
; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
|
|
|
|
define i16 @f1(i16 %a, i16* %v) {
|
|
; CHECK: f1:
|
|
; CHECK: strh r0, [r1]
|
|
store i16 %a, i16* %v
|
|
ret i16 %a
|
|
}
|
|
|
|
define i16 @f2(i16 %a, i16* %v) {
|
|
; CHECK: f2:
|
|
; CHECK: strh.w r0, [r1, #+4092]
|
|
%tmp2 = getelementptr i16* %v, i32 2046
|
|
store i16 %a, i16* %tmp2
|
|
ret i16 %a
|
|
}
|
|
|
|
define i16 @f2a(i16 %a, i16* %v) {
|
|
; CHECK: f2a:
|
|
; CHECK: strh r0, [r1, #-128]
|
|
%tmp2 = getelementptr i16* %v, i32 -64
|
|
store i16 %a, i16* %tmp2
|
|
ret i16 %a
|
|
}
|
|
|
|
define i16 @f3(i16 %a, i16* %v) {
|
|
; CHECK: f3:
|
|
; CHECK: mov.w r2, #4096
|
|
; CHECK: strh r0, [r1, r2]
|
|
%tmp2 = getelementptr i16* %v, i32 2048
|
|
store i16 %a, i16* %tmp2
|
|
ret i16 %a
|
|
}
|
|
|
|
define i16 @f4(i16 %a, i32 %base) {
|
|
entry:
|
|
; CHECK: f4:
|
|
; CHECK: strh r0, [r1, #-128]
|
|
%tmp1 = sub i32 %base, 128
|
|
%tmp2 = inttoptr i32 %tmp1 to i16*
|
|
store i16 %a, i16* %tmp2
|
|
ret i16 %a
|
|
}
|
|
|
|
define i16 @f5(i16 %a, i32 %base, i32 %offset) {
|
|
entry:
|
|
; CHECK: f5:
|
|
; CHECK: strh r0, [r1, r2]
|
|
%tmp1 = add i32 %base, %offset
|
|
%tmp2 = inttoptr i32 %tmp1 to i16*
|
|
store i16 %a, i16* %tmp2
|
|
ret i16 %a
|
|
}
|
|
|
|
define i16 @f6(i16 %a, i32 %base, i32 %offset) {
|
|
entry:
|
|
; CHECK: f6:
|
|
; CHECK: strh.w r0, [r1, r2, lsl #2]
|
|
%tmp1 = shl i32 %offset, 2
|
|
%tmp2 = add i32 %base, %tmp1
|
|
%tmp3 = inttoptr i32 %tmp2 to i16*
|
|
store i16 %a, i16* %tmp3
|
|
ret i16 %a
|
|
}
|
|
|
|
define i16 @f7(i16 %a, i32 %base, i32 %offset) {
|
|
entry:
|
|
; CHECK: f7:
|
|
; CHECK: lsrs r2, r2, #2
|
|
; CHECK: strh r0, [r1, r2]
|
|
%tmp1 = lshr i32 %offset, 2
|
|
%tmp2 = add i32 %base, %tmp1
|
|
%tmp3 = inttoptr i32 %tmp2 to i16*
|
|
store i16 %a, i16* %tmp3
|
|
ret i16 %a
|
|
}
|