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 | external_llvm-69ccadd7535a83b348595cf603126e6a68b2883b.zip external_llvm-69ccadd7535a83b348595cf603126e6a68b2883b.tar.gz external_llvm-69ccadd7535a83b348595cf603126e6a68b2883b.tar.bz2 |
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 6ea7d8d..871592b 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 cabf603..cf040ec 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 ea50b0a..5617f9f 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 861d763..090e840 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 e7d8756..96f971a 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 b044b5c..b16af47 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 fe20b9c..afbe0cd 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 9a876d2..d1dddaa 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 81011cd..4532fe9 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 e16f092..5a53c2c0 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 4569ee2..edb1f28 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 179d99b..08a2c32 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 8e5bbe2..e7b37ee 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 b500162..26259da 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 cdc2651..2d1855b 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 08e49ec..d16c737 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 9043b49..c34324a 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 99cec76..281dafb 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 6733e37..3cb8728 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 0000000..6b29796 --- /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 1873a00..92efaeb 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 bc50d26..a3591df 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 fc88f23..e906f22 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 a97f812..9bab73f 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 e91d49e..9ea3484 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 37fa6c6..6f0b72e 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 5d80e20..6ef37c7 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 a7ad71c..910af3c 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 5a13bad..d05b70d 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 49d2d15..3df2a29 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 97452b4..887699a 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 573ee98..ce48e57 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 484ff2a..8664ace 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 5806f28..196ab01 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 cdbec03..dc1b7c5 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 de7beb9..48558dd 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 d75a49d..672d96a 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 995076e..a0e8c46 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 c8a45c3..5404648 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 |