diff options
| author | Ed Schouten <ed@FreeBSD.org> | 2009-06-27 10:44:33 +0000 | 
|---|---|---|
| committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-27 10:44:33 +0000 | 
| commit | f859468f5a21b6952ab62917777f9fb3bba57003 (patch) | |
| tree | 9794dc36f22f2a2b3f8063829d8a9b3a7794acc8 /test/CodeGen/ARM | |
| parent | f76359690a7035ad21498f2ba6be6991d3b2032d (diff) | |
Diffstat (limited to 'test/CodeGen/ARM')
31 files changed, 29 insertions, 632 deletions
diff --git a/test/CodeGen/ARM/2007-01-31-RegInfoAssert.ll b/test/CodeGen/ARM/2007-01-31-RegInfoAssert.ll deleted file mode 100644 index 19c156d47f43..000000000000 --- a/test/CodeGen/ARM/2007-01-31-RegInfoAssert.ll +++ /dev/null @@ -1,16 +0,0 @@ -; RUN: llvm-as < %s | llc -mtriple=thumb-apple-darwin - -%struct.rtx_def = type { i8 } -@str = external global [7 x i8] - -define void @f1() { -	%D = alloca %struct.rtx_def, align 1 -	%tmp1 = bitcast %struct.rtx_def* %D to i32* -	%tmp7 = load i32* %tmp1 -	%tmp14 = lshr i32 %tmp7, 1 -	%tmp1415 = and i32 %tmp14, 1 -	call void (i32, ...)* @printf( i32 undef, i32 0, i32 %tmp1415 ) -	ret void -} - -declare void @printf(i32, ...) diff --git a/test/CodeGen/ARM/2007-02-02-JoinIntervalsCrash.ll b/test/CodeGen/ARM/2007-02-02-JoinIntervalsCrash.ll deleted file mode 100644 index ee52cf0f4e7b..000000000000 --- a/test/CodeGen/ARM/2007-02-02-JoinIntervalsCrash.ll +++ /dev/null @@ -1,27 +0,0 @@ -; RUN: llvm-as < %s | llc -mtriple=thumb-apple-darwin - -	%struct.color_sample = type { i32 } -	%struct.ref = type { %struct.color_sample, i16, i16 } - -define void @zcvrs() { -	br i1 false, label %bb22, label %UnifiedReturnBlock - -bb22: -	br i1 false, label %bb64, label %UnifiedReturnBlock - -bb64: -	%tmp67 = urem i32 0, 0 -	%tmp69 = icmp slt i32 %tmp67, 10 -	%iftmp.13.0 = select i1 %tmp69, i8 48, i8 55 -	%tmp75 = add i8 %iftmp.13.0, 0 -	store i8 %tmp75, i8* null -	%tmp81 = udiv i32 0, 0 -	%tmp83 = icmp eq i32 %tmp81, 0 -	br i1 %tmp83, label %bb85, label %bb64 - -bb85: -	ret void - -UnifiedReturnBlock: -	ret void -} diff --git a/test/CodeGen/ARM/2007-03-06-AddR7.ll b/test/CodeGen/ARM/2007-03-06-AddR7.ll deleted file mode 100644 index ad3e195a0dd7..000000000000 --- a/test/CodeGen/ARM/2007-03-06-AddR7.ll +++ /dev/null @@ -1,117 +0,0 @@ -; RUN: llvm-as < %s | llc -march=thumb -; RUN: llvm-as < %s | llc -mtriple=thumb-apple-darwin -relocation-model=pic \ -; RUN:   -mattr=+v6,+vfp2 | not grep {add r., r7, #2 \\* 4} - -	%struct.__fooAllocator = type opaque -	%struct.__fooY = type { %struct.fooXBase, %struct.__fooString*, %struct.__fooU*, %struct.__fooV*, i8** } -	%struct.__fooZ = type opaque -	%struct.__fooU = type opaque -	%struct.__fooString = type opaque -	%struct.__fooV = type opaque -	%struct.fooXBase = type { i32, [4 x i8] } -	%struct.fooXClass = type { i32, i8*, void (i8*)*, i8* (%struct.__fooAllocator*, i8*)*, void (i8*)*, i8 (i8*, i8*) zeroext *, i32 (i8*)*, %struct.__fooString* (i8*, %struct.__fooZ*)*, %struct.__fooString* (i8*)* } -	%struct.aa_cache = type { i32, i32, [1 x %struct.aa_method*] } -	%struct.aa_class = type { %struct.aa_class*, %struct.aa_class*, i8*, i32, i32, i32, %struct.aa_ivar_list*, %struct.aa_method_list**, %struct.aa_cache*, %struct.aa_protocol_list* } -	%struct.aa_ivar = type { i8*, i8*, i32 } -	%struct.aa_ivar_list = type { i32, [1 x %struct.aa_ivar] } -	%struct.aa_method = type { %struct.aa_ss*, i8*, %struct.aa_object* (%struct.aa_object*, %struct.aa_ss*, ...)* } -	%struct.aa_method_list = type { %struct.aa_method_list*, i32, [1 x %struct.aa_method] } -	%struct.aa_object = type { %struct.aa_class* } -	%struct.aa_protocol_list = type { %struct.aa_protocol_list*, i32, [1 x %struct.aa_object*] } -	%struct.aa_ss = type opaque -@__kfooYTypeID = external global i32		; <i32*> [#uses=3] -@__fooYClass = external constant %struct.fooXClass		; <%struct.fooXClass*> [#uses=1] -@__fooXClassTableSize = external global i32		; <i32*> [#uses=1] -@__fooXAaClassTable = external global i32*		; <i32**> [#uses=1] -@s.10319 = external global %struct.aa_ss*		; <%struct.aa_ss**> [#uses=2] -@str15 = external constant [24 x i8]		; <[24 x i8]*> [#uses=1] - - -define i8 @test(%struct.__fooY* %calendar, double* %atp, i8* %componentDesc, ...) zeroext  { -entry: -	%args = alloca i8*, align 4		; <i8**> [#uses=5] -	%args4 = bitcast i8** %args to i8*		; <i8*> [#uses=2] -	call void @llvm.va_start( i8* %args4 ) -	%tmp6 = load i32* @__kfooYTypeID		; <i32> [#uses=1] -	icmp eq i32 %tmp6, 0		; <i1>:0 [#uses=1] -	br i1 %0, label %cond_true, label %cond_next - -cond_true:		; preds = %entry -	%tmp7 = call i32 @_fooXRegisterClass( %struct.fooXClass* @__fooYClass )		; <i32> [#uses=1] -	store i32 %tmp7, i32* @__kfooYTypeID -	br label %cond_next - -cond_next:		; preds = %cond_true, %entry -	%tmp8 = load i32* @__kfooYTypeID		; <i32> [#uses=2] -	%tmp15 = load i32* @__fooXClassTableSize		; <i32> [#uses=1] -	icmp ugt i32 %tmp15, %tmp8		; <i1>:1 [#uses=1] -	br i1 %1, label %cond_next18, label %cond_true58 - -cond_next18:		; preds = %cond_next -	%tmp21 = getelementptr %struct.__fooY* %calendar, i32 0, i32 0, i32 0		; <i32*> [#uses=1] -	%tmp22 = load i32* %tmp21		; <i32> [#uses=2] -	%tmp29 = load i32** @__fooXAaClassTable		; <i32*> [#uses=1] -	%tmp31 = getelementptr i32* %tmp29, i32 %tmp8		; <i32*> [#uses=1] -	%tmp32 = load i32* %tmp31		; <i32> [#uses=1] -	icmp eq i32 %tmp22, %tmp32		; <i1>:2 [#uses=1] -	%.not = xor i1 %2, true		; <i1> [#uses=1] -	icmp ugt i32 %tmp22, 4095		; <i1>:3 [#uses=1] -	%bothcond = and i1 %.not, %3		; <i1> [#uses=1] -	br i1 %bothcond, label %cond_true58, label %bb48 - -bb48:		; preds = %cond_next18 -	%tmp78 = call i32 @strlen( i8* %componentDesc )		; <i32> [#uses=4] -	%tmp92 = alloca i32, i32 %tmp78		; <i32*> [#uses=2] -	icmp sgt i32 %tmp78, 0		; <i1>:4 [#uses=1] -	br i1 %4, label %cond_true111, label %bb114 - -cond_true58:		; preds = %cond_next18, %cond_next -	%tmp59 = load %struct.aa_ss** @s.10319		; <%struct.aa_ss*> [#uses=2] -	icmp eq %struct.aa_ss* %tmp59, null		; <i1>:5 [#uses=1] -	%tmp6869 = bitcast %struct.__fooY* %calendar to i8*		; <i8*> [#uses=2] -	br i1 %5, label %cond_true60, label %cond_next64 - -cond_true60:		; preds = %cond_true58 -	%tmp63 = call %struct.aa_ss* @sel_registerName( i8* getelementptr ([24 x i8]* @str15, i32 0, i32 0) )		; <%struct.aa_ss*> [#uses=2] -	store %struct.aa_ss* %tmp63, %struct.aa_ss** @s.10319 -	%tmp66137 = volatile load i8** %args		; <i8*> [#uses=1] -	%tmp73138 = call i8 (i8*, %struct.aa_ss*, ...) zeroext * bitcast (%struct.aa_object* (%struct.aa_object*, %struct.aa_ss*, ...)* @aa_mm to i8 (i8*, %struct.aa_ss*, ...) zeroext *)( i8* %tmp6869, %struct.aa_ss* %tmp63, double* %atp, i8* %componentDesc, i8* %tmp66137) zeroext 		; <i8> [#uses=1] -	ret i8 %tmp73138 - -cond_next64:		; preds = %cond_true58 -	%tmp66 = volatile load i8** %args		; <i8*> [#uses=1] -	%tmp73 = call i8 (i8*, %struct.aa_ss*, ...) zeroext * bitcast (%struct.aa_object* (%struct.aa_object*, %struct.aa_ss*, ...)* @aa_mm to i8 (i8*, %struct.aa_ss*, ...) zeroext *)( i8* %tmp6869, %struct.aa_ss* %tmp59, double* %atp, i8* %componentDesc, i8* %tmp66 ) zeroext 		; <i8> [#uses=1] -	ret i8 %tmp73 - -cond_true111:		; preds = %cond_true111, %bb48 -	%idx.2132.0 = phi i32 [ 0, %bb48 ], [ %indvar.next, %cond_true111 ]		; <i32> [#uses=2] -	%tmp95 = volatile load i8** %args		; <i8*> [#uses=2] -	%tmp97 = getelementptr i8* %tmp95, i32 4		; <i8*> [#uses=1] -	volatile store i8* %tmp97, i8** %args -	%tmp9899 = bitcast i8* %tmp95 to i32*		; <i32*> [#uses=1] -	%tmp100 = load i32* %tmp9899		; <i32> [#uses=1] -	%tmp104 = getelementptr i32* %tmp92, i32 %idx.2132.0		; <i32*> [#uses=1] -	store i32 %tmp100, i32* %tmp104 -	%indvar.next = add i32 %idx.2132.0, 1		; <i32> [#uses=2] -	icmp eq i32 %indvar.next, %tmp78		; <i1>:6 [#uses=1] -	br i1 %6, label %bb114, label %cond_true111 - -bb114:		; preds = %cond_true111, %bb48 -	call void @llvm.va_end( i8* %args4 ) -	%tmp122 = call i8 @_fooYCCV( %struct.__fooY* %calendar, double* %atp, i8* %componentDesc, i32* %tmp92, i32 %tmp78 ) zeroext 		; <i8> [#uses=1] -	ret i8 %tmp122 -} - -declare i32 @_fooXRegisterClass(%struct.fooXClass*) - -declare i8 @_fooYCCV(%struct.__fooY*, double*, i8*, i32*, i32) zeroext  - -declare %struct.aa_object* @aa_mm(%struct.aa_object*, %struct.aa_ss*, ...) - -declare %struct.aa_ss* @sel_registerName(i8*) - -declare void @llvm.va_start(i8*) - -declare i32 @strlen(i8*) - -declare void @llvm.va_end(i8*) diff --git a/test/CodeGen/ARM/2007-05-05-InvalidPushPop.ll b/test/CodeGen/ARM/2007-05-05-InvalidPushPop.ll deleted file mode 100644 index 159be4eca334..000000000000 --- a/test/CodeGen/ARM/2007-05-05-InvalidPushPop.ll +++ /dev/null @@ -1,41 +0,0 @@ -; RUN: llvm-as < %s | llc | not grep r11 - -target triple = "thumb-linux-gnueabi" -	%struct.__sched_param = type { i32 } -	%struct.pthread_attr_t = type { i32, i32, %struct.__sched_param, i32, i32, i32, i32, i8*, i32 } -@i.1882 = internal global i32 1		; <i32*> [#uses=2] -@.str = internal constant [14 x i8] c"Thread 1: %d\0A\00"		; <[14 x i8]*> [#uses=1] -@.str1 = internal constant [14 x i8] c"Thread 2: %d\0A\00"		; <[14 x i8]*> [#uses=1] - -define i8* @f(i8* %a) { -entry: -	%tmp1 = load i32* @i.1882		; <i32> [#uses=1] -	%tmp2 = add i32 %tmp1, 1		; <i32> [#uses=2] -	store i32 %tmp2, i32* @i.1882 -	%tmp34 = inttoptr i32 %tmp2 to i8*		; <i8*> [#uses=1] -	ret i8* %tmp34 -} - -define i32 @main() { -entry: -	%t = alloca i32, align 4		; <i32*> [#uses=4] -	%ret = alloca i32, align 4		; <i32*> [#uses=3] -	%tmp1 = call i32 @pthread_create( i32* %t, %struct.pthread_attr_t* null, i8* (i8*)* @f, i8* null )		; <i32> [#uses=0] -	%tmp2 = load i32* %t		; <i32> [#uses=1] -	%ret3 = bitcast i32* %ret to i8**		; <i8**> [#uses=2] -	%tmp4 = call i32 @pthread_join( i32 %tmp2, i8** %ret3 )		; <i32> [#uses=0] -	%tmp5 = load i32* %ret		; <i32> [#uses=1] -	%tmp7 = call i32 (i8*, ...)* @printf( i8* getelementptr ([14 x i8]* @.str, i32 0, i32 0), i32 %tmp5 )		; <i32> [#uses=0] -	%tmp8 = call i32 @pthread_create( i32* %t, %struct.pthread_attr_t* null, i8* (i8*)* @f, i8* null )		; <i32> [#uses=0] -	%tmp9 = load i32* %t		; <i32> [#uses=1] -	%tmp11 = call i32 @pthread_join( i32 %tmp9, i8** %ret3 )		; <i32> [#uses=0] -	%tmp12 = load i32* %ret		; <i32> [#uses=1] -	%tmp14 = call i32 (i8*, ...)* @printf( i8* getelementptr ([14 x i8]* @.str1, i32 0, i32 0), i32 %tmp12 )		; <i32> [#uses=0] -	ret i32 0 -} - -declare i32 @pthread_create(i32*, %struct.pthread_attr_t*, i8* (i8*)*, i8*) - -declare i32 @pthread_join(i32, i8**) - -declare i32 @printf(i8*, ...) diff --git a/test/CodeGen/ARM/2009-06-18-ThumbCommuteMul.ll b/test/CodeGen/ARM/2009-06-18-ThumbCommuteMul.ll deleted file mode 100644 index 9b2aba94ec8d..000000000000 --- a/test/CodeGen/ARM/2009-06-18-ThumbCommuteMul.ll +++ /dev/null @@ -1,8 +0,0 @@ -; RUN: llvm-as < %s | llc -march=thumb | grep r0 | count 1 - -define i32 @a(i32 %x, i32 %y) nounwind readnone { -entry: -	%mul = mul i32 %y, %x		; <i32> [#uses=1] -	ret i32 %mul -} - diff --git a/test/CodeGen/ARM/bic.ll b/test/CodeGen/ARM/bic.ll new file mode 100644 index 000000000000..b4ea433c40cc --- /dev/null +++ b/test/CodeGen/ARM/bic.ll @@ -0,0 +1,13 @@ +; RUN: llvm-as < %s | llc -march=arm | grep {bic\\W*r\[0-9\]*,\\W*r\[0-9\]*,\\W*r\[0-9\]*} | count 2 + +define i32 @f1(i32 %a, i32 %b) { +    %tmp = xor i32 %b, 4294967295 +    %tmp1 = and i32 %a, %tmp +    ret i32 %tmp1 +} + +define i32 @f2(i32 %a, i32 %b) { +    %tmp = xor i32 %b, 4294967295 +    %tmp1 = and i32 %tmp, %a +    ret i32 %tmp1 +} diff --git a/test/CodeGen/ARM/carry.ll b/test/CodeGen/ARM/carry.ll new file mode 100644 index 000000000000..3bf2dc0b4f03 --- /dev/null +++ b/test/CodeGen/ARM/carry.ll @@ -0,0 +1,16 @@ +; RUN: llvm-as < %s | llc -march=arm | grep "subs r" | count 2 +; RUN: llvm-as < %s | llc -march=arm | grep "adc r" +; RUN: llvm-as < %s | llc -march=arm | grep "sbc r"  | count 2 + +define i64 @f1(i64 %a, i64 %b) { +entry: +	%tmp = sub i64 %a, %b +	ret i64 %tmp +} + +define i64 @f2(i64 %a, i64 %b) { +entry: +        %tmp1 = shl i64 %a, 1 +	%tmp2 = sub i64 %tmp1, %b +	ret i64 %tmp2 +} diff --git a/test/CodeGen/ARM/dyn-stackalloc.ll b/test/CodeGen/ARM/dyn-stackalloc.ll index 602fd9bd550a..e0cd4e15f4e3 100644 --- a/test/CodeGen/ARM/dyn-stackalloc.ll +++ b/test/CodeGen/ARM/dyn-stackalloc.ll @@ -1,8 +1,4 @@  ; RUN: llvm-as < %s | llc -march=arm -; RUN: llvm-as < %s | llc -march=thumb | not grep {ldr sp} -; RUN: llvm-as < %s | llc -mtriple=thumb-apple-darwin | \ -; RUN:   not grep {sub.*r7} -; RUN: llvm-as < %s | llc -march=thumb | grep 4294967280  	%struct.state = type { i32, %struct.info*, float**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i8* }  	%struct.info = type { i32, i32, i32, i32, i32, i32, i32, i8* } diff --git a/test/CodeGen/ARM/fpconv.ll b/test/CodeGen/ARM/fpconv.ll index 23850075d0dc..218b25f9c1b1 100644 --- a/test/CodeGen/ARM/fpconv.ll +++ b/test/CodeGen/ARM/fpconv.ll @@ -20,7 +20,6 @@  ; RUN: grep floatsidf %t  ; RUN: grep floatunsisf %t  ; RUN: grep floatunsidf %t -; RUN: llvm-as < %s | llc -march=thumb  define float @f1(double %x) {  entry: diff --git a/test/CodeGen/ARM/fpow.ll b/test/CodeGen/ARM/fpow.ll index 155763c9847a..461a2c966ec4 100644 --- a/test/CodeGen/ARM/fpow.ll +++ b/test/CodeGen/ARM/fpow.ll @@ -1,5 +1,4 @@  ; RUN: llvm-as < %s | llc -march=arm -; RUN: llvm-as < %s | llc -march=thumb  define double @t(double %x, double %y) nounwind optsize {  entry: diff --git a/test/CodeGen/ARM/frame_thumb.ll b/test/CodeGen/ARM/frame_thumb.ll deleted file mode 100644 index fe82db992129..000000000000 --- a/test/CodeGen/ARM/frame_thumb.ll +++ /dev/null @@ -1,9 +0,0 @@ -; RUN: llvm-as < %s | llc -march=thumb -mtriple=arm-apple-darwin \ -; RUN:     -disable-fp-elim | not grep {r11} -; RUN: llvm-as < %s | llc -march=thumb -mtriple=arm-linux-gnueabi \ -; RUN:     -disable-fp-elim | not grep {r11} - -define i32 @f() { -entry: -	ret i32 10 -} diff --git a/test/CodeGen/ARM/iabs.ll b/test/CodeGen/ARM/iabs.ll index f10591f41f76..ede6d7455330 100644 --- a/test/CodeGen/ARM/iabs.ll +++ b/test/CodeGen/ARM/iabs.ll @@ -1,17 +1,10 @@  ; RUN: llvm-as < %s | llc -march=arm -stats |& \  ; RUN:   grep {3 .*Number of machine instrs printed} -; RUN: llvm-as < %s | llc -march=thumb -stats |& \ -; RUN:   grep {4 .*Number of machine instrs printed}  ;; Integer absolute value, should produce something as good as: ARM:  ;;   add r3, r0, r0, asr #31  ;;   eor r0, r3, r0, asr #31  ;;   bx lr -;; Thumb: -;;   asr r2, r0, #31 -;;   add r0, r0, r2 -;;   eor r0, r2 -;;   bx lr  define i32 @test(i32 %a) {          %tmp1neg = sub i32 0, %a diff --git a/test/CodeGen/ARM/inlineasm-imm-thumb.ll b/test/CodeGen/ARM/inlineasm-imm-thumb.ll deleted file mode 100644 index 2c872e7e310f..000000000000 --- a/test/CodeGen/ARM/inlineasm-imm-thumb.ll +++ /dev/null @@ -1,43 +0,0 @@ -; RUN: llvm-as < %s | llc -march=thumb - -; Test Thumb-mode "I" constraint, for ADD immediate. -define i32 @testI(i32 %x) { -	%y = call i32 asm "add $0, $1, $2", "=r,r,I"( i32 %x, i32 255 ) nounwind -	ret i32 %y -} - -; Test Thumb-mode "J" constraint, for negated ADD immediates. -define void @testJ() { -	tail call void asm sideeffect ".word $0", "J"( i32 -255 ) nounwind -	ret void -} - -; Test Thumb-mode "K" constraint, for compatibility with GCC's internal use. -define void @testK() { -	tail call void asm sideeffect ".word $0", "K"( i32 65280 ) nounwind -	ret void -} - -; Test Thumb-mode "L" constraint, for 3-operand ADD immediates. -define i32 @testL(i32 %x) { -	%y = call i32 asm "add $0, $1, $2", "=r,r,L"( i32 %x, i32 -7 ) nounwind -	ret i32 %y -} - -; Test Thumb-mode "M" constraint, for "ADD r = sp + imm". -define i32 @testM() { -	%y = call i32 asm "add $0, sp, $1", "=r,M"( i32 1020 ) nounwind -	ret i32 %y -} - -; Test Thumb-mode "N" constraint, for values between 0 and 31. -define i32 @testN(i32 %x) { -	%y = call i32 asm "lsl $0, $1, $2", "=r,r,N"( i32 %x, i32 31 ) nounwind -	ret i32 %y -} - -; Test Thumb-mode "O" constraint, for "ADD sp = sp + imm". -define void @testO() { -	tail call void asm sideeffect "add sp, sp, $0; add sp, sp, $1", "O,O"( i32 -508, i32 508 ) nounwind -        ret void -} diff --git a/test/CodeGen/ARM/ispositive.ll b/test/CodeGen/ARM/ispositive.ll index 8dcac30fac8b..7e8eb42b690f 100644 --- a/test/CodeGen/ARM/ispositive.ll +++ b/test/CodeGen/ARM/ispositive.ll @@ -1,5 +1,4 @@  ; RUN: llvm-as < %s | llc -march=arm | grep {mov r0, r0, lsr #31} -; RUN: llvm-as < %s | llc -march=thumb | grep {lsr r0, r0, #31}  define i32 @test1(i32 %X) {  entry: diff --git a/test/CodeGen/ARM/large-stack.ll b/test/CodeGen/ARM/large-stack.ll index 42d7d0972dca..b1738a4a38a6 100644 --- a/test/CodeGen/ARM/large-stack.ll +++ b/test/CodeGen/ARM/large-stack.ll @@ -1,5 +1,4 @@  ; RUN: llvm-as < %s | llc -march=arm -; RUN: llvm-as < %s | llc -march=thumb | grep {ldr.*LCP} | count 5  define void @test1() {      %tmp = alloca [ 64 x i32 ] , align 4 diff --git a/test/CodeGen/ARM/ldr_ext.ll b/test/CodeGen/ARM/ldr_ext.ll index edb70d5396df..b99c72197740 100644 --- a/test/CodeGen/ARM/ldr_ext.ll +++ b/test/CodeGen/ARM/ldr_ext.ll @@ -2,10 +2,6 @@  ; RUN: llvm-as < %s | llc -march=arm | grep ldrh | count 1  ; RUN: llvm-as < %s | llc -march=arm | grep ldrsb | count 1  ; RUN: llvm-as < %s | llc -march=arm | grep ldrsh | count 1 -; RUN: llvm-as < %s | llc -march=thumb | grep ldrb | count 1 -; RUN: llvm-as < %s | llc -march=thumb | grep ldrh | count 1 -; RUN: llvm-as < %s | llc -march=thumb | grep ldrsb | count 1 -; RUN: llvm-as < %s | llc -march=thumb | grep ldrsh | count 1  define i32 @test1(i8* %v.pntr.s0.u1) {      %tmp.u = load i8* %v.pntr.s0.u1 diff --git a/test/CodeGen/ARM/ldr_frame.ll b/test/CodeGen/ARM/ldr_frame.ll index 56acc9009799..44315066c4c0 100644 --- a/test/CodeGen/ARM/ldr_frame.ll +++ b/test/CodeGen/ARM/ldr_frame.ll @@ -1,5 +1,4 @@  ; RUN: llvm-as < %s | llc -march=arm | not grep mov -; RUN: llvm-as < %s | llc -march=thumb | grep cpy | count 2  define i32 @f1() {  	%buf = alloca [32 x i32], align 4 diff --git a/test/CodeGen/ARM/long-setcc.ll b/test/CodeGen/ARM/long-setcc.ll index 12af8b8d11fd..4bab330c7360 100644 --- a/test/CodeGen/ARM/long-setcc.ll +++ b/test/CodeGen/ARM/long-setcc.ll @@ -1,5 +1,4 @@  ; RUN: llvm-as < %s | llc -march=arm | grep cmp | count 1 -; RUN: llvm-as < %s | llc -march=thumb | grep cmp | count 1  define i1 @t1(i64 %x) { diff --git a/test/CodeGen/ARM/long.ll b/test/CodeGen/ARM/long.ll index c7bb3866a5d3..fe0ee5473305 100644 --- a/test/CodeGen/ARM/long.ll +++ b/test/CodeGen/ARM/long.ll @@ -9,13 +9,6 @@  ; RUN:   grep smull | count 1  ; RUN: llvm-as < %s | llc -march=arm | \  ; RUN:   grep umull | count 1 -; RUN: llvm-as < %s | llc -march=thumb | \ -; RUN:   grep mvn | count 1 -; RUN: llvm-as < %s | llc -march=thumb | \ -; RUN:   grep adc | count 1 -; RUN: llvm-as < %s | llc -march=thumb | \ -; RUN:   grep sbc | count 1 -; RUN: llvm-as < %s | llc -march=thumb | grep __muldi3  define i64 @f1() {  entry: diff --git a/test/CodeGen/ARM/long_shift.ll b/test/CodeGen/ARM/long_shift.ll index 8d5d2f387973..55d0cdc54151 100644 --- a/test/CodeGen/ARM/long_shift.ll +++ b/test/CodeGen/ARM/long_shift.ll @@ -1,4 +1,3 @@ -; RUN: llvm-as < %s | llc -march=thumb  ; RUN: llvm-as < %s | llc -march=arm > %t  ; RUN: grep rrx %t | count 1  ; RUN: grep __ashldi3 %t diff --git a/test/CodeGen/ARM/mul.ll b/test/CodeGen/ARM/mul.ll index f4f0a04266c2..3543b5de55db 100644 --- a/test/CodeGen/ARM/mul.ll +++ b/test/CodeGen/ARM/mul.ll @@ -1,7 +1,5 @@  ; RUN: llvm-as < %s | llc -march=arm | grep mul | count 2  ; RUN: llvm-as < %s | llc -march=arm | grep lsl | count 2 -; RUN: llvm-as < %s | llc -march=thumb | grep mul | count 3 -; RUN: llvm-as < %s | llc -march=thumb | grep lsl | count 1  define i32 @f1(i32 %u) {      %tmp = mul i32 %u, %u diff --git a/test/CodeGen/ARM/select.ll b/test/CodeGen/ARM/select.ll index ba29c30af5b6..5148a5b86998 100644 --- a/test/CodeGen/ARM/select.ll +++ b/test/CodeGen/ARM/select.ll @@ -6,13 +6,6 @@  ; RUN: llvm-as < %s | llc -march=arm | grep movhi | count 1  ; RUN: llvm-as < %s | llc -march=arm -mattr=+vfp2 | \  ; RUN:   grep fcpydmi | count 1 -; RUN: llvm-as < %s | llc -march=thumb | grep beq | count 1 -; RUN: llvm-as < %s | llc -march=thumb | grep bgt | count 1 -; RUN: llvm-as < %s | llc -march=thumb | grep blt | count 3 -; RUN: llvm-as < %s | llc -march=thumb | grep ble | count 1 -; RUN: llvm-as < %s | llc -march=thumb | grep bls | count 1 -; RUN: llvm-as < %s | llc -march=thumb | grep bhi | count 1 -; RUN: llvm-as < %s | llc -march=thumb | grep __ltdf2  define i32 @f1(i32 %a.s) {  entry: diff --git a/test/CodeGen/ARM/stack-frame.ll b/test/CodeGen/ARM/stack-frame.ll index 73ae11b973c2..c3dd65a594d6 100644 --- a/test/CodeGen/ARM/stack-frame.ll +++ b/test/CodeGen/ARM/stack-frame.ll @@ -1,7 +1,5 @@  ; RUN: llvm-as < %s | llc -march=arm  ; RUN: llvm-as < %s | llc -march=arm | grep add | count 1 -; RUN: llvm-as < %s | llc -march=thumb -; RUN: llvm-as < %s | llc -march=thumb | grep add | count 1  define void @f1() {  	%c = alloca i8, align 1 diff --git a/test/CodeGen/ARM/thumb-imm.ll b/test/CodeGen/ARM/thumb-imm.ll deleted file mode 100644 index 2be393a95cac..000000000000 --- a/test/CodeGen/ARM/thumb-imm.ll +++ /dev/null @@ -1,10 +0,0 @@ -; RUN: llvm-as < %s | llc -march=thumb | not grep CPI - - -define i32 @test1() { -  ret i32 1000 -} - -define i32 @test2() { -  ret i32 -256 -} diff --git a/test/CodeGen/ARM/thumb2-add.ll b/test/CodeGen/ARM/thumb2-add.ll deleted file mode 100644 index d4f408ff76e7..000000000000 --- a/test/CodeGen/ARM/thumb2-add.ll +++ /dev/null @@ -1,50 +0,0 @@ -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep add | grep #255 -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep add | grep #256 -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep add | grep #257 -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep add | grep #4094 -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep add | grep #4095 -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep add | grep #4096 -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep add -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep add | grep lsl | grep #8 - -define i32 @t2ADDrc_255(i32 %lhs) { -    %Rd = add i32 %lhs, 255; -    ret i32 %Rd -} - -define i32 @t2ADDrc_256(i32 %lhs) { -    %Rd = add i32 %lhs, 256; -    ret i32 %Rd -} - -define i32 @t2ADDrc_257(i32 %lhs) { -    %Rd = add i32 %lhs, 257; -    ret i32 %Rd -} - -define i32 @t2ADDrc_4094(i32 %lhs) { -    %Rd = add i32 %lhs, 4094; -    ret i32 %Rd -} - -define i32 @t2ADDrc_4095(i32 %lhs) { -    %Rd = add i32 %lhs, 4095; -    ret i32 %Rd -} - -define i32 @t2ADDrc_4096(i32 %lhs) { -    %Rd = add i32 %lhs, 4096; -    ret i32 %Rd -} - -define i32 @t2ADDrr(i32 %lhs, i32 %rhs) { -    %Rd = add i32 %lhs, %rhs; -    ret i32 %Rd -} - -define i32 @t2ADDrs(i32 %lhs, i32 %rhs) { -    %tmp = shl i32 %rhs, 8 -    %Rd = add i32 %lhs, %tmp; -    ret i32 %Rd -} - diff --git a/test/CodeGen/ARM/thumb2-mov.ll b/test/CodeGen/ARM/thumb2-mov.ll deleted file mode 100644 index 0c4c59689b60..000000000000 --- a/test/CodeGen/ARM/thumb2-mov.ll +++ /dev/null @@ -1,127 +0,0 @@ -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep #11206827 -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep mov | grep movt -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep mov | grep movt -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep mov | grep movt -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep mov | grep movt -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep #2868947712 -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep mov | grep movt -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep mov | grep movt -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep mov | grep movt -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep mov | grep movt -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep #2880154539 -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep mov | grep movt -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep mov | grep movt -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep mov | grep movt -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep mov | grep movt -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep #251658240 -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep #3948544 -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep mov | grep movt -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep #258 -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep #4026531840 - -; Test #<const> - -; var 2.1 - 0x00ab00ab -define i32 @t2_const_var2_1_ok_1(i32 %lhs) { -    %ret = add i32 %lhs, 11206827 ; 0x00ab00ab -    ret i32 %ret -} - -define i32 @t2_const_var2_1_fail_1(i32 %lhs) { -    %ret = add i32 %lhs, 11206843 ; 0x00ab00bb -    ret i32 %ret -} - -define i32 @t2_const_var2_1_fail_2(i32 %lhs) { -    %ret = add i32 %lhs, 27984043 ; 0x01ab00ab -    ret i32 %ret -} - -define i32 @t2_const_var2_1_fail_3(i32 %lhs) { -    %ret = add i32 %lhs, 27984299 ; 0x01ab01ab -    ret i32 %ret -} - -define i32 @t2_const_var2_1_fail_4(i32 %lhs) { -    %ret = add i32 %lhs, 28027649 ; 0x01abab01 -    ret i32 %ret -} - -; var 2.2 - 0xab00ab00 -define i32 @t2_const_var2_2_ok_1(i32 %lhs) { -    %ret = add i32 %lhs, 2868947712 ; 0xab00ab00 -    ret i32 %ret -} - -define i32 @t2_const_var2_2_fail_1(i32 %lhs) { -    %ret = add i32 %lhs, 2868951552 ; 0xab00ba00 -    ret i32 %ret -} - -define i32 @t2_const_var2_2_fail_2(i32 %lhs) { -    %ret = add i32 %lhs, 2868947728 ; 0xab00ab10 -    ret i32 %ret -} - -define i32 @t2_const_var2_2_fail_3(i32 %lhs) { -    %ret = add i32 %lhs, 2869996304 ; 0xab10ab10 -    ret i32 %ret -} - -define i32 @t2_const_var2_2_fail_4(i32 %lhs) { -    %ret = add i32 %lhs, 279685904 ; 0x10abab10 -    ret i32 %ret -} - -; var 2.3 - 0xabababab -define i32 @t2_const_var2_3_ok_1(i32 %lhs) { -    %ret = add i32 %lhs, 2880154539 ; 0xabababab -    ret i32 %ret -} - -define i32 @t2_const_var2_3_fail_1(i32 %lhs) { -    %ret = add i32 %lhs, 2880154554 ; 0xabababba -    ret i32 %ret -} - -define i32 @t2_const_var2_3_fail_2(i32 %lhs) { -    %ret = add i32 %lhs, 2880158379 ; 0xababbaab -    ret i32 %ret -} - -define i32 @t2_const_var2_3_fail_3(i32 %lhs) { -    %ret = add i32 %lhs, 2881137579 ; 0xabbaabab -    ret i32 %ret -} - -define i32 @t2_const_var2_3_fail_4(i32 %lhs) { -    %ret = add i32 %lhs, 3131812779 ; 0xbaababab -    ret i32 %ret -} - -; var 3 - 0x0F000000 -define i32 @t2_const_var3_1_ok_1(i32 %lhs) { -    %ret = add i32 %lhs, 251658240 ; 0x0F000000 -    ret i32 %ret -} - -define i32 @t2_const_var3_2_ok_1(i32 %lhs) { -    %ret = add i32 %lhs, 3948544 ; 0b00000000001111000100000000000000 -    ret i32 %ret -} - -define i32 @t2_const_var3_2_fail_1(i32 %lhs) { -    %ret = add i32 %lhs, 3940352 ; 0b00000000001111000010000000000000 -    ret i32 %ret -} - -define i32 @t2_const_var3_3_ok_1(i32 %lhs) { -    %ret = add i32 %lhs, 258 ; 0b00000000000000000000000100000010 -    ret i32 %ret -} - -define i32 @t2_const_var3_4_ok_1(i32 %lhs) { -    %ret = add i32 %lhs, 4026531840 ; 0xF0000000 -    ret i32 %ret -} - diff --git a/test/CodeGen/ARM/thumb2-mov2.ll b/test/CodeGen/ARM/thumb2-mov2.ll deleted file mode 100644 index d2f8c0b91a58..000000000000 --- a/test/CodeGen/ARM/thumb2-mov2.ll +++ /dev/null @@ -1,65 +0,0 @@ -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep movt | grep #1234 -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep movt | grep #1234 -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep movt | grep #1234 -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep movt | grep #1234 -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep mov  | grep movt - -define i32 @t2MOVTi16_ok_1(i32 %a) { -    %1 = and i32 %a, 65535 -    %2 = shl i32 1234, 16 -    %3 = or  i32 %1, %2 - -    ret i32 %3 -} - -define i32 @t2MOVTi16_test_1(i32 %a) { -    %1 = shl i32  255,   8 -    %2 = shl i32 1234,   8 -    %3 = or  i32   %1, 255  ; This give us 0xFFFF in %3 -    %4 = shl i32   %2,   8  ; This gives us (1234 << 16) in %4 -    %5 = and i32   %a,  %3 -    %6 = or  i32   %4,  %5 - -    ret i32 %6 -} - -define i32 @t2MOVTi16_test_2(i32 %a) { -    %1 = shl i32  255,   8 -    %2 = shl i32 1234,   8 -    %3 = or  i32   %1, 255  ; This give us 0xFFFF in %3 -    %4 = shl i32   %2,   6 -    %5 = and i32   %a,  %3 -    %6 = shl i32   %4,   2  ; This gives us (1234 << 16) in %6 -    %7 = or  i32   %5,  %6 - -    ret i32 %7 -} - -define i32 @t2MOVTi16_test_3(i32 %a) { -    %1 = shl i32  255,   8 -    %2 = shl i32 1234,   8 -    %3 = or  i32   %1, 255  ; This give us 0xFFFF in %3 -    %4 = shl i32   %2,   6 -    %5 = and i32   %a,  %3 -    %6 = shl i32   %4,   2  ; This gives us (1234 << 16) in %6 -    %7 = lshr i32  %6,   6 -    %8 = shl i32   %7,   6 -    %9 = or  i32   %5,  %8 - -    ret i32 %9 -} - -define i32 @t2MOVTi16_test_nomatch_1(i32 %a) { -    %1 = shl i32  255,   8 -    %2 = shl i32 1234,   8 -    %3 = or  i32   %1, 255  ; This give us 0xFFFF in %3 -    %4 = shl i32   %2,   6 -    %5 = and i32   %a,  %3 -    %6 = shl i32   %4,   2  ; This gives us (1234 << 16) in %6 -    %7 = lshr i32  %6,   3 -    %8 = or  i32   %5,  %7 - -    ret i32 %8 -} - - diff --git a/test/CodeGen/ARM/thumb2-shifter.ll b/test/CodeGen/ARM/thumb2-shifter.ll deleted file mode 100644 index f9ec5067ec01..000000000000 --- a/test/CodeGen/ARM/thumb2-shifter.ll +++ /dev/null @@ -1,40 +0,0 @@ -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep lsl -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep lsr -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep asr -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep ror -; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep mov - -define i32 @t2ADDrs_lsl(i32 %X, i32 %Y) { -        %A = shl i32 %Y, 16 -        %B = add i32 %X, %A -        ret i32 %B -} - -define i32 @t2ADDrs_lsr(i32 %X, i32 %Y) { -        %A = lshr i32 %Y, 16 -        %B = add i32 %X, %A -        ret i32 %B -} - -define i32 @t2ADDrs_asr(i32 %X, i32 %Y) { -        %A = ashr i32 %Y, 16 -        %B = add i32 %X, %A -        ret i32 %B -} - -; i32 ror(n) = (x >> n) | (x << (32 - n)) -define i32 @t2ADDrs_ror(i32 %X, i32 %Y) { -        %A = lshr i32 %Y, 16 -        %B = shl  i32 %Y, 16 -        %C = or   i32 %B, %A -        %R = add  i32 %X, %C -        ret i32 %R -} - -define i32 @t2ADDrs_noRegShift(i32 %X, i32 %Y, i8 %sh) { -        %shift.upgrd.1 = zext i8 %sh to i32 -        %A = shl i32 %Y, %shift.upgrd.1 -        %B = add i32 %X, %A -        ret i32 %B -} - diff --git a/test/CodeGen/ARM/tst_teq.ll b/test/CodeGen/ARM/tst_teq.ll index e5aa029d2c1e..bdeee3fa43fe 100644 --- a/test/CodeGen/ARM/tst_teq.ll +++ b/test/CodeGen/ARM/tst_teq.ll @@ -1,6 +1,5 @@  ; RUN: llvm-as < %s | llc -march=arm | grep tst  ; RUN: llvm-as < %s | llc -march=arm | grep teq -; RUN: llvm-as < %s | llc -march=thumb | grep tst  define i32 @f(i32 %a) {  entry: diff --git a/test/CodeGen/ARM/unord.ll b/test/CodeGen/ARM/unord.ll index e1774232d159..149afc4abafe 100644 --- a/test/CodeGen/ARM/unord.ll +++ b/test/CodeGen/ARM/unord.ll @@ -1,7 +1,5 @@  ; RUN: llvm-as < %s | llc -march=arm | grep movne | count 1  ; RUN: llvm-as < %s | llc -march=arm | grep moveq | count 1 -; RUN: llvm-as < %s | llc -march=thumb | grep bne | count 1 -; RUN: llvm-as < %s | llc -march=thumb | grep beq | count 1  define i32 @f1(float %X, float %Y) {  	%tmp = fcmp uno float %X, %Y diff --git a/test/CodeGen/ARM/vargs2.ll b/test/CodeGen/ARM/vargs2.ll deleted file mode 100644 index 5cc86a95ba09..000000000000 --- a/test/CodeGen/ARM/vargs2.ll +++ /dev/null @@ -1,36 +0,0 @@ -; RUN: llvm-as < %s | llc -march=thumb -; RUN: llvm-as < %s | llc -mtriple=arm-linux -march=thumb | grep pop | count 1 -; RUN: llvm-as < %s | llc -mtriple=arm-darwin -march=thumb | grep pop | count 2 - -@str = internal constant [4 x i8] c"%d\0A\00"           ; <[4 x i8]*> [#uses=1] - -define void @f(i32 %a, ...) { -entry: -        %va = alloca i8*, align 4               ; <i8**> [#uses=4] -        %va.upgrd.1 = bitcast i8** %va to i8*           ; <i8*> [#uses=1] -        call void @llvm.va_start( i8* %va.upgrd.1 ) -        br label %bb - -bb:             ; preds = %bb, %entry -        %a_addr.0 = phi i32 [ %a, %entry ], [ %tmp5, %bb ]              ; <i32> [#uses=2] -        %tmp = volatile load i8** %va           ; <i8*> [#uses=2] -        %tmp2 = getelementptr i8* %tmp, i32 4           ; <i8*> [#uses=1] -        volatile store i8* %tmp2, i8** %va -        %tmp5 = add i32 %a_addr.0, -1           ; <i32> [#uses=1] -        %tmp.upgrd.2 = icmp eq i32 %a_addr.0, 1         ; <i1> [#uses=1] -        br i1 %tmp.upgrd.2, label %bb7, label %bb - -bb7:            ; preds = %bb -        %tmp3 = bitcast i8* %tmp to i32*                ; <i32*> [#uses=1] -        %tmp.upgrd.3 = load i32* %tmp3          ; <i32> [#uses=1] -        %tmp10 = call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @str, i32 0, i64 0), i32 %tmp.upgrd.3 )                ; <i32> [#uses=0] -        %va.upgrd.4 = bitcast i8** %va to i8*           ; <i8*> [#uses=1] -        call void @llvm.va_end( i8* %va.upgrd.4 ) -        ret void -} - -declare void @llvm.va_start(i8*) - -declare i32 @printf(i8*, ...) - -declare void @llvm.va_end(i8*)  | 
