diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-12-02 04:23:10 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-12-02 04:23:10 +0000 |
commit | 69ccadd7535a83b348595cf603126e6a68b2883b (patch) | |
tree | b7bd0dcf1c3042a7f4bbbbb4854ececda37568ba /test/Feature | |
parent | a50d5962edbf9606a9a7636d845be9f980c28b87 (diff) | |
download | llvm-69ccadd7535a83b348595cf603126e6a68b2883b.tar.gz llvm-69ccadd7535a83b348595cf603126e6a68b2883b.tar.bz2 llvm-69ccadd7535a83b348595cf603126e6a68b2883b.tar.xz |
Use the llvm-upgrade program to upgrade llvm assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32115 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Feature')
39 files changed, 71 insertions, 66 deletions
diff --git a/test/Feature/alignment.ll b/test/Feature/alignment.ll index 6ea7d8d7ff..871592b2ff 100644 --- a/test/Feature/alignment.ll +++ b/test/Feature/alignment.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/basictest.ll b/test/Feature/basictest.ll index cabf6036dc..cf040ec250 100644 --- a/test/Feature/basictest.ll +++ b/test/Feature/basictest.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll @@ -30,4 +30,3 @@ begin Startup: ret int 0 end - diff --git a/test/Feature/callingconventions.ll b/test/Feature/callingconventions.ll index ea50b0a86a..5617f9f26f 100644 --- a/test/Feature/callingconventions.ll +++ b/test/Feature/callingconventions.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/calltest.ll b/test/Feature/calltest.ll index 861d7632d4..090e840007 100644 --- a/test/Feature/calltest.ll +++ b/test/Feature/calltest.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/casttest.ll b/test/Feature/casttest.ll index e7d8756791..96f971a0e8 100644 --- a/test/Feature/casttest.ll +++ b/test/Feature/casttest.ll @@ -1,23 +1,7 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll -void "NewCasts" (short %x) { - %a = zext short %x to int - %b = sext short %x to uint - %c = trunc short %x to ubyte - %d = uitofp short %x to float - %e = sitofp short %x to double - %f = fptoui float %d to short - %g = fptosi double %e to short - %i = fpext float %d to double - %j = fptrunc double %i to float - %k = bitcast int %a to float - %l = inttoptr short %x to int* - %m = ptrtoint int* %l to long - ret void -} - short "FunFunc"(long %x, sbyte %z) begin bb0: ;;<label> diff --git a/test/Feature/cfgstructures.ll b/test/Feature/cfgstructures.ll index b044b5cf52..b16af47af1 100644 --- a/test/Feature/cfgstructures.ll +++ b/test/Feature/cfgstructures.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/constexpr.ll b/test/Feature/constexpr.ll index fe20b9c11b..afbe0cd1f8 100644 --- a/test/Feature/constexpr.ll +++ b/test/Feature/constexpr.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/constpointer.ll b/test/Feature/constpointer.ll index 9a876d2ced..d1dddaadb3 100644 --- a/test/Feature/constpointer.ll +++ b/test/Feature/constpointer.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/escaped_label.ll b/test/Feature/escaped_label.ll index 81011cdc94..4532fe99bc 100644 --- a/test/Feature/escaped_label.ll +++ b/test/Feature/escaped_label.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/float.ll b/test/Feature/float.ll index e16f092e4c..5a53c2c0a3 100644 --- a/test/Feature/float.ll +++ b/test/Feature/float.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > Output/t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > Output/t1.ll ; RUN: llvm-as Output/t1.ll -o - | llvm-dis > Output/t2.ll ; RUN: diff Output/t1.ll Output/t2.ll diff --git a/test/Feature/forwardreftest.ll b/test/Feature/forwardreftest.ll index 4569ee2b30..edb1f281eb 100644 --- a/test/Feature/forwardreftest.ll +++ b/test/Feature/forwardreftest.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/global_section.ll b/test/Feature/global_section.ll index 179d99bba8..08a2c323dd 100644 --- a/test/Feature/global_section.ll +++ b/test/Feature/global_section.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/globalredefinition.ll b/test/Feature/globalredefinition.ll index 8e5bbe24ba..e7b37eedc6 100644 --- a/test/Feature/globalredefinition.ll +++ b/test/Feature/globalredefinition.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/globalvars.ll b/test/Feature/globalvars.ll index b5001627c6..26259dad4c 100644 --- a/test/Feature/globalvars.ll +++ b/test/Feature/globalvars.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/indirectcall.ll b/test/Feature/indirectcall.ll index cdc2651e70..2d1855b903 100644 --- a/test/Feature/indirectcall.ll +++ b/test/Feature/indirectcall.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/indirectcall2.ll b/test/Feature/indirectcall2.ll index 08e49ecd5e..d16c737374 100644 --- a/test/Feature/indirectcall2.ll +++ b/test/Feature/indirectcall2.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/inlineasm.ll b/test/Feature/inlineasm.ll index 9043b494ea..c34324a3ee 100644 --- a/test/Feature/inlineasm.ll +++ b/test/Feature/inlineasm.ll @@ -1,5 +1,5 @@ -; RUN: llvm-as %s -o /dev/null -f && -; RUN: llvm-as %s -o - | llvm-dis > Output/t1.ll && +; RUN: llvm-upgrade %s -o - | llvm-as -o /dev/null -f && +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > Output/t1.ll && ; RUN: llvm-as Output/t1.ll -o - | llvm-dis > Output/t2.ll && ; RUN: diff Output/t1.ll Output/t2.ll diff --git a/test/Feature/instructions.ll b/test/Feature/instructions.ll index 99cec7699c..281dafb5a2 100644 --- a/test/Feature/instructions.ll +++ b/test/Feature/instructions.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/intrinsics.ll b/test/Feature/intrinsics.ll index 6733e37119..3cb8728c2d 100644 --- a/test/Feature/intrinsics.ll +++ b/test/Feature/intrinsics.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/newcasts.ll b/test/Feature/newcasts.ll new file mode 100644 index 0000000000..6b297961aa --- /dev/null +++ b/test/Feature/newcasts.ll @@ -0,0 +1,21 @@ +; RUN: llvm-as < %s | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + +void "NewCasts" (short %x) { + %a = zext short %x to int + %b = sext short %x to uint + %c = trunc short %x to ubyte + %d = uitofp short %x to float + %e = sitofp short %x to double + %f = fptoui float %d to short + %g = fptosi double %e to short + %i = fpext float %d to double + %j = fptrunc double %i to float + %k = bitcast int %a to float + %l = inttoptr short %x to int* + %m = ptrtoint int* %l to long + ret void +} + + diff --git a/test/Feature/opaquetypes.ll b/test/Feature/opaquetypes.ll index 1873a00af9..92efaebfd0 100644 --- a/test/Feature/opaquetypes.ll +++ b/test/Feature/opaquetypes.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/packed.ll b/test/Feature/packed.ll index bc50d26015..a3591dffe8 100755 --- a/test/Feature/packed.ll +++ b/test/Feature/packed.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/properties.ll b/test/Feature/properties.ll index fc88f239dc..e906f22b18 100644 --- a/test/Feature/properties.ll +++ b/test/Feature/properties.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/prototype.ll b/test/Feature/prototype.ll index a97f8129b1..9bab73f7fb 100644 --- a/test/Feature/prototype.ll +++ b/test/Feature/prototype.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/recursivetype.ll b/test/Feature/recursivetype.ll index e91d49e815..9ea3484842 100644 --- a/test/Feature/recursivetype.ll +++ b/test/Feature/recursivetype.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/simplecalltest.ll b/test/Feature/simplecalltest.ll index 37fa6c62ab..6f0b72e901 100644 --- a/test/Feature/simplecalltest.ll +++ b/test/Feature/simplecalltest.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/small.ll b/test/Feature/small.ll index 5d80e2003a..6ef37c7083 100644 --- a/test/Feature/small.ll +++ b/test/Feature/small.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/smallest.ll b/test/Feature/smallest.ll index a7ad71c384..910af3c88f 100644 --- a/test/Feature/smallest.ll +++ b/test/Feature/smallest.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/testalloca.ll b/test/Feature/testalloca.ll index 5a13bada72..d05b70d0c3 100644 --- a/test/Feature/testalloca.ll +++ b/test/Feature/testalloca.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/testconstants.ll b/test/Feature/testconstants.ll index 49d2d152ae..3df2a2971e 100644 --- a/test/Feature/testconstants.ll +++ b/test/Feature/testconstants.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/testlogical.ll b/test/Feature/testlogical.ll index 97452b4557..887699ab5f 100644 --- a/test/Feature/testlogical.ll +++ b/test/Feature/testlogical.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/testmemory.ll b/test/Feature/testmemory.ll index 573ee982d7..ce48e57606 100644 --- a/test/Feature/testmemory.ll +++ b/test/Feature/testmemory.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/testswitch.ll b/test/Feature/testswitch.ll index 484ff2abc1..8664ace55a 100644 --- a/test/Feature/testswitch.ll +++ b/test/Feature/testswitch.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/testvarargs.ll b/test/Feature/testvarargs.ll index 5806f2899a..196ab01e40 100644 --- a/test/Feature/testvarargs.ll +++ b/test/Feature/testvarargs.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/undefined.ll b/test/Feature/undefined.ll index cdbec03d39..dc1b7c547a 100644 --- a/test/Feature/undefined.ll +++ b/test/Feature/undefined.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/unreachable.ll b/test/Feature/unreachable.ll index de7beb93ae..48558dded0 100644 --- a/test/Feature/unreachable.ll +++ b/test/Feature/unreachable.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/varargs.ll b/test/Feature/varargs.ll index d75a49d8ed..672d96a428 100644 --- a/test/Feature/varargs.ll +++ b/test/Feature/varargs.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll @@ -6,18 +6,19 @@ ; the va_arg instruction. implementation -declare sbyte* %llvm.va_start() -declare sbyte* %llvm.va_copy(sbyte*) -declare void %llvm.va_end(sbyte*) +declare void %llvm.va_start(sbyte** %ap) +declare void %llvm.va_copy(sbyte** %aq, sbyte** %ap) +declare void %llvm.va_end(sbyte** %ap) int %test(int %X, ...) { - %ap = call sbyte* %llvm.va_start() - %aq = call sbyte* %llvm.va_copy(sbyte* %ap) - call void %llvm.va_end(sbyte* %aq) - - %tmp = vaarg sbyte* %ap, int - %ap2 = vanext sbyte* %ap, int + %ap = alloca sbyte* + call void %llvm.va_start(sbyte** %ap) + %tmp = va_arg sbyte** %ap, int - call void %llvm.va_end(sbyte* %ap2) + %aq = alloca sbyte* + call void %llvm.va_copy(sbyte** %aq, sbyte** %ap) + call void %llvm.va_end(sbyte** %aq) + + call void %llvm.va_end(sbyte** %ap) ret int %tmp } diff --git a/test/Feature/varargs_new.ll b/test/Feature/varargs_new.ll index 995076e1a0..a0e8c46af6 100644 --- a/test/Feature/varargs_new.ll +++ b/test/Feature/varargs_new.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll diff --git a/test/Feature/weirdnames.ll b/test/Feature/weirdnames.ll index c8a45c34a6..54046480ae 100644 --- a/test/Feature/weirdnames.ll +++ b/test/Feature/weirdnames.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll |