diff options
Diffstat (limited to 'test/CodeGen/Alpha')
26 files changed, 331 insertions, 370 deletions
diff --git a/test/CodeGen/Alpha/2005-07-12-TwoMallocCalls.ll b/test/CodeGen/Alpha/2005-07-12-TwoMallocCalls.ll index 2c3ba9d..c96b14a 100644 --- a/test/CodeGen/Alpha/2005-07-12-TwoMallocCalls.ll +++ b/test/CodeGen/Alpha/2005-07-12-TwoMallocCalls.ll @@ -1,19 +1,17 @@ ; There should be exactly two calls here (memset and malloc), no more. -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep jsr | count 2 +; RUN: llvm-as < %s | llc -march=alpha | grep jsr | count 2 %typedef.bc_struct = type opaque +declare void @llvm.memset.i64(i8*, i8, i64, i32) -implementation ; Functions: - -declare void %llvm.memset.i64(sbyte*, ubyte, ulong, uint) - -bool %l12_l94_bc_divide_endif_2E_3_2E_ce(int* %tmp.71.reload, uint %scale2.1.3, uint %extra.0, %typedef.bc_struct* %n1, %typedef.bc_struct* %n2, int* %tmp.92.reload, uint %tmp.94.reload, int* %tmp.98.reload, uint %tmp.100.reload, sbyte** %tmp.112.out, uint* %tmp.157.out, sbyte** %tmp.158.out) { +define i1 @l12_l94_bc_divide_endif_2E_3_2E_ce(i32* %tmp.71.reload, i32 %scale2.1.3, i32 %extra.0, %typedef.bc_struct* %n1, %typedef.bc_struct* %n2, i32* %tmp.92.reload, i32 %tmp.94.reload, i32* %tmp.98.reload, i32 %tmp.100.reload, i8** %tmp.112.out, i32* %tmp.157.out, i8** %tmp.158.out) { newFuncRoot: - %tmp.120 = add uint %extra.0, 2 ; <uint> [#uses=1] - %tmp.122 = add uint %tmp.120, %tmp.94.reload ; <uint> [#uses=1] - %tmp.123 = add uint %tmp.122, %tmp.100.reload ; <uint> [#uses=2] - %tmp.112 = malloc sbyte, uint %tmp.123 ; <sbyte*> [#uses=3] - %tmp.137 = cast uint %tmp.123 to ulong ; <ulong> [#uses=1] - tail call void %llvm.memset.i64( sbyte* %tmp.112, ubyte 0, ulong %tmp.137, uint 0 ) - ret bool true + %tmp.120 = add i32 %extra.0, 2 ; <i32> [#uses=1] + %tmp.122 = add i32 %tmp.120, %tmp.94.reload ; <i32> [#uses=1] + %tmp.123 = add i32 %tmp.122, %tmp.100.reload ; <i32> [#uses=2] + %tmp.112 = malloc i8, i32 %tmp.123 ; <i8*> [#uses=1] + %tmp.137 = zext i32 %tmp.123 to i64 ; <i64> [#uses=1] + tail call void @llvm.memset.i64( i8* %tmp.112, i8 0, i64 %tmp.137, i32 0 ) + ret i1 true } + diff --git a/test/CodeGen/Alpha/2005-12-12-MissingFCMov.ll b/test/CodeGen/Alpha/2005-12-12-MissingFCMov.ll index 5b9fa19..b45c2a4 100644 --- a/test/CodeGen/Alpha/2005-12-12-MissingFCMov.ll +++ b/test/CodeGen/Alpha/2005-12-12-MissingFCMov.ll @@ -1,44 +1,40 @@ ; This shouldn't crash -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha +; RUN: llvm-as < %s | llc -march=alpha -; ModuleID = 'bugpoint-reduced-simplified.bc' -target endian = little -target pointersize = 64 -%.str_4 = external global [44 x sbyte] ; <[44 x sbyte]*> [#uses=0] +@.str_4 = external global [44 x i8] ; <[44 x i8]*> [#uses=0] -implementation ; Functions: +declare void @printf(i32, ...) -declare void %printf(int, ...) - -void %main() { +define void @main() { entry: - %tmp.11861 = setlt long 0, 1 ; <bool> [#uses=1] - %tmp.19466 = setlt long 0, 1 ; <bool> [#uses=1] - %tmp.21571 = setlt long 0, 1 ; <bool> [#uses=1] - %tmp.36796 = setlt long 0, 1 ; <bool> [#uses=1] - br bool %tmp.11861, label %loopexit.2, label %no_exit.2 + %tmp.11861 = icmp slt i64 0, 1 ; <i1> [#uses=1] + %tmp.19466 = icmp slt i64 0, 1 ; <i1> [#uses=1] + %tmp.21571 = icmp slt i64 0, 1 ; <i1> [#uses=1] + %tmp.36796 = icmp slt i64 0, 1 ; <i1> [#uses=1] + br i1 %tmp.11861, label %loopexit.2, label %no_exit.2 -no_exit.2: ; preds = %entry - ret void +no_exit.2: ; preds = %entry + ret void -loopexit.2: ; preds = %entry - br bool %tmp.19466, label %loopexit.3, label %no_exit.3.preheader +loopexit.2: ; preds = %entry + br i1 %tmp.19466, label %loopexit.3, label %no_exit.3.preheader -no_exit.3.preheader: ; preds = %loopexit.2 - ret void +no_exit.3.preheader: ; preds = %loopexit.2 + ret void -loopexit.3: ; preds = %loopexit.2 - br bool %tmp.21571, label %no_exit.6, label %no_exit.4 +loopexit.3: ; preds = %loopexit.2 + br i1 %tmp.21571, label %no_exit.6, label %no_exit.4 -no_exit.4: ; preds = %loopexit.3 - ret void +no_exit.4: ; preds = %loopexit.3 + ret void -no_exit.6: ; preds = %no_exit.6, %loopexit.3 - %tmp.30793 = setgt long 0, 0 ; <bool> [#uses=1] - br bool %tmp.30793, label %loopexit.6, label %no_exit.6 +no_exit.6: ; preds = %no_exit.6, %loopexit.3 + %tmp.30793 = icmp sgt i64 0, 0 ; <i1> [#uses=1] + br i1 %tmp.30793, label %loopexit.6, label %no_exit.6 -loopexit.6: ; preds = %no_exit.6 - %Z.1 = select bool %tmp.36796, double 1.000000e+00, double 0x3FEFFF7CEDE74EAE ; <double> [#uses=2] - tail call void (int, ...)* %printf( int 0, long 0, long 0, long 0, double 1.000000e+00, double 1.000000e+00, double %Z.1, double %Z.1 ) - ret void +loopexit.6: ; preds = %no_exit.6 + %Z.1 = select i1 %tmp.36796, double 1.000000e+00, double 0x3FEFFF7CEDE74EAE; <double> [#uses=2] + tail call void (i32, ...)* @printf( i32 0, i64 0, i64 0, i64 0, double 1.000000e+00, double 1.000000e+00, double %Z.1, double %Z.1 ) + ret void } + diff --git a/test/CodeGen/Alpha/2006-01-18-MissedGlobal.ll b/test/CodeGen/Alpha/2006-01-18-MissedGlobal.ll index f0a5c17..f89997e 100644 --- a/test/CodeGen/Alpha/2006-01-18-MissedGlobal.ll +++ b/test/CodeGen/Alpha/2006-01-18-MissedGlobal.ll @@ -1,30 +1,27 @@ ; The global symbol should be legalized -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha +; RUN: llvm-as < %s | llc -march=alpha -target endian = little -target pointersize = 64 - %struct.LIST_HELP = type { %struct.LIST_HELP*, sbyte* } - %struct._IO_FILE = type { int, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, %struct._IO_marker*, %struct._IO_FILE*, int, int, long, ushort, sbyte, [1 x sbyte], sbyte*, long, sbyte*, sbyte*, int, [44 x sbyte] } - %struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, int } -%clause_SORT = external global [21 x %struct.LIST_HELP*] ; <[21 x %struct.LIST_HELP*]*> [#uses=1] -%ia_in = external global %struct._IO_FILE* ; <%struct._IO_FILE**> [#uses=1] -%multvec_j = external global [100 x uint] ; <[100 x uint]*> [#uses=1] +target datalayout = "e-p:64:64" + %struct.LIST_HELP = type { %struct.LIST_HELP*, i8* } + %struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i32, [44 x i8] } + %struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, i32 } +@clause_SORT = external global [21 x %struct.LIST_HELP*] ; <[21 x %struct.LIST_HELP*]*> [#uses=0] +@ia_in = external global %struct._IO_FILE* ; <%struct._IO_FILE**> [#uses=1] +@multvec_j = external global [100 x i32] ; <[100 x i32]*> [#uses=0] -implementation ; Functions: - -void %main(int %argc) { +define void @main(i32 %argc) { clock_Init.exit: - %tmp.5.i575 = load int* null ; <int> [#uses=1] - %tmp.309 = seteq int %tmp.5.i575, 0 ; <bool> [#uses=1] - br bool %tmp.309, label %UnifiedReturnBlock, label %then.17 + %tmp.5.i575 = load i32* null ; <i32> [#uses=1] + %tmp.309 = icmp eq i32 %tmp.5.i575, 0 ; <i1> [#uses=1] + br i1 %tmp.309, label %UnifiedReturnBlock, label %then.17 -then.17: ; preds = %clock_Init.exit - store %struct._IO_FILE* null, %struct._IO_FILE** %ia_in - %savedstack = call sbyte* %llvm.stacksave( ) ; <sbyte*> [#uses=0] - ret void +then.17: ; preds = %clock_Init.exit + store %struct._IO_FILE* null, %struct._IO_FILE** @ia_in + %savedstack = call i8* @llvm.stacksave( ) ; <i8*> [#uses=0] + ret void -UnifiedReturnBlock: ; preds = %clock_Init.exit - ret void +UnifiedReturnBlock: ; preds = %clock_Init.exit + ret void } -declare sbyte* %llvm.stacksave() +declare i8* @llvm.stacksave() diff --git a/test/CodeGen/Alpha/2006-01-26-VaargBreak.ll b/test/CodeGen/Alpha/2006-01-26-VaargBreak.ll index e58152e..05ebe1e 100644 --- a/test/CodeGen/Alpha/2006-01-26-VaargBreak.ll +++ b/test/CodeGen/Alpha/2006-01-26-VaargBreak.ll @@ -1,17 +1,14 @@ ; This shouldn't crash -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha +; RUN: llvm-as < %s | llc -march=alpha -; ModuleID = 'simp.bc' -target endian = little -target pointersize = 64 +target datalayout = "e-p:64:64" target triple = "alphaev6-unknown-linux-gnu" deplibs = [ "c", "crtend", "stdc++" ] - %struct.__va_list_tag = type { sbyte*, int } + %struct.__va_list_tag = type { i8*, i32 } -implementation ; Functions: - -uint %emit_library_call_value(int %nargs, ...) { +define i32 @emit_library_call_value(i32 %nargs, ...) { entry: - %tmp.223 = va_arg %struct.__va_list_tag* null, uint ; <uint> [#uses=0] - ret uint %tmp.223 + %tmp.223 = va_arg %struct.__va_list_tag* null, i32 ; <i32> [#uses=1] + ret i32 %tmp.223 } + diff --git a/test/CodeGen/Alpha/2006-04-04-zextload.ll b/test/CodeGen/Alpha/2006-04-04-zextload.ll index 75ad7e0..f3ff5b1 100644 --- a/test/CodeGen/Alpha/2006-04-04-zextload.ll +++ b/test/CodeGen/Alpha/2006-04-04-zextload.ll @@ -1,36 +1,34 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha +; RUN: llvm-as < %s | llc -march=alpha -target endian = little -target pointersize = 64 +target datalayout = "e-p:64:64" target triple = "alphaev67-unknown-linux-gnu" - %llvm.dbg.compile_unit.type = type { uint, { }*, uint, uint, sbyte*, sbyte*, sbyte* } - %struct._Callback_list = type { %struct._Callback_list*, void (uint, %struct.ios_base*, int)*, int, int } - %struct._Impl = type { int, %struct.facet**, ulong, %struct.facet**, sbyte** } - %struct._Words = type { sbyte*, long } - "struct.__codecvt_abstract_base<char,char,__mbstate_t>" = type { %struct.facet } - "struct.basic_streambuf<char,std::char_traits<char> >" = type { int (...)**, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, %struct.locale } - %struct.facet = type { int (...)**, int } - %struct.ios_base = type { int (...)**, long, long, uint, uint, uint, %struct._Callback_list*, %struct._Words, [8 x %struct._Words], int, %struct._Words*, %struct.locale } - %struct.locale = type { %struct._Impl* } - "struct.ostreambuf_iterator<char,std::char_traits<char> >" = type { "struct.basic_streambuf<char,std::char_traits<char> >"*, bool } -%llvm.dbg.compile_unit1047 = external global %llvm.dbg.compile_unit.type ; <%llvm.dbg.compile_unit.type*> [#uses=1] + %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i32, i8*, i8*, i8* } + %struct._Callback_list = type { %struct._Callback_list*, void (i32, %struct.ios_base*, i32)*, i32, i32 } + %struct._Impl = type { i32, %struct.facet**, i64, %struct.facet**, i8** } + %struct._Words = type { i8*, i64 } + %"struct.__codecvt_abstract_base<char,char,__mbstate_t>" = type { %struct.facet } + %"struct.basic_streambuf<char,std::char_traits<char> >" = type { i32 (...)**, i8*, i8*, i8*, i8*, i8*, i8*, %struct.locale } + %struct.facet = type { i32 (...)**, i32 } + %struct.ios_base = type { i32 (...)**, i64, i64, i32, i32, i32, %struct._Callback_list*, %struct._Words, [8 x %struct._Words], i32, %struct._Words*, %struct.locale } + %struct.locale = type { %struct._Impl* } + %"struct.ostreambuf_iterator<char,std::char_traits<char> >" = type { %"struct.basic_streambuf<char,std::char_traits<char> >"*, i1 } +@llvm.dbg.compile_unit1047 = external global %llvm.dbg.compile_unit.type ; <%llvm.dbg.compile_unit.type*> [#uses=1] -implementation ; Functions: - -void %_ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES3_S3_RSt8ios_baseccT_() { +define void @_ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES3_S3_RSt8ios_baseccT_() { entry: - %tmp234 = seteq sbyte 0, 0 ; <bool> [#uses=1] - br bool %tmp234, label %cond_next243, label %cond_true235 + %tmp234 = icmp eq i8 0, 0 ; <i1> [#uses=1] + br i1 %tmp234, label %cond_next243, label %cond_true235 -cond_true235: ; preds = %entry - ret void +cond_true235: ; preds = %entry + ret void -cond_next243: ; preds = %entry - %tmp428 = load long* null ; <long> [#uses=1] - %tmp428 = cast long %tmp428 to uint ; <uint> [#uses=1] - %tmp429 = alloca sbyte, uint %tmp428 ; <sbyte*> [#uses=0] - call void %llvm.dbg.stoppoint( uint 1146, uint 0, { }* cast (%llvm.dbg.compile_unit.type* %llvm.dbg.compile_unit1047 to { }*) ) - unreachable +cond_next243: ; preds = %entry + %tmp428 = load i64* null ; <i64> [#uses=1] + %tmp428.upgrd.1 = trunc i64 %tmp428 to i32 ; <i32> [#uses=1] + %tmp429 = alloca i8, i32 %tmp428.upgrd.1 ; <i8*> [#uses=0] + call void @llvm.dbg.stoppoint( i32 1146, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1047 to { }*) ) + unreachable } -declare void %llvm.dbg.stoppoint(uint, uint, { }*) +declare void @llvm.dbg.stoppoint(i32, i32, { }*) + diff --git a/test/CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll b/test/CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll index 0f2da53..6b55047 100644 --- a/test/CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll +++ b/test/CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll @@ -1,20 +1,18 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha +; RUN: llvm-as < %s | llc -march=alpha -target endian = little -target pointersize = 64 +target datalayout = "e-p:64:64" target triple = "alphaev67-unknown-linux-gnu" -implementation ; Functions: - -int %_ZN9__gnu_cxx18__exchange_and_addEPVii(int* %__mem, int %__val) { +define i32 @_ZN9__gnu_cxx18__exchange_and_addEPVii(i32* %__mem, i32 %__val) { entry: - %__tmp = alloca int, align 4 ; <int*> [#uses=1] - %tmp3 = call int asm sideeffect "\0A$$Lxadd_0:\0A\09ldl_l $0,$3\0A\09addl $0,$4,$1\0A\09stl_c $1,$2\0A\09beq $1,$$Lxadd_0\0A\09mb", "=&r,=*&r,=*m,m,r"( int* %__tmp, int* %__mem, int* %__mem, int %__val ) ; <int> [#uses=1] - ret int %tmp3 + %__tmp = alloca i32, align 4 ; <i32*> [#uses=1] + %tmp3 = call i32 asm sideeffect "\0A$$Lxadd_0:\0A\09ldl_l $0,$3\0A\09addl $0,$4,$1\0A\09stl_c $1,$2\0A\09beq $1,$$Lxadd_0\0A\09mb", "=&r,=*&r,=*m,m,r"( i32* %__tmp, i32* %__mem, i32* %__mem, i32 %__val ) ; <i32> [#uses=1] + ret i32 %tmp3 } -void %_ZN9__gnu_cxx12__atomic_addEPVii(int* %__mem, int %__val) { +define void @_ZN9__gnu_cxx12__atomic_addEPVii(i32* %__mem, i32 %__val) { entry: - %tmp2 = call int asm sideeffect "\0A$$Ladd_1:\0A\09ldl_l $0,$2\0A\09addl $0,$3,$0\0A\09stl_c $0,$1\0A\09beq $0,$$Ladd_1\0A\09mb", "=&r,=*m,m,r"( int* %__mem, int* %__mem, int %__val ) ; <int> [#uses=0] + %tmp2 = call i32 asm sideeffect "\0A$$Ladd_1:\0A\09ldl_l $0,$2\0A\09addl $0,$3,$0\0A\09stl_c $0,$1\0A\09beq $0,$$Ladd_1\0A\09mb", "=&r,=*m,m,r"( i32* %__mem, i32* %__mem, i32 %__val ) ; <i32> [#uses=0] ret void } + diff --git a/test/CodeGen/Alpha/2006-11-01-vastart.ll b/test/CodeGen/Alpha/2006-11-01-vastart.ll index 61d6db9..3f42eda 100644 --- a/test/CodeGen/Alpha/2006-11-01-vastart.ll +++ b/test/CodeGen/Alpha/2006-11-01-vastart.ll @@ -1,18 +1,15 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha +; RUN: llvm-as < %s | llc -march=alpha target datalayout = "e-p:64:64" -target endian = little -target pointersize = 64 target triple = "alphaev67-unknown-linux-gnu" - %struct.va_list = type { sbyte*, int, int } + %struct.va_list = type { i8*, i32, i32 } -implementation ; Functions: - -void %yyerror(int, ...) { +define void @yyerror(i32, ...) { entry: - call void %llvm.va_start( %struct.va_list* null ) + %va.upgrd.1 = bitcast %struct.va_list* null to i8* ; <i8*> [#uses=1] + call void @llvm.va_start( i8* %va.upgrd.1 ) ret void } -declare void %llvm.va_start(%struct.va_list*) +declare void @llvm.va_start(i8*) diff --git a/test/CodeGen/Alpha/bic.ll b/test/CodeGen/Alpha/bic.ll index 4e55d18..6e63511 100644 --- a/test/CodeGen/Alpha/bic.ll +++ b/test/CodeGen/Alpha/bic.ll @@ -1,11 +1,9 @@ ; Make sure this testcase codegens to the bic instruction -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep {bic} +; RUN: llvm-as < %s | llc -march=alpha | grep {bic} -implementation ; Functions: - -long %bar(long %x, long %y) { +define i64 @bar(i64 %x, i64 %y) { entry: - %tmp.1 = xor long %x, -1 ; <long> [#uses=1] - %tmp.2 = and long %y, %tmp.1 - ret long %tmp.2 + %tmp.1 = xor i64 %x, -1 ; <i64> [#uses=1] + %tmp.2 = and i64 %y, %tmp.1 ; <i64> [#uses=1] + ret i64 %tmp.2 } diff --git a/test/CodeGen/Alpha/bsr.ll b/test/CodeGen/Alpha/bsr.ll index 32ea0cb..d461857 100644 --- a/test/CodeGen/Alpha/bsr.ll +++ b/test/CodeGen/Alpha/bsr.ll @@ -1,13 +1,12 @@ ; Make sure this testcase codegens the bsr instruction -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep bsr +; RUN: llvm-as < %s | llc -march=alpha | grep bsr -implementation - -internal long %abc(int %x) { - %tmp.2 = add int %x, -1 ; <int> [#uses=1] - %tmp.0 = call long %abc( int %tmp.2 ) ; <long> [#uses=1] - %tmp.5 = add int %x, -2 ; <int> [#uses=1] - %tmp.3 = call long %abc( int %tmp.5 ) ; <long> [#uses=1] - %tmp.6 = add long %tmp.0, %tmp.3 ; <long> [#uses=1] - ret long %tmp.6 +define internal i64 @abc(i32 %x) { + %tmp.2 = add i32 %x, -1 ; <i32> [#uses=1] + %tmp.0 = call i64 @abc( i32 %tmp.2 ) ; <i64> [#uses=1] + %tmp.5 = add i32 %x, -2 ; <i32> [#uses=1] + %tmp.3 = call i64 @abc( i32 %tmp.5 ) ; <i64> [#uses=1] + %tmp.6 = add i64 %tmp.0, %tmp.3 ; <i64> [#uses=1] + ret i64 %tmp.6 } + diff --git a/test/CodeGen/Alpha/call_adj.ll b/test/CodeGen/Alpha/call_adj.ll index da47c6c..ee8cda8 100644 --- a/test/CodeGen/Alpha/call_adj.ll +++ b/test/CodeGen/Alpha/call_adj.ll @@ -1,15 +1,13 @@ ;All this should do is not crash -;RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha +;RUN: llvm-as < %s | llc -march=alpha -target endian = little -target pointersize = 64 +target datalayout = "e-p:64:64" target triple = "alphaev67-unknown-linux-gnu" -implementation ; Functions: - -void %_ZNSt13basic_filebufIcSt11char_traitsIcEE22_M_convert_to_externalEPcl(uint %f) { +define void @_ZNSt13basic_filebufIcSt11char_traitsIcEE22_M_convert_to_externalEPcl(i32 %f) { entry: - %tmp49 = alloca sbyte, uint %f ; <sbyte*> [#uses=1] - %tmp = call uint null( sbyte* null, sbyte* null, sbyte* null, sbyte* null, sbyte* null, sbyte* null, sbyte* null) - ret void + %tmp49 = alloca i8, i32 %f ; <i8*> [#uses=0] + %tmp = call i32 null( i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null ) ; <i32> [#uses=0] + ret void } + diff --git a/test/CodeGen/Alpha/cmov.ll b/test/CodeGen/Alpha/cmov.ll index 33f1eb8..08e1dad 100644 --- a/test/CodeGen/Alpha/cmov.ll +++ b/test/CodeGen/Alpha/cmov.ll @@ -1,24 +1,23 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | not grep cmovlt -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep cmoveq +; RUN: llvm-as < %s | llc -march=alpha | not grep cmovlt +; RUN: llvm-as < %s | llc -march=alpha | grep cmoveq - -long %cmov_lt(long %a, long %c) { +define i64 @cmov_lt(i64 %a, i64 %c) { entry: - %tmp.1 = setlt long %c, 0 - %retval = select bool %tmp.1, long %a, long 10 - ret long %retval + %tmp.1 = icmp slt i64 %c, 0 ; <i1> [#uses=1] + %retval = select i1 %tmp.1, i64 %a, i64 10 ; <i64> [#uses=1] + ret i64 %retval } -long %cmov_const(long %a, long %b, long %c) { +define i64 @cmov_const(i64 %a, i64 %b, i64 %c) { entry: - %tmp.1 = setlt long %a, %b - %retval = select bool %tmp.1, long %c, long 10 - ret long %retval + %tmp.1 = icmp slt i64 %a, %b ; <i1> [#uses=1] + %retval = select i1 %tmp.1, i64 %c, i64 10 ; <i64> [#uses=1] + ret i64 %retval } -long %cmov_lt2(long %a, long %c) { +define i64 @cmov_lt2(i64 %a, i64 %c) { entry: - %tmp.1 = setgt long %c, 0 - %retval = select bool %tmp.1, long 10, long %a - ret long %retval + %tmp.1 = icmp sgt i64 %c, 0 ; <i1> [#uses=1] + %retval = select i1 %tmp.1, i64 10, i64 %a ; <i64> [#uses=1] + ret i64 %retval } diff --git a/test/CodeGen/Alpha/cmpbge.ll b/test/CodeGen/Alpha/cmpbge.ll index e99a6b1..9b83215 100644 --- a/test/CodeGen/Alpha/cmpbge.ll +++ b/test/CodeGen/Alpha/cmpbge.ll @@ -1,16 +1,16 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep cmpbge | count 2 +; RUN: llvm-as < %s | llc -march=alpha | grep cmpbge | count 2 -bool %test1(ulong %A, ulong %B) { - %C = and ulong %A, 255 - %D = and ulong %B, 255 - %E = setge ulong %C, %D - ret bool %E +define i1 @test1(i64 %A, i64 %B) { + %C = and i64 %A, 255 ; <i64> [#uses=1] + %D = and i64 %B, 255 ; <i64> [#uses=1] + %E = icmp uge i64 %C, %D ; <i1> [#uses=1] + ret i1 %E } -bool %test2(ulong %a, ulong %B) { - %A = shl ulong %a, ubyte 1 - %C = and ulong %A, 254 - %D = and ulong %B, 255 - %E = setge ulong %C, %D - ret bool %E +define i1 @test2(i64 %a, i64 %B) { + %A = shl i64 %a, 1 ; <i64> [#uses=1] + %C = and i64 %A, 254 ; <i64> [#uses=1] + %D = and i64 %B, 255 ; <i64> [#uses=1] + %E = icmp uge i64 %C, %D ; <i1> [#uses=1] + ret i1 %E } diff --git a/test/CodeGen/Alpha/ctlz_e.ll b/test/CodeGen/Alpha/ctlz_e.ll index 9d7c44c..56027dd 100644 --- a/test/CodeGen/Alpha/ctlz_e.ll +++ b/test/CodeGen/Alpha/ctlz_e.ll @@ -1,12 +1,11 @@ ; Make sure this testcase does not use ctpop -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | not grep -i ctpop +; RUN: llvm-as < %s | llc -march=alpha | not grep -i ctpop -declare ulong %llvm.ctlz.i64(ulong) +declare i64 @llvm.ctlz.i64(i64) -implementation ; Functions: - -ulong %bar(ulong %x) { +define i64 @bar(i64 %x) { entry: - %tmp.1 = call ulong %llvm.ctlz.i64( ulong %x ) - ret ulong %tmp.1 + %tmp.1 = call i64 @llvm.ctlz.i64( i64 %x ) ; <i64> [#uses=1] + ret i64 %tmp.1 } + diff --git a/test/CodeGen/Alpha/ctpop.ll b/test/CodeGen/Alpha/ctpop.ll index 388c121..654cd04 100644 --- a/test/CodeGen/Alpha/ctpop.ll +++ b/test/CodeGen/Alpha/ctpop.ll @@ -1,20 +1,19 @@ ; Make sure this testcase codegens to the ctpop instruction -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev67 | grep -i ctpop -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=+CIX | \ +; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev67 | grep -i ctpop +; RUN: llvm-as < %s | llc -march=alpha -mattr=+CIX | \ ; RUN: grep -i ctpop -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev6 | \ +; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev6 | \ ; RUN: not grep -i ctpop -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev56 | \ +; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev56 | \ ; RUN: not grep -i ctpop -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=-CIX | \ +; RUN: llvm-as < %s | llc -march=alpha -mattr=-CIX | \ ; RUN: not grep -i ctpop -declare long %llvm.ctpop.i64(long) +declare i64 @llvm.ctpop.i64(i64) -implementation ; Functions: - -long %bar(long %x) { +define i64 @bar(i64 %x) { entry: - %tmp.1 = call long %llvm.ctpop.i64( long %x ) - ret long %tmp.1 + %tmp.1 = call i64 @llvm.ctpop.i64( i64 %x ) ; <i64> [#uses=1] + ret i64 %tmp.1 } + diff --git a/test/CodeGen/Alpha/eqv.ll b/test/CodeGen/Alpha/eqv.ll index 76bbc92..2539d72 100644 --- a/test/CodeGen/Alpha/eqv.ll +++ b/test/CodeGen/Alpha/eqv.ll @@ -1,11 +1,10 @@ ; Make sure this testcase codegens to the eqv instruction -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep eqv +; RUN: llvm-as < %s | llc -march=alpha | grep eqv -implementation ; Functions: - -long %bar(long %x, long %y) { +define i64 @bar(i64 %x, i64 %y) { entry: - %tmp.1 = xor long %x, -1 ; <long> [#uses=1] - %tmp.2 = xor long %y, %tmp.1 - ret long %tmp.2 + %tmp.1 = xor i64 %x, -1 ; <i64> [#uses=1] + %tmp.2 = xor i64 %y, %tmp.1 ; <i64> [#uses=1] + ret i64 %tmp.2 } + diff --git a/test/CodeGen/Alpha/jmp_table.ll b/test/CodeGen/Alpha/jmp_table.ll index 175e7bf..04182a7 100644 --- a/test/CodeGen/Alpha/jmp_table.ll +++ b/test/CodeGen/Alpha/jmp_table.ll @@ -1,101 +1,98 @@ ; try to check that we have the most important instructions, which shouldn't ; appear otherwise -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep jmp -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep gprel32 -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep ldl -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep rodata -; END. +; RUN: llvm-as < %s | llc -march=alpha | grep jmp +; RUN: llvm-as < %s | llc -march=alpha | grep gprel32 +; RUN: llvm-as < %s | llc -march=alpha | grep ldl +; RUN: llvm-as < %s | llc -march=alpha | grep rodata -target endian = little -target pointersize = 64 +target datalayout = "e-p:64:64" target triple = "alphaev67-unknown-linux-gnu" -%str = internal constant [2 x sbyte] c"1\00" ; <[2 x sbyte]*> [#uses=1] -%str1 = internal constant [2 x sbyte] c"2\00" ; <[2 x sbyte]*> [#uses=1] -%str2 = internal constant [2 x sbyte] c"3\00" ; <[2 x sbyte]*> [#uses=1] -%str3 = internal constant [2 x sbyte] c"4\00" ; <[2 x sbyte]*> [#uses=1] -%str4 = internal constant [2 x sbyte] c"5\00" ; <[2 x sbyte]*> [#uses=1] -%str5 = internal constant [2 x sbyte] c"6\00" ; <[2 x sbyte]*> [#uses=1] -%str6 = internal constant [2 x sbyte] c"7\00" ; <[2 x sbyte]*> [#uses=1] -%str7 = internal constant [2 x sbyte] c"8\00" ; <[2 x sbyte]*> [#uses=1] +@str = internal constant [2 x i8] c"1\00" ; <[2 x i8]*> [#uses=1] +@str1 = internal constant [2 x i8] c"2\00" ; <[2 x i8]*> [#uses=1] +@str2 = internal constant [2 x i8] c"3\00" ; <[2 x i8]*> [#uses=1] +@str3 = internal constant [2 x i8] c"4\00" ; <[2 x i8]*> [#uses=1] +@str4 = internal constant [2 x i8] c"5\00" ; <[2 x i8]*> [#uses=1] +@str5 = internal constant [2 x i8] c"6\00" ; <[2 x i8]*> [#uses=1] +@str6 = internal constant [2 x i8] c"7\00" ; <[2 x i8]*> [#uses=1] +@str7 = internal constant [2 x i8] c"8\00" ; <[2 x i8]*> [#uses=1] -implementation ; Functions: - -int %main(int %x, sbyte** %y) { +define i32 @main(i32 %x, i8** %y) { entry: - %x_addr = alloca int ; <int*> [#uses=2] - %y_addr = alloca sbyte** ; <sbyte***> [#uses=1] - %retval = alloca int, align 4 ; <int*> [#uses=2] - %tmp = alloca int, align 4 ; <int*> [#uses=2] - %foo = alloca sbyte*, align 8 ; <sbyte**> [#uses=9] - "alloca point" = cast int 0 to int ; <int> [#uses=0] - store int %x, int* %x_addr - store sbyte** %y, sbyte*** %y_addr - %tmp = load int* %x_addr ; <int> [#uses=1] - switch int %tmp, label %bb15 [ - int 1, label %bb - int 2, label %bb1 - int 3, label %bb3 - int 4, label %bb5 - int 5, label %bb7 - int 6, label %bb9 - int 7, label %bb11 - int 8, label %bb13 - ] + %x_addr = alloca i32 ; <i32*> [#uses=2] + %y_addr = alloca i8** ; <i8***> [#uses=1] + %retval = alloca i32, align 4 ; <i32*> [#uses=2] + %tmp = alloca i32, align 4 ; <i32*> [#uses=2] + %foo = alloca i8*, align 8 ; <i8**> [#uses=9] + %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] + store i32 %x, i32* %x_addr + store i8** %y, i8*** %y_addr + %tmp.upgrd.1 = load i32* %x_addr ; <i32> [#uses=1] + switch i32 %tmp.upgrd.1, label %bb15 [ + i32 1, label %bb + i32 2, label %bb1 + i32 3, label %bb3 + i32 4, label %bb5 + i32 5, label %bb7 + i32 6, label %bb9 + i32 7, label %bb11 + i32 8, label %bb13 + ] -bb: ; preds = %entry - %tmp = getelementptr [2 x sbyte]* %str, int 0, ulong 0 ; <sbyte*> [#uses=1] - store sbyte* %tmp, sbyte** %foo - br label %bb16 +bb: ; preds = %entry + %tmp.upgrd.2 = getelementptr [2 x i8]* @str, i32 0, i64 0 ; <i8*> [#uses=1] + store i8* %tmp.upgrd.2, i8** %foo + br label %bb16 -bb1: ; preds = %entry - %tmp2 = getelementptr [2 x sbyte]* %str1, int 0, ulong 0 ; <sbyte*> [#uses=1] - store sbyte* %tmp2, sbyte** %foo - br label %bb16 +bb1: ; preds = %entry + %tmp2 = getelementptr [2 x i8]* @str1, i32 0, i64 0 ; <i8*> [#uses=1] + store i8* %tmp2, i8** %foo + br label %bb16 -bb3: ; preds = %entry - %tmp4 = getelementptr [2 x sbyte]* %str2, int 0, ulong 0 ; <sbyte*> [#uses=1] - store sbyte* %tmp4, sbyte** %foo - br label %bb16 +bb3: ; preds = %entry + %tmp4 = getelementptr [2 x i8]* @str2, i32 0, i64 0 ; <i8*> [#uses=1] + store i8* %tmp4, i8** %foo + br label %bb16 -bb5: ; preds = %entry - %tmp6 = getelementptr [2 x sbyte]* %str3, int 0, ulong 0 ; <sbyte*> [#uses=1] - store sbyte* %tmp6, sbyte** %foo - br label %bb16 +bb5: ; preds = %entry + %tmp6 = getelementptr [2 x i8]* @str3, i32 0, i64 0 ; <i8*> [#uses=1] + store i8* %tmp6, i8** %foo + br label %bb16 -bb7: ; preds = %entry - %tmp8 = getelementptr [2 x sbyte]* %str4, int 0, ulong 0 ; <sbyte*> [#uses=1] - store sbyte* %tmp8, sbyte** %foo - br label %bb16 +bb7: ; preds = %entry + %tmp8 = getelementptr [2 x i8]* @str4, i32 0, i64 0 ; <i8*> [#uses=1] + store i8* %tmp8, i8** %foo + br label %bb16 -bb9: ; preds = %entry - %tmp10 = getelementptr [2 x sbyte]* %str5, int 0, ulong 0 ; <sbyte*> [#uses=1] - store sbyte* %tmp10, sbyte** %foo - br label %bb16 +bb9: ; preds = %entry + %tmp10 = getelementptr [2 x i8]* @str5, i32 0, i64 0 ; <i8*> [#uses=1] + store i8* %tmp10, i8** %foo + br label %bb16 -bb11: ; preds = %entry - %tmp12 = getelementptr [2 x sbyte]* %str6, int 0, ulong 0 ; <sbyte*> [#uses=1] - store sbyte* %tmp12, sbyte** %foo - br label %bb16 +bb11: ; preds = %entry + %tmp12 = getelementptr [2 x i8]* @str6, i32 0, i64 0 ; <i8*> [#uses=1] + store i8* %tmp12, i8** %foo + br label %bb16 -bb13: ; preds = %entry - %tmp14 = getelementptr [2 x sbyte]* %str7, int 0, ulong 0 ; <sbyte*> [#uses=1] - store sbyte* %tmp14, sbyte** %foo - br label %bb16 +bb13: ; preds = %entry + %tmp14 = getelementptr [2 x i8]* @str7, i32 0, i64 0 ; <i8*> [#uses=1] + store i8* %tmp14, i8** %foo + br label %bb16 -bb15: ; preds = %entry - br label %bb16 +bb15: ; preds = %entry + br label %bb16 -bb16: ; preds = %bb15, %bb13, %bb11, %bb9, %bb7, %bb5, %bb3, %bb1, %bb - %tmp17 = load sbyte** %foo ; <sbyte*> [#uses=1] - %tmp18 = call int (...)* %print( sbyte* %tmp17 ) ; <int> [#uses=0] - store int 0, int* %tmp - %tmp19 = load int* %tmp ; <int> [#uses=1] - store int %tmp19, int* %retval - br label %return +bb16: ; preds = %bb15, %bb13, %bb11, %bb9, %bb7, %bb5, %bb3, %bb1, %bb + %tmp17 = load i8** %foo ; <i8*> [#uses=1] + %tmp18 = call i32 (...)* @print( i8* %tmp17 ) ; <i32> [#uses=0] + store i32 0, i32* %tmp + %tmp19 = load i32* %tmp ; <i32> [#uses=1] + store i32 %tmp19, i32* %retval + br label %return -return: ; preds = %bb16 - %retval = load int* %retval ; <int> [#uses=1] - ret int %retval +return: ; preds = %bb16 + %retval.upgrd.3 = load i32* %retval ; <i32> [#uses=1] + ret i32 %retval.upgrd.3 } -declare int %print(...) +declare i32 @print(...) + diff --git a/test/CodeGen/Alpha/mul5.ll b/test/CodeGen/Alpha/mul5.ll index 956fbf9..9042015 100644 --- a/test/CodeGen/Alpha/mul5.ll +++ b/test/CodeGen/Alpha/mul5.ll @@ -1,52 +1,53 @@ ; Make sure this testcase does not use mulq -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | \ +; RUN: llvm-as < %s | llvm-as | llc -march=alpha | \ ; RUN: not grep -i mul ; XFAIL: * -implementation ; Functions: - -ulong %foo1(ulong %x) { +define i64 @foo1(i64 %x) { entry: - %tmp.1 = mul ulong %x, 9 ; <ulong> [#uses=1] - ret ulong %tmp.1 + %tmp.1 = mul i64 %x, 9 ; <i64> [#uses=1] + ret i64 %tmp.1 } -ulong %foo3(ulong %x) { + +define i64 @foo3(i64 %x) { entry: - %tmp.1 = mul ulong %x, 259 - ret ulong %tmp.1 + %tmp.1 = mul i64 %x, 259 ; <i64> [#uses=1] + ret i64 %tmp.1 } -ulong %foo4l(ulong %x) { +define i64 @foo4l(i64 %x) { entry: - %tmp.1 = mul ulong %x, 260 - ret ulong %tmp.1 + %tmp.1 = mul i64 %x, 260 ; <i64> [#uses=1] + ret i64 %tmp.1 } -ulong %foo4ln(ulong %x) { +define i64 @foo4ln(i64 %x) { entry: - %tmp.1 = mul ulong %x, 508 - ret ulong %tmp.1 + %tmp.1 = mul i64 %x, 508 ; <i64> [#uses=1] + ret i64 %tmp.1 } -ulong %foo4ln_more(ulong %x) { + +define i64 @foo4ln_more(i64 %x) { entry: - %tmp.1 = mul ulong %x, 252 - ret ulong %tmp.1 + %tmp.1 = mul i64 %x, 252 ; <i64> [#uses=1] + ret i64 %tmp.1 } -ulong %foo1n(ulong %x) { +define i64 @foo1n(i64 %x) { entry: - %tmp.1 = mul ulong %x, 511 - ret ulong %tmp.1 + %tmp.1 = mul i64 %x, 511 ; <i64> [#uses=1] + ret i64 %tmp.1 } -ulong %foo8l(ulong %x) { +define i64 @foo8l(i64 %x) { entry: - %tmp.1 = mul ulong %x, 768 - ret ulong %tmp.1 + %tmp.1 = mul i64 %x, 768 ; <i64> [#uses=1] + ret i64 %tmp.1 } -long %bar(long %x) { +define i64 @bar(i64 %x) { entry: - %tmp.1 = mul long %x, 5 ; <long> [#uses=1] - ret long %tmp.1 + %tmp.1 = mul i64 %x, 5 ; <i64> [#uses=1] + ret i64 %tmp.1 } + diff --git a/test/CodeGen/Alpha/neg1.ll b/test/CodeGen/Alpha/neg1.ll index 037e3a2..ddaed4a 100644 --- a/test/CodeGen/Alpha/neg1.ll +++ b/test/CodeGen/Alpha/neg1.ll @@ -1,9 +1,7 @@ ; Make sure this testcase codegens to the lda -1 instruction -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep {\\-1} +; RUN: llvm-as < %s | llc -march=alpha | grep {\\-1} -implementation ; Functions: - -long %bar() { +define i64 @bar() { entry: - ret long -1 + ret i64 -1 } diff --git a/test/CodeGen/Alpha/not.ll b/test/CodeGen/Alpha/not.ll index 3423aa7..cea9f6b 100644 --- a/test/CodeGen/Alpha/not.ll +++ b/test/CodeGen/Alpha/not.ll @@ -1,10 +1,8 @@ ; Make sure this testcase codegens to the ornot instruction -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep eqv +; RUN: llvm-as < %s | llc -march=alpha | grep eqv -implementation ; Functions: - -long %bar(long %x) { +define i64 @bar(i64 %x) { entry: - %tmp.1 = xor long %x, -1 ; <long> [#uses=1] - ret long %tmp.1 + %tmp.1 = xor i64 %x, -1 ; <i64> [#uses=1] + ret i64 %tmp.1 } diff --git a/test/CodeGen/Alpha/ornot.ll b/test/CodeGen/Alpha/ornot.ll index d2da888..b8d350d 100644 --- a/test/CodeGen/Alpha/ornot.ll +++ b/test/CodeGen/Alpha/ornot.ll @@ -1,11 +1,10 @@ ; Make sure this testcase codegens to the ornot instruction -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep ornot +; RUN: llvm-as < %s | llc -march=alpha | grep ornot -implementation ; Functions: - -long %bar(long %x, long %y) { +define i64 @bar(i64 %x, i64 %y) { entry: - %tmp.1 = xor long %x, -1 ; <long> [#uses=1] - %tmp.2 = or long %y, %tmp.1 - ret long %tmp.2 + %tmp.1 = xor i64 %x, -1 ; <i64> [#uses=1] + %tmp.2 = or i64 %y, %tmp.1 ; <i64> [#uses=1] + ret i64 %tmp.2 } + diff --git a/test/CodeGen/Alpha/rpcc.ll b/test/CodeGen/Alpha/rpcc.ll index ba143a6..193a47f 100644 --- a/test/CodeGen/Alpha/rpcc.ll +++ b/test/CodeGen/Alpha/rpcc.ll @@ -1,10 +1,9 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep rpcc +; RUN: llvm-as < %s | llc -march=alpha | grep rpcc -declare ulong %llvm.readcyclecounter() +declare i64 @llvm.readcyclecounter() -ulong %foo() { +define i64 @foo() { entry: -%tmp.1 = call ulong %llvm.readcyclecounter () -ret ulong %tmp.1 + %tmp.1 = call i64 @llvm.readcyclecounter( ) ; <i64> [#uses=1] + ret i64 %tmp.1 } - diff --git a/test/CodeGen/Alpha/srl_and.ll b/test/CodeGen/Alpha/srl_and.ll index 2ed1bf9..2344833 100644 --- a/test/CodeGen/Alpha/srl_and.ll +++ b/test/CodeGen/Alpha/srl_and.ll @@ -1,10 +1,10 @@ ; Make sure this testcase codegens to the zapnot instruction -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep zapnot +; RUN: llvm-as < %s | llc -march=alpha | grep zapnot -ulong %foo(ulong %y) { +define i64 @foo(i64 %y) { entry: - %tmp = shr ulong %y, ubyte 3 ; <ulong> [#uses=1] - %tmp2 = and ulong %tmp, 8191 ; <ulong> [#uses=1] - ret ulong %tmp2 + %tmp = lshr i64 %y, 3 ; <i64> [#uses=1] + %tmp2 = and i64 %tmp, 8191 ; <i64> [#uses=1] + ret i64 %tmp2 } diff --git a/test/CodeGen/Alpha/weak.ll b/test/CodeGen/Alpha/weak.ll index aefaefd..e00e6d7 100644 --- a/test/CodeGen/Alpha/weak.ll +++ b/test/CodeGen/Alpha/weak.ll @@ -1,17 +1,16 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep .weak.*f -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep .weak.*h +; RUN: llvm-as < %s | llc -march=alpha | grep .weak.*f +; RUN: llvm-as < %s | llc -march=alpha | grep .weak.*h -implementation ; Functions: - -weak uint %f() { +define weak i32 @f() { entry: - unreachable + unreachable } -void %g() { +define void @g() { entry: - tail call void %h( ) + tail call void @h( ) ret void } -declare extern_weak void %h() +declare extern_weak void @h() + diff --git a/test/CodeGen/Alpha/zapnot2.ll b/test/CodeGen/Alpha/zapnot2.ll index d026edd..6a33ca2 100644 --- a/test/CodeGen/Alpha/zapnot2.ll +++ b/test/CodeGen/Alpha/zapnot2.ll @@ -1,10 +1,9 @@ ; Make sure this testcase codegens to the zapnot instruction -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep zapnot +; RUN: llvm-as < %s | llc -march=alpha | grep zapnot -implementation ; Functions: - -long %bar(long %x) { +define i64 @bar(i64 %x) { entry: - %tmp.1 = and long %x, 16711935 ; <long> [#uses=1] - ret long %tmp.1 + %tmp.1 = and i64 %x, 16711935 ; <i64> [#uses=1] + ret i64 %tmp.1 } + diff --git a/test/CodeGen/Alpha/zapnot3.ll b/test/CodeGen/Alpha/zapnot3.ll index c106b6d..26aab37 100644 --- a/test/CodeGen/Alpha/zapnot3.ll +++ b/test/CodeGen/Alpha/zapnot3.ll @@ -1,15 +1,15 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep zapnot +; RUN: llvm-as < %s | llc -march=alpha | grep zapnot ;demanded bits mess up this mask in a hard to fix way -;ulong %foo(ulong %y) { -; %tmp = and ulong %y, 65535 -; %tmp2 = shr ulong %tmp, ubyte 3 -; ret ulong %tmp2 +;define i64 @foo(i64 %y) { +; %tmp = and i64 %y, 65535 +; %tmp2 = shr i64 %tmp, i8 3 +; ret i64 %tmp2 ;} -ulong %foo2(ulong %y) { - %tmp = shr ulong %y, ubyte 3 ; <ulong> [#uses=1] - %tmp2 = and ulong %tmp, 8191 ; <ulong> [#uses=1] - ret ulong %tmp2 +define i64 @foo2(i64 %y) { + %tmp = lshr i64 %y, 3 ; <i64> [#uses=1] + %tmp2 = and i64 %tmp, 8191 ; <i64> [#uses=1] + ret i64 %tmp2 } diff --git a/test/CodeGen/Alpha/zapnot4.ll b/test/CodeGen/Alpha/zapnot4.ll index b805607..1be3ca2 100644 --- a/test/CodeGen/Alpha/zapnot4.ll +++ b/test/CodeGen/Alpha/zapnot4.ll @@ -1,8 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep zapnot +; RUN: llvm-as < %s | llc -march=alpha | grep zapnot -ulong %foo(ulong %y) { - %tmp = shl ulong %y, ubyte 3 ; <ulong> [#uses=1] - %tmp2 = and ulong %tmp, 65535 ; <ulong> [#uses=1] - ret ulong %tmp2 +define i64 @foo(i64 %y) { + %tmp = shl i64 %y, 3 ; <i64> [#uses=1] + %tmp2 = and i64 %tmp, 65535 ; <i64> [#uses=1] + ret i64 %tmp2 } - |