aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/Thumb2/thumb2-ldr_pre.ll11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/CodeGen/Thumb2/thumb2-ldr_pre.ll b/test/CodeGen/Thumb2/thumb2-ldr_pre.ll
index 7738fd74d3..f773e6331b 100644
--- a/test/CodeGen/Thumb2/thumb2-ldr_pre.ll
+++ b/test/CodeGen/Thumb2/thumb2-ldr_pre.ll
@@ -1,5 +1,7 @@
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | \
-; RUN: grep {ldr.*\\!} | count 2
+; RUN: grep {ldr.*\\!} | count 3
+; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | \
+; RUN: grep {ldrsb.*\\!} | count 1
define i32* @test1(i32* %X, i32* %dest) {
%Y = getelementptr i32* %X, i32 4 ; <i32*> [#uses=2]
@@ -17,3 +19,10 @@ define i32 @test2(i32 %a, i32 %b) {
ret i32 %tmp5
}
+define i8* @test3(i8* %X, i32* %dest) {
+ %tmp1 = getelementptr i8* %X, i32 4
+ %tmp2 = load i8* %tmp1
+ %tmp3 = sext i8 %tmp2 to i32
+ store i32 %tmp3, i32* %dest
+ ret i8* %tmp1
+}