-; RUN: llvm-as < %s | opt -anders-aa -load-vn -gcse -deadargelim | llvm-dis | not grep ARG
+; RUN: llvm-upgrade < %s | llvm-as | opt -anders-aa -load-vn -gcse -deadargelim | llvm-dis | not grep ARG
%G = internal constant int* null
-; RUN: llvm-as < %s | opt -anders-aa -aa-eval
+; RUN: llvm-upgrade < %s | llvm-as | opt -anders-aa -aa-eval
implementation
-; RUN: llvm-as < %s | opt -anders-aa -load-vn -gcse -deadargelim | llvm-dis | grep store | not grep null
+; RUN: llvm-upgrade < %s | llvm-as | opt -anders-aa -load-vn -gcse -deadargelim | llvm-dis | grep store | not grep null
; Because the 'internal' function is passed to an external function, we don't
; know what the incoming values will alias. As such, we cannot do the
-; RUN: llvm-as < %s | opt -anders-aa -load-vn -gcse -instcombine | llvm-dis | grep 'ret bool true'
+; RUN: llvm-upgrade < %s | llvm-as | opt -anders-aa -load-vn -gcse -instcombine | llvm-dis | grep 'ret bool true'
%G = internal global int* null
declare int *%ext()
-; RUN: llvm-as < %s | opt -anders-aa -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -anders-aa -disable-output
void %foo() { ret void }
; is performed. It is not legal to delete the second load instruction because
; the value computed by the first load instruction is changed by the store.
-; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | grep DONOTREMOVE
+; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -instcombine | llvm-dis | grep DONOTREMOVE
int %test() {
%A = alloca int
-; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -aa-eval -disable-output
; Test for a bug in BasicAA which caused a crash when querying equality of P1&P2
void %test({[2 x int],[2 x int]}* %A, long %X, long %Y) {
%P1 = getelementptr {[2 x int],[2 x int]}* %A, long 0, uint 0, long %X
-; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | grep sub
+; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -instcombine | llvm-dis | grep sub
; BasicAA was incorrectly concluding that P1 and P2 didn't conflict!
-; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -aa-eval -disable-output
; Test for a bug in BasicAA which caused a crash when querying equality of P1&P2
void %test([17 x ushort]* %mask_bits) {
%P1 = getelementptr [17 x ushort]* %mask_bits, long 0, long 0
-; RUN: llvm-as < %s | opt -licm -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm -disable-output
%struct..apr_array_header_t = type { int*, int, int, int, sbyte* }
%struct..apr_table_t = type { %struct..apr_array_header_t, uint, [32 x int], [32 x int] }
-; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -aa-eval -disable-output
int %MTConcat([3 x int]* %a.1) {
%tmp.961 = getelementptr [3 x int]* %a.1, long 0, long 4
-; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -aa-eval -disable-output
%struct..RefPoint = type { int, { uint, ushort, ushort } }
%struct..RefRect = type { %struct..RefPoint, %struct..RefPoint }
; In this test, a local alloca cannot alias an incoming argument.
-; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | not grep sub
+; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -instcombine | llvm-dis | not grep sub
int %test(int* %P) {
%X = alloca int
; This testcase consists of alias relations which should be completely
; resolvable by basicaa.
-; RUN: llvm-as < %s | opt -aa-eval -print-may-aliases 2>&1 -disable-output | not grep May:
+; RUN: llvm-upgrade < %s | llvm-as | opt -aa-eval -print-may-aliases 2>&1 -disable-output | not grep May:
%T = type { uint, [10 x ubyte] }
; This testcase consists of alias relations which should be completely
; resolvable by basicaa, but require analysis of getelementptr constant exprs.
-; RUN: llvm-as < %s | opt -aa-eval -print-may-aliases 2>&1 -disable-output | not grep May:
+; RUN: llvm-upgrade < %s | llvm-as | opt -aa-eval -print-may-aliases 2>&1 -disable-output | not grep May:
%T = type { uint, [10 x ubyte] }
-; RUN: llvm-as < %s | opt -licm
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm
"java/lang/Object" = type { %struct.llvm_java_object_base }
"java/lang/StringBuffer" = type { "java/lang/Object", int, { "java/lang/Object", uint, [0 x ushort] }*, bool }
-; RUN: llvm-as < %s | opt -dse
+; RUN: llvm-upgrade < %s | llvm-as | opt -dse
"java/lang/Object" = type { %struct.llvm_java_object_base }
"java/lang/StringBuffer" = type { "java/lang/Object", int, { "java/lang/Object", uint, [0 x ushort] }*, bool }
-; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'load int\* %A'
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'load int\* %A'
declare double* %useit(int*)
-; RUN: llvm-as < %s | opt -aa-eval -disable-output 2>&1 | grep '2 no alias respon'
+; RUN: llvm-upgrade < %s | llvm-as | opt -aa-eval -disable-output 2>&1 | grep '2 no alias respon'
;; TEST that A[1][0] may alias A[0][i].
-; RUN: llvm-as < %s | opt -licm -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm -disable-output
target endian = big
target pointersize = 32
target triple = "powerpc-apple-darwin8.7.0"
; This testcase tests for various features the basicaa test should be able to
; determine, as noted in the comments.
-; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | llvm-dis | not grep REMOVE
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine -dce | llvm-dis | not grep REMOVE
%Global = external global { int }
; disambiguating some obvious cases. All loads should be removable in
; this testcase.
-; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | llvm-dis | not grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine -dce | llvm-dis | not grep load
%A = global int 7
%B = global int 8
; A store or load cannot alias a global if the accessed amount is larger then
; the global.
-; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep load
%B = global short 8
; two pointers, then the load should be hoisted, and the store sunk. Thus
; the loop becomes empty and can be deleted by ADCE.
-; RUN: llvm-as < %s | opt -basicaa -licm --adce | llvm-dis | not grep Loop
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -licm --adce | llvm-dis | not grep Loop
%A = global int 7
%B = global int 8
; A very rudimentary test on AliasAnalysis::getModRefInfo.
-; RUN: llvm-as < %s | opt -print-all-alias-modref-info -aa-eval -disable-output &&
-; RUN: llvm-as < %s | opt -print-all-alias-modref-info -aa-eval -disable-output 2>&1 | not grep NoModRef
+; RUN: llvm-upgrade < %s | llvm-as | opt -print-all-alias-modref-info -aa-eval -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -print-all-alias-modref-info -aa-eval -disable-output 2>&1 | not grep NoModRef
int %callee() {
%X = alloca { int, int }
-; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'ret int 0'
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'ret int 0'
declare void %foo(int*)
declare void %bar()
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-dspass=td -dsgc-check-flags=Ptr:HR
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-dspass=td -dsgc-check-flags=Ptr:HR
-; RUN: llvm-as < %s | opt -no-aa -ds-aa -load-vn -gcse | llvm-dis | not grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -no-aa -ds-aa -load-vn -gcse | llvm-dis | not grep load
%T = type { int*, int* }
int %main() {
; This is the same testcase as 2003-06-29-NodeCollapsing2.ll, but it uses the
; graph checker.
;
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-abort-if-any-collapsed
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-abort-if-any-collapsed
;
%T = type { int}
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-dspass=td -dsgc-check-flags=X:GM
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-dspass=td -dsgc-check-flags=X:GM
%G = internal global int 5
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-abort-if-any-collapsed
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-abort-if-any-collapsed
%X = internal global { int, short, short } { int 1, short 2, short 3 }
; This should cause the global node to collapse!!
; XFAIL: *
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc --dsgc-check-flags=test:GAU
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc --dsgc-check-flags=test:GAU
%Tree = type { int, %Tree*, %Tree* }
%T5 = external global %Tree
; This is the same testcase as 2003-06-29-NodeCollapsing2.ll, but it uses the
; graph checker.
;
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-abort-if-any-collapsed
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-abort-if-any-collapsed
;
%S = type { double, int }
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-check-flags=Xn:SMR &&
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-check-flags=X:SMR
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-check-flags=Xn:SMR &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-check-flags=X:SMR
declare void %llvm.memcpy.i32(sbyte*, sbyte*, uint, uint)
declare void %llvm.memmove.i32(sbyte*, sbyte*, uint, uint)
-; RUN: llvm-as < %s | opt -ds-aa -load-vn -gcse -instcombine | llvm-dis | not grep sub
+; RUN: llvm-upgrade < %s | llvm-as | opt -ds-aa -load-vn -gcse -instcombine | llvm-dis | not grep sub
void %bar(int* %p) {
ret void
-; RUN: llvm-as < %s | opt -ds-aa -load-vn -gcse -instcombine | llvm-dis | grep sub
+; RUN: llvm-upgrade < %s | llvm-as | opt -ds-aa -load-vn -gcse -instcombine | llvm-dis | grep sub
void %bar(int* %p) {
store int 15, int* %p
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-check-flags=G:GIM -dsgc-dspass=bu &&\
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-check-flags=G:GIM -dsgc-dspass=td
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-check-flags=G:GIM -dsgc-dspass=bu &&\
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-check-flags=G:GIM -dsgc-dspass=td
%S = type { double, int }
-; RUN: llvm-as < %s | opt -ds-aa -load-vn -gcse | llvm-dis | grep 'load int\* %L'
+; RUN: llvm-upgrade < %s | llvm-as | opt -ds-aa -load-vn -gcse | llvm-dis | grep 'load int\* %L'
%G = internal global int* null
-; RUN: llvm-as < %s | opt -analyze -datastructure
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure
target endian = little
target pointersize = 32
-; RUN: llvm-as < %s | opt -analyze -datastructure
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure
; ModuleID = 'bug3.bc'
target endian = little
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-check-flags=x:IA
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-check-flags=x:IA
; ModuleID = 'bug3.bc'
target endian = little
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-dspass=bu -dsgc-check-flags=Y:SHM && \
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-dspass=td -dsgc-check-flags=P1:SHM,P2:SHM
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-dspass=bu -dsgc-check-flags=Y:SHM && \
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-dspass=td -dsgc-check-flags=P1:SHM,P2:SHM
%G = internal constant [2 x int*(int*)*] [
int*(int*)* %callee1, int*(int*)* %callee2
; -- latter should remain unresolved in main() and copied to GG
; -- globals in GG pointed to by latter should be marked I, but not other nodes
;
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-check-flags=KnownPtr:S,UnknownPtr:SI -dsgc-dspass=bu
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-check-flags=KnownPtr:S,UnknownPtr:SI -dsgc-dspass=bu
%Z = internal global int 0
%X = internal global int 0
-; RUN: llvm-as < %s | opt -analyze -budatastructure -dont-print-ds
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -budatastructure -dont-print-ds
%MidFnTy = type void (\2*)
; Test to check for support for "physical subtyping"
;
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-abort-if-any-collapsed
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-abort-if-any-collapsed
;
%S = type { int }
%T = type { int, float, double }
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc --dsgc-abort-if-merged=Y,BVal
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc --dsgc-abort-if-merged=Y,BVal
implementation
; This tests to make sure that G ends up in the globals graph of the BU pass.
; If it is not, then %G will get converted to a 'constant' from a 'global'
;
-; RUN: llvm-as < %s | opt -ds-opt -globaldce | llvm-dis | grep %G
+; RUN: llvm-upgrade < %s | llvm-as | opt -ds-opt -globaldce | llvm-dis | grep %G
%G = internal global int 0 ; <int*> [#uses=2]
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-dspass=bu -dsgc-check-flags=A:SM
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-dspass=bu -dsgc-check-flags=A:SM
; Constant globals should not mark stuff incomplete. This should allow the
; bu pass to resolve the indirect call immediately in "test", allowing %A to
; be marked complete and the store to happen.
; Make sure that the ds-opt pass is constantizing globals
;
-; RUN: llvm-as < %s | opt -ds-opt | llvm-dis | grep %G | grep constant
+; RUN: llvm-upgrade < %s | llvm-as | opt -ds-opt | llvm-dis | grep %G | grep constant
%G = internal global int 0 ; <int*> [#uses=2]
; Test that ds-aa can be used for queries that require field sensitive AA.
-; RUN: llvm-as < %s | opt -no-aa -ds-aa -load-vn -gcse | llvm-dis | not grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -no-aa -ds-aa -load-vn -gcse | llvm-dis | not grep load
%Pair = type { int, int }
; Test that GCSE uses ds-aa to do alias analysis, which is capable of
; disambiguating some cases.
-; RUN: llvm-as < %s | opt -no-aa -ds-aa -load-vn -gcse -instcombine -dce | llvm-dis | not grep ELIM
+; RUN: llvm-upgrade < %s | llvm-as | opt -no-aa -ds-aa -load-vn -gcse -instcombine -dce | llvm-dis | not grep ELIM
%intpair = type {int*, int*}
implementation
; This test was failing because the globals X and Y are marked incomplete
; in the TD graph for %test
; XFAIL: *
-; RUN: llvm-as < %s | opt -no-aa -ds-aa -load-vn -gcse -instcombine | llvm-dis | not grep seteq
+; RUN: llvm-upgrade < %s | llvm-as | opt -no-aa -ds-aa -load-vn -gcse -instcombine | llvm-dis | not grep seteq
%X = internal global int 20
%Y = internal global int* null
; Test that ds-aa is returning must-alias information when it can.
; XFAIL: *
-; RUN: llvm-as < %s | opt -no-aa -ds-aa -load-vn -gcse | llvm-dis | not grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -no-aa -ds-aa -load-vn -gcse | llvm-dis | not grep load
%X = internal global int 20
; has no defined way to check for this, so DSA can know that strcpy doesn't
; require merging the input arguments.
-; RUN: llvm-as < %s | opt -analyze -datastructure-gc --dsgc-abort-if-merged=A,B --dsgc-check-flags=A:ASM,B:ASR --dsgc-dspass=bu
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc --dsgc-abort-if-merged=A,B --dsgc-check-flags=A:ASM,B:ASR --dsgc-dspass=bu
implementation
-; RUN: llvm-as < %s | opt -analyze -domset -disable-verify
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -domset -disable-verify
;
int %re_match_2() {
ENTRY:
-; RUN: llvm-as < %s | opt -analyze -postdomfrontier -disable-verify
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -postdomfrontier -disable-verify
;
; ModuleID = '2006-09-26-PostDominanceFrontier.bc'
target endian = little
-; RUN: llvm-as < %s | opt -domtree -break-crit-edges -analyze -domtree | grep '3.*%brtrue$'
+; RUN: llvm-upgrade < %s | llvm-as | opt -domtree -break-crit-edges -analyze -domtree | grep '3.*%brtrue$'
; PR932
implementation ; Functions:
-; RUN: llvm-as < %s | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
%X = internal global int 4
int %test(int *%P) {
-; RUN: llvm-as < %s | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
; This test requires the use of previous analyses to determine that
; doesnotmodX does not modify X (because 'sin' doesn't).
-; RUN: llvm-as < %s | opt -globalsmodref-aa -load-vn -gcse -instcombine | llvm-dis | grep 'ret int 0'
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -load-vn -gcse -instcombine | llvm-dis | grep 'ret int 0'
%G = internal global int* null
implementation
-; RUN: llvm-as < %s | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
%X = internal global int 4
int %test(int *%P) {
; Test that pure functions are cse'd away
-; RUN: llvm-as < %s | opt -globalsmodref-aa -load-vn -gcse -instcombine | llvm-dis | not grep sub
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -load-vn -gcse -instcombine | llvm-dis | not grep sub
int %pure(int %X) {
%Y = add int %X, 1
; This testcase ensures that redundant loads are eliminated when they should
; be. All RL variables (redundant loads) should be eliminated.
;
-; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | not grep %RL
+; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse | llvm-dis | not grep %RL
;
int "test1"(int* %P) {
%A = load int* %P
-; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | grep sub
+; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -instcombine | llvm-dis | grep sub
int %test(int* %P) {
%X = volatile load int* %P
; This testcase ensures that redundant loads are preserved when they are not
; allowed to be eliminated.
-; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | grep sub
+; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse | llvm-dis | grep sub
;
int %test1(int* %P) {
%A = load int* %P
-; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
declare int %strlen(sbyte*)
int %test(sbyte* %P) {
-; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
declare int %strlen(sbyte*)
declare void %use(int %X)
-; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
%S = type { int, sbyte }
-; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | not grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse | llvm-dis | not grep load
; Test that loads of undefined memory are eliminated.
int %test1() {
; This testcase was incorrectly computing that the loopentry.7 loop was
; not a child of the loopentry.6 loop.
;
-; RUN: llvm-as < %s | opt -analyze -loops | grep "^ Loop Containing: %loopentry.7"
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -loops | grep "^ Loop Containing: %loopentry.7"
void %getAndMoveToFrontDecode() { ; No predecessors!
br label %endif.2
; of the bug that was causing the Olden Health benchmark to output incorrect
; results!
;
-; RUN: llvm-as < %s | opt -constprop | llvm-dis > %t.1 && \
-; RUN: llvm-as < %s | llvm-dis | llvm-as | opt -constprop | llvm-dis > %t.2 && \
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis > %t.1 && \
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as | opt -constprop | llvm-dis > %t.2 && \
; RUN: diff %t.1 %t.2
implementation
; The output formater prints out 1.0e100 as Inf!
;
-; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as | llvm-dis
implementation
; Check by running globaldce, which will remove the constant if there are
; no references to it!
;
-; RUN: llvm-as < %s | opt -globaldce | llvm-dis | not grep constant
+; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce | llvm-dis | not grep constant
;
%v1 = internal constant int 5
; Test to make sure that the 'internal' tag is not lost!
;
-; RUN: llvm-as < %s | llvm-dis | grep internal
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep internal
declare void %foo()
implementation
; Test that opaque types are preserved correctly
-; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as | llvm-dis
;
%Ty = type opaque
; Test double quotes in strings work correctly!
-; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as | llvm-dis
;
%str = internal global [6 x sbyte] c"\22foo\22\00"
; Test that returning a pointer to a function causes the disassembler to print
; the right thing.
;
-; RUN: llvm-as < %s | llvm-dis | llvm-as
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as
%ty = type void (int)
-; RUN: llvm-as < %s | llvm-dis | llvm-as
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as
; Make sure that \\ works in a string initializer
%Slashtest = internal global [8 x sbyte] c"\5Cbegin{\00"
; reader should NEVER produce a program "successfully" with placeholders still
; around!
-; RUN: llvm-as < %s | llvm-dis | llvm-as
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as
%.LC0 = internal global [4 x sbyte] c"foo\00" ; <[4 x sbyte]*> [#uses=1]
; Testcase that seems to break the bytecode reader. This comes from the
; "crafty" spec benchmark.
;
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | llvm-as
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | llvm-as
%CHESS_POSITION = type { uint, int }
-; RUN: llvm-as < %s | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis
%Domain = type { %Domain**, %Domain* }
-; RUN: llvm-as < %s | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis
void %test() {
%tmp.123 = cast long cast ([5 x { ubyte, sbyte }]* getelementptr ([30 x [5 x { ubyte, sbyte }]]* null, long 0, long 0) to long) to int
-; RUN: llvm-as < %s | llvm-dis | grep -- -2147483648
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep -- -2147483648
int %foo() {
ret int -2147483648
-; RUN: llvm-as < %s | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis
void %test() {
invoke void %test() to label %Next except label %Next
Next:
-; RUN: llvm-as < %s | opt -instcombine -simplifycfg | llvm-dis | not grep br
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -simplifycfg | llvm-dis | not grep br
%.str_1 = internal constant [6 x sbyte] c"_Bool\00" ; <[6 x sbyte]*> [#uses=1]
-; RUN: llvm-as < %s | llvm-dis | not grep getelementptr
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep getelementptr
%A = external global { float } ; <{ float }*> [#uses=1]
global int* cast (float* getelementptr ({ float }* %A, long 0, ubyte 0) to int*)
-; RUN: llvm-as < %s | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis
int %test() {
ret int shr (int cast (int()* %test to int), ubyte 2)
-; RUN: llvm-as < %s | llvm-dis | grep ' bitcast ('
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep ' bitcast ('
%.Base64_1 = external constant [4 x sbyte]
-; RUN: llvm-as < %s | llvm-dis | not grep 'getelementptr.*getelementptr'
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep 'getelementptr.*getelementptr'
%struct.TUVVertex = type { short, short, short, short }
%struct.TTriangleItem = type { sbyte*, sbyte*, [3 x %struct.TUVVertex] }
-; RUN: llvm-as < %s | llvm-dis | grep 9223372036854775808
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep 9223372036854775808
global long -9223372036854775808
-; RUN: llvm-as < %s | llvm-dis | grep -- -0.0
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep -- -0.0
global double 0x8000000000000000
-; RUN: llvm-as < %s | llvm-dis | not grep cast
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep cast
; All of these should be eliminable
-; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep '%G = alloca int'
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | not grep '%G = alloca int'
; In this testcase, %bar stores to the global G. Make sure that inlining does
; not cause it to store to the G in main instead.
-; RUN: llvm-as < %s | llvm-dis | grep '1.0'
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep '1.0'
double %test() {
ret double 1.0 ;; This should not require hex notation
-; RUN: llvm-as < %s | llvm-dis | llvm-as
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as
; Ensure that the asm writer emits types before both operands of the
; store, even though they can be the same.
-; RUN: llvm-as < %s | llvm-dis | llvm-as
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as
%t = type opaque
%x = global %t undef
-; RUN: llvm-as < %s | llvm-dis | grep 'tail call csretcc'
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep 'tail call csretcc'
declare csretcc void %foo({}*, ...)
; This test checks to make sure that constant exprs fold in some simple situations
-; RUN: llvm-as < %s | llvm-dis | not grep '(' &&
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep '(' &&
; RUN: llvm-as < %s
%A = global long 0
; This test checks to make sure that constant exprs fold in some simple situations
-; RUN: llvm-as < %s | llvm-dis | not grep cast
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep cast
%A = global int* cast (sbyte* null to int*) ; Cast null -> fold
%B = global int** cast (int** %A to int**) ; Cast to same type -> fold
-; RUN: llvm-as < %s | llc -march=arm
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
void %f(uint %a) {
entry:
%tmp = alloca sbyte, uint %a
-; RUN: llvm-as < %s | llc -march=arm
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
void %f(int %a, int %b, int %c, int %d, int %e) {
entry:
%a_addr = alloca int ; <int*> [#uses=2]
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep and | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep orr | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep eor | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep mov.*lsl | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep mov.*asr | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep and | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep orr | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep eor | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep mov.*lsl | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep mov.*asr | wc -l | grep 1
int %f1(int %a, int %b) {
entry:
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep bne &&
-; RUN: llvm-as < %s | llc -march=arm | grep bge &&
-; RUN: llvm-as < %s | llc -march=arm | grep bcs &&
-; RUN: llvm-as < %s | llc -march=arm | grep bcc
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep bne &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep bge &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep bcs &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep bcc
void %f1(int %a, int %b, int* %v) {
entry:
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep bl &&
-; RUN: llvm-as < %s | llc -march=arm | grep blx
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep bl &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep blx
void %f() {
entry:
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #0" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #255" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #256" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep ".word.*257" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #-1073741761" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #1008" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "\.comm.*a,4,4" | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #0" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #255" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #256" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ".word.*257" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #-1073741761" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #1008" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "\.comm.*a,4,4" | wc -l | grep 1
%a = internal global int 0
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep __divsi3 &&
-; RUN: llvm-as < %s | llc -march=arm | grep __udivsi3 &&
-; RUN: llvm-as < %s | llc -march=arm | grep __modsi3 &&
-; RUN: llvm-as < %s | llc -march=arm | grep __umodsi3
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __divsi3 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __udivsi3 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __modsi3 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __umodsi3
int %f1(int %a, int %b) {
entry:
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep fmsr &&
-; RUN: llvm-as < %s | llc -march=arm | grep fmrs &&
-; RUN: llvm-as < %s | llc -march=arm | grep fmrrd &&
-; RUN: llvm-as < %s | llc -march=arm | grep fmdrr &&
-; RUN: llvm-as < %s | llc -march=arm | grep fldd &&
-; RUN: llvm-as < %s | llc -march=arm | grep flds &&
-; RUN: llvm-as < %s | llc -march=arm | grep fstd &&
-; RUN: llvm-as < %s | llc -march=arm | grep fsts &&
-; RUN: llvm-as < %s | llc -march=arm | grep ".word.*1065353216"
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fmsr &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fmrs &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fmrrd &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fmdrr &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fldd &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep flds &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fstd &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fsts &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ".word.*1065353216"
double %h(double* %v) {
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep fadds &&
-; RUN: llvm-as < %s | llc -march=arm | grep faddd &&
-; RUN: llvm-as < %s | llc -march=arm | grep fmuls &&
-; RUN: llvm-as < %s | llc -march=arm | grep fmuld &&
-; RUN: llvm-as < %s | llc -march=arm | grep fnegs &&
-; RUN: llvm-as < %s | llc -march=arm | grep fnegd &&
-; RUN: llvm-as < %s | llc -march=arm | grep fdivs &&
-; RUN: llvm-as < %s | llc -march=arm | grep fdivd
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fadds &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep faddd &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fmuls &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fmuld &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fnegs &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fnegd &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fdivs &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fdivd
float %f1(float %a, float %b) {
entry:
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep movmi &&
-; RUN: llvm-as < %s | llc -march=arm | grep moveq &&
-; RUN: llvm-as < %s | llc -march=arm | grep movgt &&
-; RUN: llvm-as < %s | llc -march=arm | grep movge &&
-; RUN: llvm-as < %s | llc -march=arm | grep movls &&
-; RUN: llvm-as < %s | llc -march=arm | grep movne &&
-; RUN: llvm-as < %s | llc -march=arm | grep fcmps &&
-; RUN: llvm-as < %s | llc -march=arm | grep fcmpd
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movmi &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep moveq &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movgt &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movge &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movls &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movne &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fcmps &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fcmpd
int %f1(float %a) {
entry:
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep fcvtsd &&
-; RUN: llvm-as < %s | llc -march=arm | grep fcvtds &&
-; RUN: llvm-as < %s | llc -march=arm | grep ftosis &&
-; RUN: llvm-as < %s | llc -march=arm | grep ftouis &&
-; RUN: llvm-as < %s | llc -march=arm | grep ftosid &&
-; RUN: llvm-as < %s | llc -march=arm | grep ftouid &&
-; RUN: llvm-as < %s | llc -march=arm | grep fsitos &&
-; RUN: llvm-as < %s | llc -march=arm | grep fsitod &&
-; RUN: llvm-as < %s | llc -march=arm | grep fuitos &&
-; RUN: llvm-as < %s | llc -march=arm | grep fuitod
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fcvtsd &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fcvtds &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ftosis &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ftouis &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ftosid &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ftouid &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fsitos &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fsitod &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fuitos &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fuitod
float %f1(double %x) {
entry:
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep flds | wc -l | grep 2 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "flds.*\[" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "fsts.*\[" | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep flds | wc -l | grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "flds.*\[" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "fsts.*\[" | wc -l | grep 1
float %f1(float %a) {
entry:
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep mov | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep mov | wc -l | grep 1
%str = internal constant [12 x sbyte] c"Hello World\00" ; <[12 x sbyte]*> [#uses=1]
implementation ; Functions:
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep "ldr r0.*#0" | wc -l | grep 2 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "ldr r0.*#4092" | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "ldr r0.*#0" | wc -l | grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "ldr r0.*#4092" | wc -l | grep 1
int %f1(int* %v) {
entry:
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep ldrsb &&
-; RUN: llvm-as < %s | llc -march=arm | grep ldrb &&
-; RUN: llvm-as < %s | llc -march=arm | grep ldrsh &&
-; RUN: llvm-as < %s | llc -march=arm | grep ldrh
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ldrsb &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ldrb &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ldrsh &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ldrh
int %f1(sbyte* %p) {
entry:
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep "mov r1, #0" | wc -l | grep 4 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #1" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep ".word.*2147483647" | wc -l | grep 2 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #-2147483648" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep ".word.*4294967295" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "adds" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "adcs" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "subs" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "sbcs" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "smull" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "umull" | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r1, #0" | wc -l | grep 4 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #1" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ".word.*2147483647" | wc -l | grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #-2147483648" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ".word.*4294967295" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "adds" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "adcs" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "subs" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "sbcs" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "smull" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "umull" | wc -l | grep 1
long %f1() {
entry:
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep __ashldi3 &&
-; RUN: llvm-as < %s | llc -march=arm | grep __ashrdi3 &&
-; RUN: llvm-as < %s | llc -march=arm | grep __lshrdi3
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __ashldi3 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __ashrdi3 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __lshrdi3
uint %f1(ulong %x, ubyte %y) {
entry:
%a = shl ulong %x, ubyte %y
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep strb &&
-; RUN: llvm-as < %s | llc -march=arm | grep strh
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep strb &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep strh
void %f1() {
entry:
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep "mul r0, r12, r0" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "mul r0, r1, r0" | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mul r0, r12, r0" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mul r0, r1, r0" | wc -l | grep 1
int %mul1(int %u) {
entry:
-; RUN: llvm-as < %s | llc -march=arm
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
int %test(int %a1) {
ret int %a1
}
-; RUN: llvm-as < %s | llc -march=arm
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
int %test(int %a1, int %a2) {
ret int %a2
}
-; RUN: llvm-as < %s | llc -march=arm
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
int %test(int %a1, int %a2, int %a3) {
ret int %a3
}
-; RUN: llvm-as < %s | llc -march=arm
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
int %test(int %a1, int %a2, int %a3, int %a4) {
ret int %a4
}
-; RUN: llvm-as < %s | llc -march=arm
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
int %test(int %a1, int %a2, int %a3, int %a4, int %a5) {
ret int %a5
}
-; RUN: llvm-as < %s | llc -march=arm
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
void %test() {
ret void
}
-; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm | grep moveq | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep movgt | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep movlt | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep movle | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep movls | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep movhi | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep moveq | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movgt | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movlt | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movle | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movls | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movhi | wc -l | grep 1
int %f1(int %a) {
entry:
-; RUN: llvm-as < %s | llc -march=arm
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
%str = internal constant [43 x sbyte] c"Hello World %d %d %d %d %d %d %d %d %d %d\0A\00" ; <[43 x sbyte]*> [#uses=1]
implementation ; Functions:
-; RUN: llvm-as < %s | llc -march=arm
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
%str = internal constant [7 x ubyte] c"%d %d\0A\00" ; <[7 x ubyte]*> [#uses=1]
implementation ; Functions:
; There should be exactly two calls here (memset and malloc), no more.
-; RUN: llvm-as < %s | llc -march=alpha | grep jsr | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep jsr | wc -l | grep 2
implementation ; Functions:
; This shouldn't crash
-; RUN: llvm-as < %s | llc -march=alpha
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
; ModuleID = 'bugpoint-reduced-simplified.bc'
target endian = little
; The global symbol should be legalized
-; RUN: llvm-as < %s | llc -march=alpha
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
target endian = little
target pointersize = 64
; This shouldn't crash
-; RUN: llvm-as < %s | llc -march=alpha
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
; ModuleID = 'simp.bc'
target endian = little
-; RUN: llvm-as < %s | llc -march=alpha
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
target endian = little
target pointersize = 64
-; RUN: llvm-as < %s | llc -march=alpha
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
target endian = little
target pointersize = 64
-; RUN: llvm-as < %s | llc -march=alpha
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
target datalayout = "e-p:64:64"
target endian = little
;test all the shifted and signextending adds and subs with and without consts
-; RUN: llvm-as < %s | llc -march=alpha | grep ' addl' |wc -l |grep 2 &&
-; RUN: llvm-as < %s | llc -march=alpha | grep ' addq' |wc -l |grep 2 &&
-; RUN: llvm-as < %s | llc -march=alpha | grep ' subl' |wc -l |grep 2 &&
-; RUN: llvm-as < %s | llc -march=alpha | grep ' subq' |wc -l |grep 1 &&
-; RUN: llvm-as < %s | llc -march=alpha | grep 'lda $0,-100($16)' |wc -l |grep 1 &&
-
-; RUN: llvm-as < %s | llc -march=alpha | grep 's4addl' |wc -l |grep 2 &&
-; RUN: llvm-as < %s | llc -march=alpha | grep 's8addl' |wc -l |grep 2 &&
-; RUN: llvm-as < %s | llc -march=alpha | grep 's4addq' |wc -l |grep 2 &&
-; RUN: llvm-as < %s | llc -march=alpha | grep 's8addq' |wc -l |grep 2 &&
-
-; RUN: llvm-as < %s | llc -march=alpha | grep 's4subl' |wc -l |grep 2 &&
-; RUN: llvm-as < %s | llc -march=alpha | grep 's8subl' |wc -l |grep 2 &&
-; RUN: llvm-as < %s | llc -march=alpha | grep 's4subq' |wc -l |grep 2 &&
-; RUN: llvm-as < %s | llc -march=alpha | grep 's8subq' |wc -l |grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep ' addl' |wc -l |grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep ' addq' |wc -l |grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep ' subl' |wc -l |grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep ' subq' |wc -l |grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'lda $0,-100($16)' |wc -l |grep 1 &&
+
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 's4addl' |wc -l |grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 's8addl' |wc -l |grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 's4addq' |wc -l |grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 's8addq' |wc -l |grep 2 &&
+
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 's4subl' |wc -l |grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 's8subl' |wc -l |grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 's4subq' |wc -l |grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 's8subq' |wc -l |grep 2
implementation ; Functions:
; Make sure this testcase codegens to the bic instruction
-; RUN: llvm-as < %s | llc -march=alpha | grep 'bic'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'bic'
implementation ; Functions:
; Make sure this testcase codegens the bsr instruction
-; RUN: llvm-as < %s | llc -march=alpha | grep 'bsr'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'bsr'
implementation
;All this should do is not crash
-;RUN: llvm-as < %s | llc -march=alpha
+;RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
target endian = little
target pointersize = 64
-; RUN: llvm-as < %s | llc -march=alpha | not grep cmovlt
-; RUN: llvm-as < %s | llc -march=alpha | grep cmoveq
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | not grep cmovlt
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep cmoveq
long %cmov_lt(long %a, long %c) {
entry:
-; RUN: llvm-as < %s | llc -march=alpha | grep cmpbge | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep cmpbge | wc -l | grep 2
bool %test1(ulong %A, ulong %B) {
%C = and ulong %A, 255
; Make sure this testcase codegens to the ctlz instruction
-; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev67 | grep -i 'ctlz'
-; RUN: llvm-as < %s | llc -march=alpha -mattr=+CIX | grep -i 'ctlz'
-; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev6 | not grep -i 'ctlz'
-; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev56 | not grep -i 'ctlz'
-; RUN: llvm-as < %s | llc -march=alpha -mattr=-CIX | not grep -i 'ctlz'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev67 | grep -i 'ctlz'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=+CIX | grep -i 'ctlz'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev6 | not grep -i 'ctlz'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev56 | not grep -i 'ctlz'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=-CIX | not grep -i 'ctlz'
declare ubyte %llvm.ctlz(ubyte)
; Make sure this testcase does not use ctpop
-; RUN: llvm-as < %s | llc -march=alpha | grep -i 'ctpop' |wc -l |grep 0
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep -i 'ctpop' |wc -l |grep 0
declare ulong %llvm.ctlz(ulong)
; Make sure this testcase codegens to the ctpop instruction
-; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev67 | grep -i 'ctpop'
-; RUN: llvm-as < %s | llc -march=alpha -mattr=+CIX | grep -i 'ctpop'
-; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev6 | not grep -i 'ctpop'
-; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev56 | not grep -i 'ctpop'
-; RUN: llvm-as < %s | llc -march=alpha -mattr=-CIX | not grep -i 'ctpop'
+; 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 | grep -i 'ctpop'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev6 | not grep -i 'ctpop'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev56 | not grep -i 'ctpop'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=-CIX | not grep -i 'ctpop'
declare long %llvm.ctpop(long)
; Make sure this testcase codegens to the eqv instruction
-; RUN: llvm-as < %s | llc -march=alpha | grep 'eqv'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'eqv'
implementation ; Functions:
; Make sure this testcase codegens to the ctpop instruction
-; RUN: llvm-as < %s | llc -march=alpha | grep -i 'subl $16,1,$0'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep -i 'subl $16,1,$0'
implementation ; Functions:
; try to check that we have the most important instructions, which shouldn't appear otherwise
-; 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'
+; 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'
target endian = little
target pointersize = 64
; Make sure this testcase does not use mulq
-; RUN: llvm-as < %s | llc -march=alpha | grep -i 'mul' |wc -l |grep 0
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep -i 'mul' |wc -l |grep 0
implementation ; Functions:
; Make sure this testcase codegens to the lda -1 instruction
-; RUN: llvm-as < %s | llc -march=alpha | grep '\-1'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep '\-1'
implementation ; Functions:
; Make sure this testcase codegens to the ornot instruction
-; RUN: llvm-as < %s | llc -march=alpha | grep 'eqv'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'eqv'
implementation ; Functions:
; Make sure this testcase codegens to the ornot instruction
-; RUN: llvm-as < %s | llc -march=alpha | grep 'ornot'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'ornot'
implementation ; Functions:
-; RUN: llvm-as < %s | llc -march=alpha | grep rpcc
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep rpcc
declare ulong %llvm.readcyclecounter()
; Make sure this testcase codegens to the zapnot instruction
-; RUN: llvm-as < %s | llc -march=alpha | grep 'zapnot'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'zapnot'
ulong %foo(ulong %y) {
entry:
; Make sure this testcase codegens to the bic instruction
-; RUN: llvm-as < %s | llc -march=alpha | grep 'zapnot'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'zapnot'
implementation ; Functions:
; Make sure this testcase codegens to the zapnot instruction
-; RUN: llvm-as < %s | llc -march=alpha | grep 'zapnot'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'zapnot'
implementation ; Functions:
-; RUN: llvm-as < %s | llc -march=alpha | grep zapnot | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep zapnot | wc -l | grep 2
ulong %foo(ulong %y) {
%tmp = and ulong %y, 65535
-; RUN: llvm-as < %s | llc -march=alpha | grep zapnot
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep zapnot
ulong %foo(ulong %y) {
%tmp = shl ulong %y, ubyte 3 ; <ulong> [#uses=1]
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
; Make sure that global variables do not collide if they have the same name,
; but different types.
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
; This case was emitting code that looked like this:
; ...
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
; Test const pointer refs & forward references
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
global int* cast (float* %0 to int*) ;; Forward numeric reference
global float* %0 ;; Duplicate forward numeric reference
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
%sptr1 = global [11x sbyte]* %somestr ;; Forward ref to a constant
%somestr = constant [11x sbyte] c"hello world"
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
%fptr = global void() * %f ;; Forward ref method defn
declare void "f"() ;; External method
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
%array = constant [2 x int] [ int 12, int 52 ] ; <[2 x int]*> [#uses=1]
%arrayPtr = global int* getelementptr ([2 x int]* %array, long 0, long 0) ; <int**> [#uses=1]
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
%MyIntList = uninitialized global { \2 *, int }
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
; The C Writer bombs on this testcase because it tries the print the prototype
; for the test function, which tries to print the argument name. The function
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
; Indirect function call test... found by Joel & Brian
;
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
; This testcase fails because the C backend does not arrange to output the
; contents of a structure type before it outputs the structure type itself.
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
declare void %foo(...)
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
%MPI_Comm = type %struct.Comm*
%struct.Comm = type opaque
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
%bob = external global int ; <int*> [#uses=2]
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
%BitField = type int
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
%testString = internal constant [18 x sbyte] c "Escaped newline\n\00"
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
; Apparently this constant was unsigned in ISO C 90, but not in C 99.
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
; This testcase breaks the C backend, because gcc doesn't like (...) functions
; with no arguments at all.
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
; The C backend was dying when there was no typename for a struct type!
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
%X = type { int, float }
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
; Make sure hex constant does not continue into a valid hexadecimal letter/number
%version = global [3 x sbyte] c"\001\00"
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
%version = global [3 x sbyte] c"1\00\00"
-; RUN: llvm-as < %s | llc -march=c > %t1.cbe.c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c > %t1.cbe.c
; RUN: gcc -B/usr/bin/ %t1.cbe.c -o %t1.cbe
; RUN: %t1.cbe
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
declare int %callee(int, int)
-; RUN: llvm-as < %s | llc -march=c | grep common | grep X
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep common | grep X
%X = linkonce global int 5
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
; This is a non-normal FP value: it's a nan.
%NAN = global { float } { float 0x7FF8000000000000 }
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
%A = type { uint, sbyte*, { uint, uint, uint, uint, uint, uint, uint, uint }*, ushort }
; XFAIL: *
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
declare sbyte* %llvm.va_start()
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
; reduced from DOOM.
%union._XEvent = type { int }
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
%y = weak global sbyte 0
implementation
-; RUN: llvm-as < %s | llc -march=c | grep builtin_return_address
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep builtin_return_address
declare sbyte* %llvm.returnaddress(uint)
declare sbyte* %llvm.frameaddress(uint)
; this testcase for example, which caused the CBE to mangle one, screwing
; everything up. :( Test that this does not happen anymore.
;
-; RUN: llvm-as < %s | llc -march=c | not grep _memcpy
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | not grep _memcpy
declare void %llvm.memcpy(sbyte*, sbyte*, uint,uint)
declare float* %memcpy(int*, uint,int)
; This is a non-normal FP value
-; RUN: llvm-as < %s | llc -march=c | grep FPConstant | grep static
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep FPConstant | grep static
float %func () {
ret float 0xFFF0000000000000 ; -inf
-; RUN: llvm-as < %s | llc -march=c | grep func1 | grep WEAK
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep func1 | grep WEAK
implementation
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
declare void %llvm.va_end(sbyte*)
; The CBE should not emit code that casts the function pointer. This causes
; GCC to get testy and insert trap instructions instead of doing the right
; thing. :(
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
implementation
-; RUN: llvm-as < %s | llc -march=c | not grep 'extern.*msg'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | not grep 'extern.*msg'
; This is PR472
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
int %foo() {
ret int and (int 123456, int cast (int()* %foo to int))
-; RUN: llvm-as < %s | llc -march=c | grep volatile
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep volatile
void %test(int* %P) {
%X = volatile load int*%P
-; RUN: llvm-as < %s | llc -march=c
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
%JNIEnv = type %struct.JNINa*
%struct.JNINa = type { sbyte*, sbyte*, sbyte*, void (%JNIEnv*)* }
-; RUN: llvm-as < %s | llc -march=c | not grep "\-\-65535"
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | not grep "\-\-65535"
; ModuleID = '<stdin>'
target endian = little
target pointersize = 32
-; RUN: llvm-as < %s | llc -march=c | grep fmod
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep fmod
double %test(double %A, double %B) {
%C = rem double %A, %B
-; RUN: llvm-as < %s | llc -march=c &&
-; RUN: llvm-as < %s | llc -march=c | grep '\* *volatile *\*'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep '\* *volatile *\*'
%G = external global void()*
-; RUN: llvm-as < %s | llc -enable-correct-eh-support
+; RUN: llvm-upgrade < %s | llvm-as | llc -enable-correct-eh-support
int %test() {
unwind
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%global_long_1 = linkonce global long 7
%global_long_2 = linkonce global long 49
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
void %intersect_pixel() {
entry:
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%struct.TypHeader = type { uint, %struct.TypHeader**, [3 x sbyte], ubyte }
%.str_67 = external global [4 x sbyte] ; <[4 x sbyte]*> [#uses=1]
%.str_87 = external global [17 x sbyte] ; <[17 x sbyte]*> [#uses=1]
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
; Test that llvm.memcpy works with a i64 length operand on all targets.
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
void %test() {
%X = alloca {}
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
float %t(long %u) {
%u = cast long %u to ulong ; <ulong> [#uses=1]
%tmp5 = add ulong %u, 9007199254740991 ; <ulong> [#uses=1]
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%str = external global [36 x sbyte] ; <[36 x sbyte]*> [#uses=0]
%str = external global [29 x sbyte] ; <[29 x sbyte]*> [#uses=0]
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
long %test(long %A) {
%B = cast long %A to sbyte
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
target endian = little
target pointersize = 32
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
; This crashed the PPC backend.
void %test() {
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%G = external global int
void %encode_one_frame(long %tmp.2i) {
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
; Infinite loop in the dag combiner, reduced from 176.gcc.
%struct._obstack_chunk = type { sbyte*, %struct._obstack_chunk*, [4 x sbyte] }
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
implementation ; Functions:
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah
; The vload was getting memoized to the previous scalar load!
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
; PR748
%G = external global ushort ; <ushort*> [#uses=1]
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
int %test(int %tmp93) {
%tmp98 = shl int %tmp93, ubyte 31 ; <int> [#uses=1]
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%struct.FILE = type { ubyte*, int, int, short, short, %struct.__sbuf, int, sbyte*, int (sbyte*)*, int (sbyte*, sbyte*, int)*, long (sbyte*, long, int)*, int (sbyte*, sbyte*, int)*, %struct.__sbuf, %struct.__sFILEX*, int, [3 x ubyte], [1 x ubyte], %struct.__sbuf, int, long }
%struct.SYMBOL_TABLE_ENTRY = type { [9 x sbyte], [9 x sbyte], int, int, uint, %struct.SYMBOL_TABLE_ENTRY* }
-; RUN: llvm-as < %s | llc -fast
+; RUN: llvm-upgrade < %s | llvm-as | llc -fast
float %test(uint %tmp12771278) {
switch uint %tmp12771278, label %bb1279 [
-; RUN: llvm-as < %s | llc -fast
+; RUN: llvm-upgrade < %s | llvm-as | llc -fast
%struct.cl_perfunc_opts = type { ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, int, int, int, int, int, int, int }
%cl_pf_opts = external global %struct.cl_perfunc_opts ; <%struct.cl_perfunc_opts*> [#uses=2]
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%struct.rtunion = type { long }
%struct.rtx_def = type { ushort, ubyte, ubyte, [1 x %struct.rtunion] }
%ix86_cpu = external global uint ; <uint*> [#uses=1]
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%struct.CUMULATIVE_ARGS = type { int, int, int, int, int, int, int, int, int, int, int, int, int, int }
%struct.VEC_edge = type { uint, uint, [1 x %struct.edge_def*] }
-; RUN: llvm-as < %s | llc -regalloc=local
+; RUN: llvm-upgrade < %s | llvm-as | llc -regalloc=local
%struct.CHESS_POSITION = type { ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, uint, int, sbyte, sbyte, [64 x sbyte], sbyte, sbyte, sbyte, sbyte, sbyte }
%search = external global %struct.CHESS_POSITION ; <%struct.CHESS_POSITION*> [#uses=2]
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
void %foo() {
br label %cond_true813.i
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
void %start_pass_huff(int %gather_statistics) {
entry:
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
void %form_component_prediction(int %dy) {
entry:
-; RUN: llvm-as < %s | llc -march=x86 &&
-; RUN: llvm-as < %s | llc -march=x86 | not grep adc
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep adc
; PR987
-; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwimi
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep rlwimi
void %test(short %div.0.i.i.i.i, int %L_num.0.i.i.i.i, int %tmp1.i.i206.i.i, short* %P) {
%X = shl short %div.0.i.i.i.i, ubyte 1 ; <short> [#uses=1]
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
; PR1011
%struct.mng_data = type { sbyte* (%struct.mng_data*, uint)*, int, int, int, sbyte, sbyte, int, int, int, int, int }
; New testcase, this contains a bunch of simple instructions that should be
; handled by a code generator.
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
int %add(int %A, int %B) {
%R = add int %A, %B
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%.str_1 = internal constant [16 x sbyte] c"%d %d %d %d %d\0A\00"
; Verify debugger intrinsics are ignored or accepted.
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
;; Debugger type declarations
%lldb.compile_unit = type { uint, ushort, ushort, sbyte*, sbyte*, sbyte*, {}* }
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
implementation
-; RUN: llvm-as < %s | llc -march=x86 | grep cmp | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep cmp | wc -l | grep 1
; PR964
sbyte* %FindChar(sbyte* %CurPtr) {
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
double %test(bool %X) {
%Y = cast bool %X to double
ret double %Y
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
int %foo(int %x) {
ret int %x
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
int %foo(int %x) {
ret int 42
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
void %foo() {
ret void
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
int %bar(int %x) {
ret int 0
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%a_fstr = internal constant [8 x sbyte] c"a = %f\0A\00"
%a_lstr = internal constant [10 x sbyte] c"a = %lld\0A\00"
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%lldb.compile_unit = type { uint, ushort, ushort, sbyte*, sbyte*, sbyte*, { }* }
%d.compile_unit7 = external global %lldb.compile_unit ; <%lldb.compile_unit*> [#uses=1]
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
int %test(int %X) {
%Y = div int %X, -2
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
double %fneg(double %X) {
%Y = sub double -0.0, %X
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
sbyte %test1(double %X) {
%tmp.1 = cast double %X to sbyte
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%g = global int 0
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%.str_1 = internal constant [7 x sbyte] c"hello\0A\00"
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
;; SQRT
declare float %llvm.sqrt(float)
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
; XFAIL: ia64|sparcv8
; Make sure this testcase is supported by all code generators
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
declare long %llvm.ctpop(long)
declare int %llvm.ctpop(int)
-; RUN: llvm-as < %s | llc -o /dev/null -f
+; RUN: llvm-upgrade < %s | llvm-as | llc -o /dev/null -f
; Test that select of a select works
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%.str_1 = internal constant [4 x sbyte] c"%d\0A\00"
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%a_str = internal constant [8 x sbyte] c"a = %f\0A\00"
%b_str = internal constant [8 x sbyte] c"b = %f\0A\00"
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%a_str = internal constant [8 x sbyte] c"a = %d\0A\00"
%b_str = internal constant [8 x sbyte] c"b = %d\0A\00"
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%.str_1 = internal constant [4 x sbyte] c"%d\0A\00"
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%a_str = internal constant [8 x sbyte] c"a = %d\0A\00"
%a_mul_str = internal constant [13 x sbyte] c"a * %d = %d\0A\00"
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%a_str = internal constant [8 x sbyte] c"a = %d\0A\00"
%b_str = internal constant [8 x sbyte] c"b = %d\0A\00"
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%a_str = internal constant [8 x sbyte] c"a = %d\0A\00"
%b_str = internal constant [8 x sbyte] c"b = %d\0A\00"
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
int %main() {
ret int 0
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
int %main() {
ret int 42
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
long %test_imm(long %X) {
%Y = shr long %X, ubyte 17
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
declare sbyte* %llvm.stacksave()
declare void %llvm.stackrestore(sbyte*)
-; RUN: llvm-as < %s | llc -march=x86 &&
-; RUN: llvm-as < %s | llc -march=x86 | grep 'mov.*str1' | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'mov.*str1' | wc -l | grep 1
; PR925
target endian = little
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
void ""(float* %inregs, float* %outregs) {
%a_addr.i = alloca <4 x float> ; <<4 x float>*> [#uses=1]
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep _test &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | not grep vperm
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep _test &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep vperm
void %test(<4 x float> *%tmp2.i) {
%tmp2.i = load <4x float>* %tmp2.i
; Test that vectors are scalarized/lowered correctly.
-; RUN: llvm-as < %s | llc &&
-; RUN: llvm-as < %s | llc -mtriple a-b-c &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g3 &&
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=i386 &&
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah
+; RUN: llvm-upgrade < %s | llvm-as | llc &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple a-b-c &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g3 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=i386 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah
%f1 = type <1 x float>
%f2 = type <2 x float>
-; RUN: llvm-as < %s | llc -march=ia64
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ia64
%_ZN9__gnu_cxx16__stl_prime_listE = external global [28 x uint] ; <[28 x uint]*> [#uses=3]
; this should turn into shladd
-; RUN: llvm-as < %s | llc -march=ia64 | grep 'shladd'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ia64 | grep 'shladd'
implementation ; Functions:
-; RUN: llvm-as < %s | llc -march=ia64
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ia64
double %test() {
ret double 0.0
-; RUN: llvm-as < %s | llc -march=ppc32
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
void %main() {
%tr1 = shr uint 1, ubyte 0
-; RUN: llvm-as < %s | llc -march=ppc32
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
void %main() {
%tr4 = shl ulong 1, ubyte 0 ; <ulong> [#uses=0]
-; RUN: llvm-as < %s | llc -march=ppc32
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
void %main() {
%shamt = add ubyte 0, 1 ; <ubyte> [#uses=1]
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep '.comm.*X,0'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep '.comm.*X,0'
%X = linkonce global {} {}
-; RUN: llvm-as < %s | llc -march=ppc32
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
int %main() {
%setle = setle long 1, 0
-; RUN: llvm-as < %s | llc -march=ppc32
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
long %test() { ret long undef }
; this should not crash the ppc backend
-; RUN: llvm-as < %s | llc -march=ppc32
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
uint %test( int %j.0.0.i) {
%tmp.85.i = and int %j.0.0.i, 7
; This function should have exactly one call to fixdfdi, no more!
-; RUN: llvm-as < %s | llc -march=ppc32 -mattr=-64bit | grep 'bl .*fixdfdi' | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=-64bit | grep 'bl .*fixdfdi' | wc -l | grep 1
double %test2(double %tmp.7705) {
%mem_tmp.2.0.in = cast double %tmp.7705 to long ; <long> [#uses=1]
; This was erroneously being turned into an rlwinm instruction.
; The sign bit does matter in this case.
-; RUN: llvm-as < %s | llc -march=ppc32 | grep srawi
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep srawi
int %test(int %X) {
%Y = and int %X, -2
%Z = shr int %Y, ubyte 11
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
target endian = big
target pointersize = 32
target triple = "powerpc-apple-darwin8.2.0"
-; RUN: llvm-as < %s | llc &&
-; RUN: llvm-as < %s | llc | not grep ', f1'
+; RUN: llvm-upgrade < %s | llvm-as | llc &&
+; RUN: llvm-upgrade < %s | llvm-as | llc | not grep ', f1'
target endian = big
target pointersize = 32
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
void %iterative_hash_host_wide_int() {
%zero = alloca int ; <int*> [#uses=2]
-; RUN: llvm-as < %s | llc -march=ppc32
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
double %CalcSpeed(float %tmp127) {
%tmp145 = cast float %tmp127 to double ; <double> [#uses=1]
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep 'vspltish v.*, 10'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep 'vspltish v.*, 10'
void %test(<8 x short>* %P) {
%tmp = load <8 x short>* %P ; <<8 x short>> [#uses=1]
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5
void %test(sbyte* %stack) {
entry:
-; RUN: llvm-as < %s | llc -march=ppc32
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
%struct.attr_desc = type { sbyte*, %struct.attr_desc*, %struct.attr_value*, %struct.attr_value*, uint }
%struct.attr_value = type { %struct.rtx_def*, %struct.attr_value*, %struct.insn_ent*, int, int }
-; RUN: llvm-as < %s | llc -mtriple=powerpc64-apple-darwin | grep extsw | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=powerpc64-apple-darwin | grep extsw | wc -l | grep 2
%lens = external global ubyte*
%vals = external global int*
-; RUN: llvm-as < %s | llc -march=ppc32
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
void %img2buf(int %symbol_size_in_bytes, ushort* %ui16) {
%tmp93 = load ushort* null ; <ushort> [#uses=1]
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vsldoi &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | not grep vor
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vsldoi &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep vor
<4 x float> %func(<4 x float> %fp0, <4 x float> %fp1) {
%tmp76 = shufflevector <4 x float> %fp0, <4 x float> %fp1, <4 x uint> < uint 0, uint 1, uint 2, uint 7 > ; <<4 x float>> [#uses=1]
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%struct..0anon = type { int }
%struct.rtx_def = type { ushort, ubyte, ubyte, [1 x %struct..0anon] }
-; RUN: llvm-as < %s | llc -march=ppc64
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64
target endian = big
target pointersize = 64
target triple = "powerpc64-apple-darwin8"
-; RUN: llvm-as < %s | llc -march=ppc32 -combiner-alias-analysis | grep 'f5'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -combiner-alias-analysis | grep 'f5'
target endian = big
target pointersize = 32
-; RUN: llvm-as < %s | llc -march=ppc32 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep IMPLICIT_DEF
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep IMPLICIT_DEF
void %foo(long %X) {
entry:
-; RUN: llvm-as < %s | llc -march=ppc32 | grep xor
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep xor
target endian = big
target pointersize = 32
-; RUN: llvm-as < %s | llc -march=ppc64
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64
int * %foo(uint %n) {
%A = alloca int, uint %n
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5
void %glgRunProcessor15() {
%tmp26355.i = shufflevector <4 x float> zeroinitializer, <4 x float> < float 0x379FFFE000000000, float 0x379FFFE000000000, float 0x379FFFE000000000, float 0x379FFFE000000000 >, <4 x uint> < uint 0, uint 1, uint 2, uint 7 > ; <<4 x float>> [#uses=1]
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'rlwinm r0, r1, 0, 22, 31' &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'subfic r0, r0, -17408' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | grep 'rldicl r0, r1, 0, 54'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'rlwinm r0, r1, 0, 22, 31' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'subfic r0, r0, -17408' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'rldicl r0, r1, 0, 54'
implementation
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'stw r31, 20(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'stwu r1, -64(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'lwz r1, 0(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'lwz r31, 20(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'stwu r1, -64(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'lwz r1, 0(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | grep 'std r31, 40(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | grep 'stdu r1, -112(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | grep 'ld r1, 0(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | grep 'ld r31, 40(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'std r31, 40(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'stdu r1, -112(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'ld r1, 0(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'ld r31, 40(r1)'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'stw r31, 20(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'stwu r1, -64(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'lwz r1, 0(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'lwz r31, 20(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stwu r1, -64(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lwz r1, 0(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'std r31, 40(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'stdu r1, -112(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'ld r1, 0(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'ld r31, 40(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'std r31, 40(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'stdu r1, -112(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ld r1, 0(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ld r31, 40(r1)'
implementation
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'stw r31, 20(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'lis r0, -1' &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'ori r0, r0, 32704' &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'stwux r1, r1, r0' &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'lwz r1, 0(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'lwz r31, 20(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'lis r0, -1' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'ori r0, r0, 32704' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'stwux r1, r1, r0' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'lwz r1, 0(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | not grep 'std r31, 40(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | grep 'lis r0, -1' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | grep 'ori r0, r0, 32656' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | grep 'stdux r1, r1, r0' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | grep 'ld r1, 0(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | not grep 'ld r31, 40(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'std r31, 40(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'lis r0, -1' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'ori r0, r0, 32656' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'stdux r1, r1, r0' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'ld r1, 0(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'ld r31, 40(r1)'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'stw r31, 20(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'lis r0, -1' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'ori r0, r0, 32704' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'stwux r1, r1, r0' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'lwz r1, 0(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'lwz r31, 20(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lis r0, -1' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'ori r0, r0, 32704' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stwux r1, r1, r0' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lwz r1, 0(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'std r31, 40(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'lis r0, -1' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'ori r0, r0, 32656' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'stdux r1, r1, r0' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'ld r1, 0(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'ld r31, 40(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'std r31, 40(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'lis r0, -1' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ori r0, r0, 32656' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'stdux r1, r1, r0' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ld r1, 0(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ld r31, 40(r1)'
implementation
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'stw r31, 20(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'stwu r1, -.*(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'addi r1, r1, ' &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'lwz r31, 20(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | not grep 'stw r31, 20(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | not grep 'stwu r1, -.*(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | not grep 'addi r1, r1, ' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | not grep 'lwz r31, 20(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | not grep 'std r31, 40(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | not grep 'stdu r1, -.*(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | not grep 'addi r1, r1, ' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | not grep 'ld r31, 40(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | not grep 'stw r31, 40(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | not grep 'stdu r1, -.*(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | not grep 'addi r1, r1, ' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | not grep 'ld r31, 40(r1)'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'stw r31, 20(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'stwu r1, -.*(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'addi r1, r1, ' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'lwz r31, 20(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | not grep 'stw r31, 20(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | not grep 'stwu r1, -.*(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | not grep 'addi r1, r1, ' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | not grep 'lwz r31, 20(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'std r31, 40(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'stdu r1, -.*(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'addi r1, r1, ' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'ld r31, 40(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | not grep 'stw r31, 40(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | not grep 'stdu r1, -.*(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | not grep 'addi r1, r1, ' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | not grep 'ld r31, 40(r1)'
implementation
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'stw r31, 20(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'stwu r1, -16448(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'addi r1, r1, 16448' &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'lwz r31, 20(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'stwu r1, -16448(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'addi r1, r1, 16448' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | not grep 'std r31, 40(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | grep 'stdu r1, -16496(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | grep 'addi r1, r1, 16496' &&
-; RUN: llvm-as < %s | llc -march=ppc64 | not grep 'ld r31, 40(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'std r31, 40(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'stdu r1, -16496(r1)' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'addi r1, r1, 16496' &&
-; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'ld r31, 40(r1)'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'stw r31, 20(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'stwu r1, -16448(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'addi r1, r1, 16448' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'lwz r31, 20(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stwu r1, -16448(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'addi r1, r1, 16448' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'std r31, 40(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'stdu r1, -16496(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'addi r1, r1, 16496' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'ld r31, 40(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'std r31, 40(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'stdu r1, -16496(r1)' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'addi r1, r1, 16496' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ld r31, 40(r1)'
implementation
; All of these should be codegen'd without loading immediates
-; RUN: llvm-as < %s | llc -march=ppc32 | grep addc | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep adde | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep addze | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep addme | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep addic | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep addc | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep adde | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep addze | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep addme | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep addic | wc -l | grep 2
implementation ; Functions:
-; RUN: llvm-as < %s | llc -march=ppc32 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep addi
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep addi
%struct.X = type { [5 x sbyte] }
implementation ; Functions:
-; RUN: llvm-as < %s | llc -march=ppc32 | grep "align.4" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep "align.2" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep "align.3" | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep "align.4" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep "align.2" | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep "align.3" | wc -l | grep 1
%A = global <4 x uint> < uint 10, uint 20, uint 30, uint 40 >
-; RUN: llvm-as < %s | llc -march=ppc32 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep mfcr
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep mfcr
void %foo(int %X, int %Y, int %Z) {
entry:
-; RUN: llvm-as < %s | llc -march=ppc32 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwin
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep rlwin
void %test(ubyte* %P) {
%W = load ubyte* %P
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'ori\|lis'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'ori\|lis'
int %test(int %X) {
%Y = and int %X, 32769 ; andi. r3, r3, 32769
-; RUN: llvm-as < %s | llc -march=ppc32 | grep slwi &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep addi &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwinm
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep slwi &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep addi &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep rlwinm
int %test(int %A) {
%B = mul int %A, 8 ;; shift
; These tests should not contain a sign extend.
-; RUN: llvm-as < %s | llc -march=ppc32 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep extsh &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep extsb
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep extsh &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep extsb
int %test1(uint %mode.0.i.0) {
%tmp.79 = cast uint %mode.0.i.0 to short
; Neither of these functions should contain algebraic right shifts
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep srawi
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep srawi
int %test1(uint %mode.0.i.0) {
%tmp.79 = cast uint %mode.0.i.0 to int ; <sbyte> [#uses=1]
-; RUN: llvm-as < %s | llc -march=ppc32 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'b LBB.*cond_next48.loopexit' | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'b LBB.*cond_next48.loopexit' | wc -l | grep 1
target endian = big
target pointersize = 32
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'stwbrx\|lwbrx\|sthbrx\|lhbrx' | wc -l | grep 4 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwinm &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwimi &&
-; RUN: llvm-as < %s | llc -march=ppc64 | grep 'stwbrx\|lwbrx\|sthbrx\|lhbrx' | wc -l | grep 4 &&
-; RUN: llvm-as < %s | llc -march=ppc64 | not grep rlwinm &&
-; RUN: llvm-as < %s | llc -march=ppc64 | not grep rlwimi
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'stwbrx\|lwbrx\|sthbrx\|lhbrx' | wc -l | grep 4 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep rlwinm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep rlwimi &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'stwbrx\|lwbrx\|sthbrx\|lhbrx' | wc -l | grep 4 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep rlwinm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep rlwimi
void %STWBRX(uint %i, sbyte* %ptr, int %off) {
%tmp1 = getelementptr sbyte* %ptr, int %off
; There should be exactly one vxor here.
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | grep vxor | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | grep vxor | wc -l | grep 1 &&
; There should be exactly one vsplti here.
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | grep vsplti | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | grep vsplti | wc -l | grep 1
void %VXOR(<4 x float>* %P1, <4 x int>* %P2, <4 x float>* %P3) {
; Test various forms of calls.
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'bl ' | wc -l | grep 2 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'bctrl' | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'bla ' | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'bl ' | wc -l | grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'bctrl' | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'bla ' | wc -l | grep 1
declare void %foo()
-; RUN: llvm-as < %s | llc -march=ppc32 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep mfcr
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep mfcr
void %test(long %X) {
%tmp1 = and long %X, 3 ; <long> [#uses=1]
; All of these routines should be perform optimal load of constants.
-; RUN: llvm-as < %s | llc -march=ppc32 | grep lis | wc -l | grep 5 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep ori | wc -l | grep 3 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'li ' | wc -l | grep 4
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep lis | wc -l | grep 5 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep ori | wc -l | grep 3 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'li ' | wc -l | grep 4
implementation ; Functions:
; Make sure this testcase does not use ctpop
-; RUN: llvm-as < %s | llc -march=ppc32 | grep -i 'cntlzw'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep -i 'cntlzw'
declare int %llvm.cttz(int)
-; RUN: llvm-as < %s | llc | grep 'foo bar":'
+; RUN: llvm-upgrade < %s | llvm-as | llc | grep 'foo bar":'
target endian = big
target pointersize = 32
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep srawi &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep blr
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep srawi &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep blr
int %test1(int %X) {
%Y = and int %X, 15
-; RUN: llvm-as < %s | llc -march=ppc32 | grep eqv | wc -l | grep 3 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep andc | wc -l | grep 3 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep orc | wc -l | grep 2 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep nor | wc -l | grep 3 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep nand | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep eqv | wc -l | grep 3 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep andc | wc -l | grep 3 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep orc | wc -l | grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep nor | wc -l | grep 3 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep nand | wc -l | grep 1
int %EQV1(int %X, int %Y) {
%A = xor int %X, %Y
; This should turn into a single extsh
-; RUN: llvm-as < %s | llc -march=ppc32 | grep extsh | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep extsh | wc -l | grep 1
int %test(int %X) {
%tmp.81 = shl int %X, ubyte 16 ; <int> [#uses=1]
%tmp.82 = shr int %tmp.81, ubyte 16 ; <int> [#uses=1]
-; RUN: llvm-as < %s | llc -march=ppc32 | egrep 'fn?madd|fn?msub' | wc -l | grep 8
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | egrep 'fn?madd|fn?msub' | wc -l | grep 8
double %test_FMADD1(double %A, double %B, double %C) {
%D = mul double %A, %B
-; RUN: llvm-as < %s | llc -march=ppc32 | grep fnabs
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep fnabs
declare double %fabs(double)
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep fneg
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep fneg
double %test_FNEG_sel(double %A, double %B, double %C) {
%D = sub double -0.0, %A
-; RUN: llvm-as < %s | llc -march=ppc32 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep -v align | not grep li
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep -v align | not grep li
;; Test that immediates are folded into these instructions correctly.
-; RUN: llvm-as < %s | llc -march=ppc32 | grep fcmp | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep fcmp | wc -l | grep 1
declare bool %llvm.isunordered.f64(double, double)
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | not grep r1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep r1
double %test1(double %X) {
%Y = cast double %X to long
-; RUN: llvm-as < %s | llc -march=ppc32 | grep fctiwz | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep fctiwz | wc -l | grep 1
implementation
-; RUN: llvm-as < %s | llc -march=ppc32 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep fmr
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep fmr
double %test(float %F) {
%F = cast float %F to double
; fsqrt should be generated when the fsqrt feature is enabled, but not
; otherwise.
-; RUN: llvm-as < %s | llc -march=ppc32 -mattr=+fsqrt | grep 'fsqrt f1, f1' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep 'fsqrt f1, f1' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mattr=-fsqrt | not grep 'fsqrt f1, f1' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g4 | not grep 'fsqrt f1, f1'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=+fsqrt | grep 'fsqrt f1, f1' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep 'fsqrt f1, f1' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=-fsqrt | not grep 'fsqrt f1, f1' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g4 | not grep 'fsqrt f1, f1'
declare double %llvm.sqrt(double)
double %X(double %Y) {
; fcfid and fctid should be generated when the 64bit feature is enabled, but not
; otherwise.
-; RUN: llvm-as < %s | llc -march=ppc32 -mattr=+64bit | grep 'fcfid' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mattr=+64bit | grep 'fctidz' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep 'fcfid' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep 'fctidz' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mattr=-64bit | not grep 'fcfid' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mattr=-64bit | not grep 'fctidz' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g4 | not grep 'fcfid' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g4 | not grep 'fctidz'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=+64bit | grep 'fcfid' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=+64bit | grep 'fctidz' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep 'fcfid' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep 'fctidz' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=-64bit | not grep 'fcfid' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=-64bit | not grep 'fctidz' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g4 | not grep 'fcfid' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g4 | not grep 'fctidz'
double %X(double %Y) {
%A = cast double %Y to long
-; RUN: llvm-as < %s | llc -march=ppc32 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep mr
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep mr
int %test(int %Y, int %X) {
entry:
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep xori &&
-; RUN: llvm-as < %s | llc -march=ppc32
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep xori &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
int %test(bool %B, int* %P) {
br bool %B, label %T, label %F
-; RUN: llvm-as < %s | llc -march=ppc32 | grep lha
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep lha
uint %test(short* %a) {
%tmp.1 = load short* %a
; Should fold the ori into the lfs.
-; RUN: llvm-as < %s | llc -march=ppc32 | grep lfs &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep ori
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep lfs &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep ori
float %test() {
%tmp.i = load float* cast (uint 186018016 to float*)
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep 'li.*16' &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | not grep addi
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep 'li.*16' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep addi
; Codegen lvx (R+16) as t = li 16, lvx t,R
; This shares the 16 between the two loads.
-; RUN: llvm-as < %s | llc -march=ppc32 -enable-ppc-preinc &&
-; RUN: llvm-as < %s | llc -march=ppc32 -enable-ppc-preinc | not grep addi &&
-; RUN: llvm-as < %s | llc -march=ppc64 -enable-ppc-preinc &&
-; RUN: llvm-as < %s | llc -march=ppc64 -enable-ppc-preinc | not grep addi
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -enable-ppc-preinc &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -enable-ppc-preinc | not grep addi &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -enable-ppc-preinc &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -enable-ppc-preinc | not grep addi
%Glob = global ulong 4
int *%test0(int *%X, int *%dest) {
-; RUN: llvm-as < %s | llc -march=ppc32 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep mul
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep mul
int %test1(int %a) {
%tmp.1 = mul int %a, -2 ; <int> [#uses=1]
; All of these ands and shifts should be folded into rlwimi's
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep mulhwu &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep srawi &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep add &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep mulhw | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep mulhwu &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep srawi &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep add &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep mulhw | wc -l | grep 1
implementation ; Functions:
-; RUN: llvm-as < %s | llc -march=ppc32 | grep neg
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep neg
int %test(int %X) {
%Y = sub int 0, %X
-; RUN: llvm-as < %s | llc &&
-; RUN: llvm-as < %s | llc | not grep ori &&
-; RUN: llvm-as < %s | llc | not grep rlwimi
+; RUN: llvm-upgrade < %s | llvm-as | llc &&
+; RUN: llvm-upgrade < %s | llvm-as | llc | not grep ori &&
+; RUN: llvm-upgrade < %s | llvm-as | llc | not grep rlwimi
int %test1(sbyte* %P) { ;; or -> lwzx
%tmp.2.i = cast sbyte* %P to uint
-; RUN: llvm-as < %s | llc -march=ppc32 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep or
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep or
%struct.foo = type { int, int, [0 x ubyte] }
int %test(%struct.foo* %X) {
-; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwimi &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'or '
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep rlwimi &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'or '
; Make sure there is no register-register copies here.
; All of these ands and shifts should be folded into rlwimi's
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep and &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwimi | wc -l | grep 8
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep and &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep rlwimi | wc -l | grep 8
implementation ; Functions:
; All of these ands and shifts should be folded into rlwimi's
-; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwimi | wc -l | grep 3 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep srwi | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep slwi
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep rlwimi | wc -l | grep 3 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep srwi | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep slwi
implementation ; Functions:
-; RUN: llvm-as < %s | llc -march=ppc32 -stats 2>&1 | grep 'Number of machine instrs printed' | grep 12
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -stats 2>&1 | grep 'Number of machine instrs printed' | grep 12
ushort %Trans16Bit(uint %srcA, uint %srcB, uint %alpha) {
%tmp1 = shl uint %srcA, ubyte 15 ; <uint> [#uses=1]
; All of these ands and shifts should be folded into rlwimi's
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep and &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep srawi &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep srwi &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep slwi &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwinm | wc -l | grep 8
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep and &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep srawi &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep srwi &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep slwi &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep rlwinm | wc -l | grep 8
implementation ; Functions:
; All of these ands and shifts should be folded into rlw[i]nm instructions
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep and &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep srawi &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep srwi &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep slwi &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwnm | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwinm | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep and &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep srawi &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep srwi &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep slwi &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep rlwnm | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep rlwinm | wc -l | grep 1
implementation ; Functions:
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep or &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwnm | wc -l | grep 2 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwinm | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep or &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep rlwnm | wc -l | grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep rlwinm | wc -l | grep 2
implementation ; Functions:
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep cmp
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep cmp
int %seli32_1(int %a) {
entry:
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwinm
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep rlwinm
int %setcc_one_or_zero(int* %a) {
entry:
-; RUN: llvm-as < %s | llc -march=ppc32 | grep 'srwi r., r., 5'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'srwi r., r., 5'
int %eq0(int %a) {
%tmp.1 = seteq int %a, 0 ; <bool> [#uses=1]
; This test should not contain a sign extend
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep extsb
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep extsb
int %test(uint %mode.0.i.0) {
%tmp.79 = cast uint %mode.0.i.0 to sbyte ; <sbyte> [#uses=1]
-; RUN: llvm-as < %s | llc -march=ppc32 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'extsh\|rlwinm'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'extsh\|rlwinm'
declare short %foo()
-; RUN: llvm-as < %s | llc -march=ppc32 -mattr=stfiwx | grep stfiwx &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mattr=stfiwx | not grep r1 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mattr=-stfiwx | not grep stfiwx &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mattr=-stfiwx | grep r1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=stfiwx | grep stfiwx &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=stfiwx | not grep r1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=-stfiwx | not grep stfiwx &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=-stfiwx | grep r1
void %test(float %a, int* %b) {
%tmp.2 = cast float %a to int
-; RUN: llvm-as < %s | llc -march=ppc32 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep lwz
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep lwz
int %test(int* %P) {
store int 1, int* %P
%V = load int* %P
; All of these should be codegen'd without loading immediates
-; RUN: llvm-as < %s | llc -march=ppc32 | grep subfc | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep subfe | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep subfze | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep subfme | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=ppc32 | grep subfic | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep subfc | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep subfe | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep subfze | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep subfme | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep subfic | wc -l | grep 2
implementation ; Functions:
long %sub_ll(long %a, long %b) {
; This should fold the "vcmpbfp." and "vcmpbfp" instructions into a single
; "vcmpbfp.".
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vcmpbfp | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vcmpbfp | wc -l | grep 1
void %test(<4 x float>* %x, <4 x float>* %y, int* %P) {
entry:
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vcmpeqfp. &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | not grep mfcr
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vcmpeqfp. &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep mfcr
; A predicate compare used immediately by a branch should not generate an mfcr.
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5
<4 x int> %test_arg(<4 x int> %A, <4 x int> %B) {
%C = add <4 x int> %A, %B
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | not grep CPI
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep CPI
; Tests spltw(0x80000000) and spltw(0x7FFFFFFF).
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | not grep mullw &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vmsumuhm
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep mullw &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vmsumuhm
<4 x int> %test_v4i32(<4 x int>* %X, <4 x int>* %Y) {
%tmp = load <4 x int>* %X
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | not grep vperm
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep vperm
<4 x float> %test_uu72(<4 x float> *%P1, <4 x float> *%P2) {
%V1 = load <4 x float> *%P1
-; RUN: llvm-as < %s | opt -instcombine | llc -march=ppc32 -mcpu=g5 | not grep vperm &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vsldoi | wc -l | grep 2 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vmrgh | wc -l | grep 7 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vmrgl | wc -l | grep 6 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vpkuhum | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vpkuwum | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llc -march=ppc32 -mcpu=g5 | not grep vperm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vsldoi | wc -l | grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vmrgh | wc -l | grep 7 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vmrgl | wc -l | grep 6 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vpkuhum | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vpkuwum | wc -l | grep 1
void %VSLDOI_xy(<8 x short>* %A, <8 x short>* %B) {
entry:
; Test that vectors are scalarized/lowered correctly.
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vspltw | wc -l | grep 2 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g3 | grep stfs | wc -l | grep 4 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vsplti | wc -l | grep 3 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vsplth | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vspltw | wc -l | grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g3 | grep stfs | wc -l | grep 4 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vsplti | wc -l | grep 3 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vsplth | wc -l | grep 1
%f4 = type <4 x float>
%i4 = type <4 x int>
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vrlw &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | not grep spr &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | not grep vrsave
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vrlw &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep spr &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep vrsave
<4 x int> %test_rol() {
ret <4 x int> < int -11534337, int -11534337, int -11534337, int -11534337 >
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vxor
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vxor
void %foo(<4 x float> *%P) {
%T = load <4 x float> * %P
-; RUN: llvm-as < %s | llc -march=sparc
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc
void %execute_list() {
%tmp.33.i = div float 0.000000e+00, 0.000000e+00 ; <float> [#uses=1]
-; RUN: llvm-as < %s | llc -march=sparc
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc
int %test(int %X) {
%tmp.1 = add int %X, 1 ; <int> [#uses=1]
-; RUN: llvm-as < %s | llc -march=sparc -mattr=-v9 &&
-; RUN: llvm-as < %s | llc -march=sparc -mattr=v9 -enable-sparc-v9-insts &&
-; RUN: llvm-as < %s | llc -march=sparc -mattr=-v9 | not grep popc &&
-; RUN: llvm-as < %s | llc -march=sparc -mattr=v9 -enable-sparc-v9-insts | grep popc
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc -mattr=-v9 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc -mattr=v9 -enable-sparc-v9-insts &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc -mattr=-v9 | not grep popc &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc -mattr=v9 -enable-sparc-v9-insts | grep popc
declare uint %llvm.ctpop.i32(uint)
uint %test(uint %X) {
-; RUN: llvm-as < %s | llc -march=sparc &&
-; RUN: llvm-as < %s | llc -march=sparc | grep xnor | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc | grep xnor | wc -l | grep 2
int %test1(int %X, int %Y) {
%A = xor int %X, %Y
-; RUN: llvm-as < %s | llc -march=x86 -regalloc=simple
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -regalloc=simple
int %main() {
%A = add int 0, 0 ; %A = 0
-; RUN: llvm-as < %s | llc -march=x86 -regalloc=simple
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -regalloc=simple
int %main(int %B) {
;%B = add int 0, 1
; it makes a ton of annoying overlapping live ranges. This code should not
; cause spills!
;
-; RUN: llvm-as < %s | llc -march=x86 -stats 2>&1 | not grep spilled
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -stats 2>&1 | not grep spilled
target endian = little
target pointersize = 32
-; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
implementation
-; RUN: llvm-as < %s | llc -march=x86 | not grep '.byte[[:space:]]*true'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep '.byte[[:space:]]*true'
%X = global bool true
-; RUN: llvm-as < %s | llc -march=x86 | grep movs
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep movs
declare sbyte* %llvm.memcpy(sbyte* %A, sbyte* %B, uint %amt, uint %align)
%A = global [1000 x int] zeroinitializer
-; RUN: llvm-as < %s | llc -march=x86 | grep '(%esp'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep '(%esp'
declare sbyte* %llvm.returnaddress(uint)
declare sbyte* %llvm.frameaddress(uint)
-; RUN: llvm-as < %s | llc -march=x86 | grep ESP | not grep sub
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep ESP | not grep sub
int %test(int %X) {
ret int %X
-; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
bool %test1(double %X) {
%V = cast double %X to bool
-; RUN: llvm-as < %s | llc -march=x86 | not grep 'j[lgbe]'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'j[lgbe]'
int %max(int %A, int %B) {
%gt = setgt int %A, %B
; overlapping live intervals. When two overlapping intervals have the same
; value, they can be joined though.
;
-; RUN: llvm-as < %s | llc -march=x86 -regalloc=linearscan | not grep 'mov %[A-Z]\{2,3\}, %[A-Z]\{2,3\}'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -regalloc=linearscan | not grep 'mov %[A-Z]\{2,3\}, %[A-Z]\{2,3\}'
long %test(long %x) {
entry:
-; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
implementation ; Functions:
-; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
bool %T(double %X) {
%V = seteq double %X, %X
-; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
bool %test(bool %C, bool %D, int %X, int %Y) {
%E = setlt int %X, %Y
; is invalid code (there is no correct way to order the instruction). Check
; that we do not fold the load into the sub.
-; RUN: llvm-as < %s | llc -march=x86 | not grep 'sub.*GLOBAL'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'sub.*GLOBAL'
%GLOBAL = external global int
-; RUN: llvm-as < %s | llc -march=x86 | not grep 18446744073709551612
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 18446744073709551612
%A = external global int
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=generic
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=generic
; Make sure LLC doesn't crash in the stackifier due to FP PHI nodes.
void %radfg_() {
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | not grep 'test.*AL' || \
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | not grep 'cmove.*EAX'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | not grep 'test.*AL' || \
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | not grep 'cmove.*EAX'
; This testcase was compiling to:
;
; XFAIL: *
-; RUN: llvm-as < %s | llc -march=x86 -enable-x86-fastcc | grep 'jmp \*ecx'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -enable-x86-fastcc | grep 'jmp \*ecx'
declare int %putchar(int)
int %main(){
-; RUN: llvm-as < %s | llc -march=x86 | grep 'shld' | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'shld' | wc -l | grep 1
;
; Check that the isel does not fold the shld, which already folds a load
; and has two uses, into a store.
-; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
bool %test(long %X) {
%B = setlt long %X, 0 ; <bool> [#uses=1]
-; RUN: llvm-as < %s | llc -march=x86 | not grep 'subl.*%esp'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'subl.*%esp'
int %f(int %a, int %b) {
%tmp.2 = mul int %a, %a
-; RUN: llvm-as < %s | llc -march=x86 -stats 2>&1 | grep 'asm-printer' | grep 7
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -stats 2>&1 | grep 'asm-printer' | grep 7
int %g(int %a, int %b) {
%tmp.1 = shl int %b, ubyte 1
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah
target endian = little
target pointersize = 32
-; RUN: llvm-as < %s | llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static | grep 'movl _last' | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static | grep 'cmpl.*_last' | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static | grep 'movl _last' | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static | grep 'cmpl.*_last' | wc -l | grep 1
%block = external global ubyte* ; <ubyte**> [#uses=1]
%last = external global int ; <int*> [#uses=3]
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah -stats 2>&1 | not grep 'Number of register spills'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah -stats 2>&1 | not grep 'Number of register spills'
int %foo(<4 x float>* %a, <4 x float>* %b, <4 x float>* %c, <4 x float>* %d) {
%tmp44 = load <4 x float>* %a ; <<4 x float>> [#uses=9]
-; RUN: llvm-as < %s | llc -march=x86 -relocation-model=static -stats 2>&1 | grep "asm-printer" | grep 14
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static -stats 2>&1 | grep "asm-printer" | grep 14
%size20 = external global uint ; <uint*> [#uses=1]
%in5 = external global ubyte* ; <ubyte**> [#uses=1]
-; RUN: llvm-as < %s | llc -march=x86 -stats 2>&1 | grep "asm-printer" | grep 19
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -stats 2>&1 | grep "asm-printer" | grep 19
; XFAIL: *
void %_ZN9__gnu_cxx9hashtableISt4pairIKPKciES3_NS_4hashIS3_EESt10_Select1stIS5_E5eqstrSaIiEE14find_or_insertERKS5__cond_true456.i(sbyte* %tmp435.i, uint* %tmp449.i.out) {
; Coalescing from R32 to a subset R32_. Once another register coalescer bug is
; fixed, the movb should go away as well.
-; RUN: llvm-as < %s | llc -march=x86 -relocation-model=static | grep 'movl' | wc -l
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | grep 'movl' | wc -l
%B = external global uint
%C = external global ushort*
-; RUN: llvm-as < %s | llc -march=x86 -relocation-model=static | not grep 'subl.*%esp'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | not grep 'subl.*%esp'
%A = external global ushort*
%B = external global uint
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -stats 2>&1 | grep 'asm-printer' | grep 39
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -stats 2>&1 | grep 'asm-printer' | grep 39
void %foo(int* %mc, int* %bp, int* %ms, int* %xmb, int* %mpp, int* %tpmm, int* %ip, int* %tpim, int* %dpp, int* %tpdm, int* %bpi, int %M) {
entry:
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2
<4 x float> %opRSQ(<4 x float> %a) {
entry:
-; RUN: llvm-as < %s | llc -march=x86 &&
-; RUN: llvm-as < %s | llc -march=x86 | grep 'setnp'
-; RUN: llvm-as < %s | llc -march=x86 -enable-unsafe-fp-math | not grep 'setnp'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'setnp'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -enable-unsafe-fp-math | not grep 'setnp'
uint %test(float %f) {
%tmp = seteq float %f, 0.000000e+00
-; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
int %test() {
br bool false, label %cond_next33, label %cond_true12
-; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
; PR825
long %test() {
-; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
; PR828
target endian = little
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=att
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=att
; PR834
target endian = little
-; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
; PR833
%G = weak global int 0 ; <int*> [#uses=3]
-; RUN: llvm-as < %s | llc -march=x86 | grep 4294967240
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 4294967240
; PR853
%X = global int* cast (ulong 18446744073709551560 to int*)
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=att | grep 'movl 4(%eax),%ebp' &&
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=att | grep 'movl 0(%eax), %ebx'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=att | grep 'movl 4(%eax),%ebp' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=att | grep 'movl 0(%eax), %ebx'
; PR850
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2
fastcc int %test(%struct.foo* %v, %struct.foo* %vi) {
br bool false, label %ilog2.exit, label %cond_true.i
-; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
%struct.expr = type { %struct.rtx_def*, int, %struct.expr*, %struct.occr*, %struct.occr*, %struct.rtx_def* }
%struct.hash_table = type { %struct.expr**, uint, uint, int }
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=i386 | not grep 'movl %eax, %edx'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=i386 | not grep 'movl %eax, %edx'
int %foo(int %t, int %C) {
entry:
-; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
target endian = little
target pointersize = 32
-; RUN: llvm-as < %s | llc &&
-; RUN: llvm-as < %s | llc -enable-x86-fastcc
+; RUN: llvm-upgrade < %s | llvm-as | llc &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -enable-x86-fastcc
; PR933
fastcc bool %test() {
-; RUN: llvm-as < %s | llc -march=x86 -mattr=sse | grep movaps
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=sse | grep movaps
; Test that the load is NOT folded into the intrinsic, which would zero the top
; elts of the loaded vector.
-; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
void %_ZN13QFSFileEngine4readEPcx() {
%tmp201 = load int* null
-; RUN: llvm-as < %s | llc -march=x86 | grep shrl
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep shrl
; Bug in FindModifiedNodeSlot cause tmp14 load to become a zextload and shr 31
; is then optimized away.
-; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
%struct.function = type opaque
%struct.lang_decl = type opaque
%struct.location_t = type { sbyte*, int }
-; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
%str = external global [18 x sbyte]
-; RUN: llvm-as < %s | llc -march=x86 | %prcontext je 1 | grep "BB1_4:"
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | %prcontext je 1 | grep "BB1_4:"
%str = internal constant [14 x sbyte] c"Hello world!\0A\00" ; <[14 x sbyte]*> [#uses=1]
%str = internal constant [13 x sbyte] c"Blah world!\0A\00" ; <[13 x sbyte]*> [#uses=1]
-; RUN: llvm-as < %s | llc -march=x86 | grep 'subl $4, %esp'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'subl $4, %esp'
target triple = "i686-pc-linux-gnu"
-; RUN: llvm-as < %s | llc -march=x86-64 &&
-; RUN: llvm-as < %s | llc -march=x86-64 | not grep 'movb %sil, %ah' &&
-; RUN: llvm-as < %s | llc -march=x86-64 | grep 'movzbw %al, %ax'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 | not grep 'movb %sil, %ah' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 | grep 'movzbw %al, %ax'
void %handle_vector_size_attribute() {
entry:
-; RUN: llvm-as < %s | llc -march=x86 | grep test.*1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep test.*1
; PR1016
int %test(int %A, int %B, int %C) {
-; RUN: llvm-as < %s | llc -march=x86 &&
-; RUN: llvm-as < %s | llc -march=x86 | grep 3721182122 | wc -l | grep 2 &&
-; RUN: llvm-as < %s | llc -march=x86 | grep 'movl _bytes2' | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 3721182122 | wc -l | grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'movl _bytes2' | wc -l | grep 1
; PR1022, 1023
%fmt = constant [4 x sbyte] c"%x\0A\00"
-; RUN: llvm-as < %s | llc -march=x86 | grep and | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep and | wc -l | grep 1
; The dag combiner should fold together (x&127)|(y&16711680) -> (x|y)&c1
; in this case.
-; RUN: llvm-as < %s | llc -march=x86 -relocation-model=static | grep 'test1 $_GV' &&
-; RUN: llvm-as < %s | llc -march=x86 -relocation-model=static | grep 'test2 _GV'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | grep 'test1 $_GV' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | grep 'test2 _GV'
; PR882
target datalayout = "e-p:32:32"
; bswap should be constant folded when it is passed a constant argument
-; RUN: llvm-as < %s | llc -march=x86 | grep bswapl | wc -l | grep 3 &&
-; RUN: llvm-as < %s | llc -march=x86 | grep rolw | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep bswapl | wc -l | grep 3 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep rolw | wc -l | grep 1
declare ushort %llvm.bswap.i16(ushort)
declare uint %llvm.bswap.i32(uint)
-; RUN: llvm-as < %s | llc -march=x86 &&
-; RUN: llvm-as < %s | llc -march=x86 | grep cmp | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 | grep test | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep cmp | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep test | wc -l | grep 1
int %f1(int %X, int* %y) {
%tmp = load int* %y
; insertion of register-register copies.
; Make sure there are only 3 mov's for each testcase
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | grep 'mov ' | wc -l | grep 6
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep 'mov ' | wc -l | grep 6
target triple = "i686-pc-linux-gnu"
-; RUN: llvm-as < %s | llc -march=x86 &&
-; RUN: llvm-as < %s | llc -march=x86 | not grep add
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep add
bool %X(int %X) {
%Y = add int %X, 14
%Z = setne int %Y, 12345
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah | grep movsd | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah | grep ucomisd
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah | grep movsd | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah | grep ucomisd
declare bool %llvm.isunordered.f64(double,double)
bool %test1(double %X, double %Y) { ;; Returns isunordered(X,Y)
-; RUN: llvm-as < %s | llc | grep no_dead_strip
+; RUN: llvm-upgrade < %s | llvm-as | llc | grep no_dead_strip
target endian = little
target pointersize = 32
-; RUN: llvm-as < %s | llc -march=x86 | grep 365384439
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 365384439
uint %f9188_mul365384439_shift27(uint %A) {
%tmp1 = div uint %A, 1577682821 ; <uint> [#uses=1]
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | grep movzx | wc -l | grep 1
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | grep movsx | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep movzx | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep movsx | wc -l | grep 1
%G1 = internal global ubyte 0 ; <ubyte*> [#uses=1]
%G2 = internal global sbyte 0 ; <sbyte*> [#uses=1]
-; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin | grep weak_reference | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=i686-apple-darwin | grep weak_reference | wc -l | grep 2
%Y = global int (sbyte*)* %X
declare extern_weak int %X(sbyte*)
; Make sure this testcase codegens to the fabs instruction, not a call to fabsf
-; RUN: llvm-as < %s | llc -march=x86 -mattr=-sse2,-sse3 | grep 'fabs$' | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=-sse2,-sse3 -enable-unsafe-fp-math | grep 'fabs$' | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=-sse2,-sse3 | grep 'fabs$' | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=-sse2,-sse3 -enable-unsafe-fp-math | grep 'fabs$' | wc -l | grep 2
target endian = little
target pointersize = 32
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel -enable-x86-fastcc -mcpu=yonah | grep 'ret 28'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel -enable-x86-fastcc -mcpu=yonah | grep 'ret 28'
; Check that a fastcc function pops its stack variables before returning.
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel -enable-x86-fastcc | grep 'add ESP, 8'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel -enable-x86-fastcc | grep 'add ESP, 8'
target triple = "i686-pc-linux-gnu"
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel -enable-x86-fastcc | grep 'mov EDX, 1'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel -enable-x86-fastcc | grep 'mov EDX, 1'
; check that fastcc is passing stuff in regs.
; Argument reg passing is disabled due to regalloc issues. FIXME!
; XFAIL: *
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel -enable-x86-fastcc | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel -enable-x86-fastcc | not grep call
fastcc int %bar(int %X, int(double, int) *%FP) {
%Y = tail call fastcc int %FP(double 0.0, int %X)
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=att -mattr=-sse2 | grep fildll | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=att -mattr=-sse2 | grep fildll | wc -l | grep 2
fastcc double %sint64_to_fp(long %X) {
%R = cast long %X to double
;; Test that this FP immediate is stored in the constant pool as a float.
-; RUN: llvm-as < %s | llc -march=x86 -mattr=-sse2,-sse3 | grep '.long.1123418112'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=-sse2,-sse3 | grep '.long.1123418112'
double %D() { ret double 123.0 }
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=i386 | grep fucomi.*st.[12]
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=i386 | grep fucomi.*st.[12]
; PR1012
float %foo(float *%col.2.0) {
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | grep ST | not grep 'fadd\|fsub\|fdiv\|fmul'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep ST | not grep 'fadd\|fsub\|fdiv\|fmul'
; Test that the load of the constant is folded into the operation.
-; RUN: llvm-as < %s | llc -march=x86 | grep fild | not grep ESP
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep fild | not grep ESP
double %short(short* %P) {
%V = load short* %P
%V2 = cast short %V to double
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | grep ST | not grep 'fadd\|fsub\|fdiv\|fmul'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep ST | not grep 'fadd\|fsub\|fdiv\|fmul'
; Test that the load of the memory location is folded into the operation.
-; RUN: llvm-as < %s | llc -march=x86 | grep lea
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep lea
declare int %foo()
int %test() {
-; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
int %test1() {
; Dest is AX, dest type = i32.
-; RUN: llvm-as < %s | llc -march=x86 | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep call
declare bool %llvm.isunordered(double)
bool %test_isnan(double %X) {
-; RUN: llvm-as < %s | llc -march=x86 | grep jns
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep jns
int %f(int %X) {
entry:
%tmp1 = add int %X, 1 ; <int> [#uses=1]
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | grep 'lea EAX, DWORD PTR \[... + 4\*... - 5\]' &&
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | not grep add
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep 'lea EAX, DWORD PTR \[... + 4\*... - 5\]' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | not grep add
int %test1(int %A, int %B) {
%tmp1 = shl int %A, ubyte 2 ; <int> [#uses=1]
-; RUN: llvm-as < %s | llc -march=x86
-; RUN: llvm-as < %s | llc -march=x86 | not grep orl
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep orl
int %test(int %x) {
%tmp1 = shl int %x, ubyte 3
%tmp2 = add int %tmp1, 7
-; RUN: llvm-as < %s | llc -relocation-model=dynamic-no-pic -mtriple=i686-apple-darwin8.7.2 | grep L_Arr.non_lazy_ptr &&
-; RUN: llvm-as < %s | llc -relocation-model=dynamic-no-pic -mtriple=i686-apple-darwin8.7.2 | %prcontext L_Arr.non_lazy_ptr 1 | grep '4(%esp)'
+; RUN: llvm-upgrade < %s | llvm-as | llc -relocation-model=dynamic-no-pic -mtriple=i686-apple-darwin8.7.2 | grep L_Arr.non_lazy_ptr &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -relocation-model=dynamic-no-pic -mtriple=i686-apple-darwin8.7.2 | %prcontext L_Arr.non_lazy_ptr 1 | grep '4(%esp)'
%Arr = external global [0 x int] ; <[0 x int]*> [#uses=2]
-; RUN: llvm-as < %s | llc -march=x86 | grep 'A(' | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'A(' | wc -l | grep 1
;
; Make sure the common loop invariant _A(reg) is hoisted up to preheader.
-; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin -relocation-model=pic | not grep lea
+; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=i686-apple-darwin -relocation-model=pic | not grep lea
;
; Make sure the PIC label flags2-"L1$pb" is not moved up to the preheader.
-; RUN: llvm-as < %s | llc -march=x86 | grep lea
-; RUN: llvm-as < %s | llc -march=x86 | not grep add
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep lea
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep add
int %test(int %X, int %Y) {
; Push the shl through the mul to allow an LEA to be formed, instead
-; RUN: llvm-as < %s | llc -march=x86 -mattr=-sse2,-sse3 | grep fchs
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=-sse2,-sse3 | grep fchs
double %T() {
-; RUN: llvm-as < %s | llc -march=x86 | not grep set
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep set
void %foo(int %X, int %Y, int %Z) {
entry:
; Check that the shift gets turned into an LEA.
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | not grep 'mov E.X, E.X'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | not grep 'mov E.X, E.X'
; FIXME: We need live variable information about flags to do this xform safely. :(
; XFAIL: *
; Check that the shift gets turned into an LEA.
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | not grep 'mov E.X, E.X'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | not grep 'mov E.X, E.X'
%G = external global int
-; RUN: llvm-as < %s | llc -relocation-model=pic -march=x86 | not grep -F .text
+; RUN: llvm-upgrade < %s | llvm-as | llc -relocation-model=pic -march=x86 | not grep -F .text
target endian = little
target pointersize = 32
target triple = "i386-linux-gnu"
-; RUN: llvm-as < %s | llc -march=x86 | grep rdtsc &&
-; RUN: llvm-as < %s | llc -march=x86-64 | grep rdtsc
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep rdtsc &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 | grep rdtsc
declare ulong %llvm.readcyclecounter()
;; Both functions in this testcase should codegen to the same function, and
;; neither of them should require spilling anything to the stack.
-; RUN: llvm-as < %s | llc -march=x86 -stats 2>&1 | not grep 'Number of register spills'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -stats 2>&1 | not grep 'Number of register spills'
;; This can be compiled to use three registers if the loads are not
;; folded into the multiplies, 2 registers otherwise.
-; RUN: llvm-as < %s | llc -march=x86 &&
-; RUN: llvm-as < %s | llc -march=x86 | not grep div
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep div
int %test1(int %X) {
%tmp1 = rem int %X, 255
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | grep ro[rl] | wc -l | grep 12
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep ro[rl] | wc -l | grep 12
uint %rotl32(uint %A, ubyte %Amt) {
%B = shl uint %A, ubyte %Amt
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse1,+sse2 | grep mins | wc -l | grep 3 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse1,+sse2 | grep maxs | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse1,+sse2 | grep mins | wc -l | grep 3 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse1,+sse2 | grep maxs | wc -l | grep 2
declare bool %llvm.isunordered.f64( double %x, double %y )
declare bool %llvm.isunordered.f32( float %x, float %y )
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah &&
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=pentium
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=pentium
bool %boolSel(bool %A, bool %B, bool %C) {
%X = select bool %A, bool %B, bool %C
-; RUN: llvm-as < %s | llc -march=x86 | not grep 'set'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'set'
declare bool %llvm.isunordered.f32(float, float)
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | grep 'shld.*CL' &&
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | not grep 'mov CL, BL'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep 'shld.*CL' &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | not grep 'mov CL, BL'
; PR687
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | grep sh[lr]d | wc -l | grep 5
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep sh[lr]d | wc -l | grep 5
long %test1(long %X, ubyte %C) {
%Y = shl long %X, ubyte %C
-; RUN: llvm-as < %s | llc -march=x86 | grep 's[ah][rl]l' | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 's[ah][rl]l' | wc -l | grep 1
int* %test1(int *%P, uint %X) {
%Y = shr uint %X, ubyte 2
-; RUN: llvm-as < %s | llc -march=x86 | not grep 'leal'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'leal'
%x = external global int
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah -enable-x86-sse &&
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah -enable-x86-sse | not grep movss
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah -enable-x86-sse | not grep xmm
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah -enable-x86-sse &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah -enable-x86-sse | not grep movss
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah -enable-x86-sse | not grep xmm
double %test1(double *%P) {
%X = load double* %P
-; RUN: llvm-as < %s | llc -march=x86 | not grep rodata
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep rodata
;
; Check that no FP constants in this testcase ends up in the
; constant pool.
-; RUN: llvm-as < %s | llc -march=x86 | grep movl | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep movl | wc -l | grep 1
%dst = global int 0
%ptr = global int* null
-; RUN: llvm-as < %s | llc -march=x86 | not grep 'mov'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'mov'
;
; Test the add and load are folded into the store instruction.
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | grep 'and DWORD PTR' | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep 'and DWORD PTR' | wc -l | grep 2
target endian = little
target pointersize = 32
-; RUN: llvm-as < %s | llc
+; RUN: llvm-upgrade < %s | llvm-as | llc
%struct._obstack_chunk = type { sbyte*, %struct._obstack_chunk*, [4 x sbyte] }
%struct.obstack = type { int, %struct._obstack_chunk*, sbyte*, sbyte*, sbyte*, int, int, %struct._obstack_chunk* (...)*, void (...)*, sbyte*, ubyte }
%stmt_obstack = external global %struct.obstack ; <%struct.obstack*> [#uses=1]
; An integer truncation to bool should be done with an and instruction to make
; sure only the LSBit survives. Test that this is the case both for a returned
; value and as the operand of a branch.
-; RUN: llvm-as < %s | llc -march=x86 &&
-; RUN: llvm-as < %s | llc -march=x86 | grep '\(and\)\|\(test.*\$1\)' | wc -l | grep 6
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep '\(and\)\|\(test.*\$1\)' | wc -l | grep 6
bool %test1(int %X) {
%Y = trunc int %X to bool
ret bool %Y
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep 'subl.*60'
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep 'movdqa.*32'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep 'subl.*60'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep 'movdqa.*32'
void %test() {
tail call void %xx( int 1, int 2, int 3, int 4, int 5, int 6, int 7, <2 x long> cast (<4 x int> < int 4, int 3, int 2, int 1 > to <2 x long>), <2 x long> cast (<4 x int> < int 8, int 7, int 6, int 5 > to <2 x long>), <2 x long> cast (<4 x int> < int 6, int 4, int 2, int 0 > to <2 x long>), <2 x long> cast (<4 x int> < int 8, int 4, int 2, int 1 > to <2 x long>), <2 x long> cast (<4 x int> < int 0, int 1, int 3, int 9 > to <2 x long>) )
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep and
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | not grep and
<4 x float> %test(<4 x float>* %v1) {
%tmp = load <4 x float>* %v1
%tmp15 = cast <4 x float> %tmp to <2 x long>
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movss | wc -l | grep 3 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movhlps | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshufd | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep unpckhpd | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movss | wc -l | grep 3 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movhlps | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep pshufd | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep unpckhpd | wc -l | grep 1
void %test1(<4 x float>* %F, float* %f) {
%tmp = load <4 x float>* %F
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movss | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pinsrw | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movss | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep pinsrw | wc -l | grep 2
void %test(<4 x float>* %F, int %I) {
%tmp = load <4 x float>* %F
-; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah
<2 x double> %test() {
ret <2 x double> <double 0.0, double 0.0>
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse
void %test(int %C, <4 x float>* %A, <4 x float>* %B) {
%tmp = load <4 x float>* %A
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movss | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movd | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movss | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movd | wc -l | grep 1
<4 x float> %test1(float %a) {
%tmp = insertelement <4 x float> zeroinitializer, float %a, uint 0
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep shufps | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshufd | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep shufps | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep pshufd | wc -l | grep 1
<4 x float> %test(float %a) {
%tmp = insertelement <4 x float> zeroinitializer, float %a, uint 1
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pinsrw | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep pinsrw | wc -l | grep 2
<2 x long> %test(short %a) {
entry:
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movlhps | wc -l | grep 2 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep unpcklps | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep punpckldq | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movlhps | wc -l | grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep unpcklps | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep punpckldq | wc -l | grep 1
<4 x float> %test1(float %a, float %b) {
%tmp = insertelement <4 x float> zeroinitializer, float %a, uint 0
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep unpcklps | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep shufps | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep unpcklps | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep shufps | wc -l | grep 1
<4 x float> %test(float %a, float %b, float %c) {
%tmp = insertelement <4 x float> zeroinitializer, float %a, uint 1
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movq | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movq | wc -l | grep 1
<2 x long> %test(<2 x long>* %p) {
%tmp = cast <2 x long>* %p to double*
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep punpckl | wc -l | grep 7
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep punpckl | wc -l | grep 7
void %test(<8 x short>* %b, short %a0, short %a1, short %a2, short %a3, short %a4, short %a5, short %a6, short %a7) {
%tmp = insertelement <8 x short> zeroinitializer, short %a0, uint 0
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep unpcklps | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep unpckhps | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep 'sub.*esp'
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep unpcklps | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep unpckhps | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | not grep 'sub.*esp'
void %test(<4 x float>* %res, <4 x float>* %A, <4 x float>* %B) {
%tmp = load <4 x float>* %B ; <<4 x float>> [#uses=2]
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshufhw | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshuflw | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movhps | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep pshufhw | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep pshuflw | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movhps | wc -l | grep 1
void %test1(<2 x long>* %res, <2 x long>* %A) {
%tmp = load <2 x long>* %A
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movlhps | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movhlps | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movlhps | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movhlps | wc -l | grep 1
<4 x float> %test1(<4 x float>* %x, <4 x float>* %y) {
%tmp = load <4 x float>* %y
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep shuf | wc -l | grep 2 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep unpck
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep shuf | wc -l | grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | not grep unpck
void %test(<4 x float>* %res, <4 x float>* %A, <4 x float>* %B, <4 x float>* %C) {
%tmp3 = load <4 x float>* %B
%tmp5 = load <4 x float>* %C
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movhlps | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep shufps | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movhlps | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep shufps | wc -l | grep 1
void %test() {
%tmp1 = load <4 x float>* null
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movapd | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movaps | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movups | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movapd | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movaps | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movups | wc -l | grep 2
target triple = "i686-apple-darwin"
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep xorps | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep shufps
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep xorps | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | not grep shufps
void %test() {
cast <4 x int> zeroinitializer to <4 x float>
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep shufps
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | not grep shufps
void %test(<4 x float>* %res, <4 x float>* %A) {
%tmp1 = load <4 x float>* %A
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep punpck | wc -l | grep 2 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep pextrw
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep punpck | wc -l | grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | not grep pextrw
<4 x int> %test(sbyte** %ptr) {
entry:
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep shufp | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movups | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshufhw | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep shufp | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movups | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep pshufhw | wc -l | grep 1
void %test_v4sf(<4 x float>* %P, float %X, float %Y) {
%tmp = insertelement <4 x float> zeroinitializer, float %X, uint 0
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshufd | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep pshufd | wc -l | grep 1
void %test(<2 x long>* %P, sbyte %x) {
%tmp = insertelement <16 x sbyte> zeroinitializer, sbyte %x, uint 0 ; <<16 x sbyte>> [#uses=1]
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep shufps &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse3 | grep movddup
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep shufps &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse3 | grep movddup
void %test_v4sf(<4 x float>* %P, <4 x float>* %Q, float %X) {
%tmp = insertelement <4 x float> zeroinitializer, float %X, uint 0
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse,+sse2 | grep minss | grep CPI | wc -l | grep 2 &&
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse,+sse2 | grep CPI | not grep movss
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse,+sse2 | grep minss | grep CPI | wc -l | grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse,+sse2 | grep CPI | not grep movss
target endian = little
target pointersize = 32
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep xorps | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep xorps | wc -l | grep 2
void %foo(<4 x float> *%P) {
%T = load <4 x float> * %P
-; RUN: llvm-as < %s | llc -march=x86-64 &&
-; RUN: llvm-as < %s | llc -march=x86-64 | grep GOTPCREL | wc -l | grep 4 &&
-; RUN: llvm-as < %s | llc -march=x86-64 | grep rip | wc -l | grep 6 &&
-; RUN: llvm-as < %s | llc -march=x86-64 | grep movq | wc -l | grep 6 &&
-; RUN: llvm-as < %s | llc -march=x86-64 | grep leaq | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=x86-64 -relocation-model=static | grep rip | wc -l | grep 4 &&
-; RUN: llvm-as < %s | llc -march=x86-64 -relocation-model=static | grep movl | wc -l | grep 2 &&
-; RUN: llvm-as < %s | llc -march=x86-64 -relocation-model=static | grep movq | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 | grep GOTPCREL | wc -l | grep 4 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 | grep rip | wc -l | grep 6 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 | grep movq | wc -l | grep 6 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 | grep leaq | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 -relocation-model=static | grep rip | wc -l | grep 4 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 -relocation-model=static | grep movl | wc -l | grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 -relocation-model=static | grep movq | wc -l | grep 2
%ptr = external global int*
%src = external global [0 x int]
-; RUN: llvm-as < %s | llc -march=x86-64
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64
<4 x int> %test() {
%tmp1039 = call <4 x int> %llvm.x86.sse2.psll.d( <4 x int> zeroinitializer, <4 x int> zeroinitializer ) ; <<4 x int>> [#uses=1]
; This testcase shoudl return with an exit code of 1.
;
-; RUN: llvm-as < %s | not lli
+; RUN: llvm-upgrade < %s | llvm-as | not lli
%test = global long 0
implementation
-; RUN: llvm-as < %s | lli - test
+; RUN: llvm-upgrade < %s | llvm-as | lli - test
implementation
; PR672
-; RUN: llvm-as < %s | lli
+; RUN: llvm-upgrade < %s | llvm-as | lli
int %main(){
%f = cast int (int, int*, int)* %check_tail to int*
-; 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
-; 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
Startup:
ret int 0
end
-
-; 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
-; 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
-; 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>
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
--- /dev/null
+; 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
+}
+
+
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
-; 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
; 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
}
-; 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
-; 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
; Call graph construction crash: Not handling indirect calls right
;
-; RUN: llvm-as < %s | opt -analyze -callgraph
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -callgraph
;
%FunTy = type int(int)
; Crash in post dominator set construction.
;
-; RUN: llvm-as < %s | opt -analyze -postdomset
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -postdomset
;
implementation
; Crash in post dominator set construction.
;
-; RUN: llvm-as < %s | opt -analyze -postdomset
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -postdomset
;
implementation
; Inlining used to break PHI nodes. This tests that they are correctly updated
; when a node is split around the call instruction. The verifier caught the error.
;
-; RUN: llvm-as < %s | opt -inline
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline
;
implementation
;
; Fixed by adding new arguments to ConstantFoldTerminator
;
-; RUN: llvm-as < %s | opt -constprop
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop
implementation
; blocks. These blocks should at least dominate themselves. This is
; fouling up the verify pass.
;
-; RUN: llvm-as < %s | opt -analyze -domset | grep BB
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -domset | grep BB
void %test() {
ret void
; figure out that loop "Inner" should be nested inside of leep "LoopHeader",
; and instead nests it just inside loop "Top"
;
-; RUN: llvm-as < %s | opt -analyze -loops | grep ' Loop Containing:[ ]*%Inner'
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -loops | grep ' Loop Containing:[ ]*%Inner'
;
implementation
-; RUN: llvm-as < %s | opt -lower-packed | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | opt -lower-packed | llvm-dis
%foo = uninitialized global <2 x int>;
%bar = uninitialized global <2 x int>;
-; RUN: llvm-as < %s | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis
%bar = external global <2 x int> ; <<2 x int>*> [#uses=1]
-; RUN: llvm-as < %s | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis
%foo = global <2 x int> <int 0, int 1>;
%bar = uninitialized global <2 x int>;
-; RUN: llvm-as < %s | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis
%foo = uninitialized global <4 x float>;
%bar = uninitialized global <4 x float>;
-; RUN: llvm-as < %s | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis
%foo = uninitialized global <4 x float>;
%bar = uninitialized global <4 x float>;
-; RUN: llvm-as < %s | llvm-dis | llvm-as > /dev/null
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as > /dev/null
%v4f = type <4 x float>
-; RUN: llvm-as < %s | opt -adce
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce
implementation
; It is illegal to remove BB1 because it will mess up the PHI node!
;
-; RUN: llvm-as < %s | opt -adce | llvm-dis | grep BB1
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce | llvm-dis | grep BB1
int "test"(bool %C, int %A, int %B) {
; removed even though there were uses still around. Now the uses are filled
; in with a dummy value before the PHI is deleted.
;
-; RUN: llvm-as < %s | opt -adce
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce
%node_t = type { double*, %node_t*, %node_t**, double**, double*, int, int }
; This testcase is a distilled form of: 2002-05-28-Crash.ll
-; RUN: llvm-as < %s | opt -adce
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce
float "test"(int %i) {
%F = cast int %i to float ; This BB is not dead
; return !s;
;}
;
-; RUN: llvm-as < %s | opt -adce
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce
implementation ; Functions:
; block in this function, it would work fine, but that would be the part we
; have to fix now, wouldn't it....
;
-; RUN: llvm-as < %s | opt -adce
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce
void %foo(sbyte* %reg5481) {
%cast611 = cast sbyte* %reg5481 to sbyte** ; <sbyte**> [#uses=1]
; This testcase was extracted from the gzip SPEC benchmark
;
-; RUN: llvm-as < %s | opt -adce
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce
%bk = external global uint ; <uint*> [#uses=2]
%hufts = external global uint ; <uint*> [#uses=1]
; Testcase reduced from 197.parser by bugpoint
-; RUN: llvm-as < %s | opt -adce
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce
implementation ; Functions:
void %conjunction_prune() {
; entries for it's postdominator. But I think this can only happen when the
; PHI node is dead, so we just avoid patching up dead PHI nodes.
-; RUN: llvm-as < %s | opt -adce
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce
target endian = little
target pointersize = 32
-; RUN: llvm-as < %s | opt -adce -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce -disable-output
%G = external global int*
implementation ; Functions:
-; RUN: llvm-as < %s | opt -adce -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce -disable-output
target endian = little
target pointersize = 32
-; RUN: llvm-as < %s | opt -adce -simplifycfg | llvm-dis | not grep then:
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce -simplifycfg | llvm-dis | not grep then:
void %dead_test8(int* %data.1, int %idx.1) {
entry: ; No predecessors!
-; RUN: llvm-as < %s | opt -adce -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce -disable-output
implementation ; Functions:
-; RUN: llvm-as < %s | opt -adce -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce -disable-output
int %main() {
br label %loop
-; RUN: llvm-as < %s | opt -adce -simplifycfg | llvm-dis | grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce -simplifycfg | llvm-dis | grep call
declare void %exit(int)
int %main(int %argc) {
; This testcase was failing because without merging the return blocks, ADCE
; didn't know that it could get rid of the then.0 block.
-; RUN: llvm-as < %s | opt -adce | llvm-dis | not grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce | llvm-dis | not grep load
implementation ; Functions:
-; RUN: llvm-as < %s | opt -adce -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce -disable-output
void %test() {
entry:
-; RUN: llvm-as < %s | opt -adce -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce -disable-output
implementation ; Functions:
; This is the test case taken from Appel's book that illustrates a hard case
; that SCCP gets right, and when followed by ADCE, is completely eliminated
;
-; RUN: llvm-as < %s | opt -sccp -adce -simplifycfg | llvm-dis | not grep br
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -adce -simplifycfg | llvm-dis | not grep br
int "test function"(int %i0, int %j0) {
BB1:
-; RUN: llvm-as < %s | opt -adce -simplifycfg | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce -simplifycfg | llvm-dis
int "Test"(int %A, int %B) {
BB1:
-; RUN: llvm-as < %s | opt -adce -simplifycfg | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce -simplifycfg | llvm-dis
%FILE = type { int, ubyte*, ubyte*, ubyte, ubyte, uint, uint, uint }
%spec_fd_t = type { int, int, int, ubyte* }
-; RUN: llvm-as < %s | opt -adce -simplifycfg | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce -simplifycfg | llvm-dis
%FILE = type { int, ubyte*, ubyte*, ubyte, ubyte, uint, uint, uint }
%spec_fd_t = type { int, int, int, ubyte* }
-; RUN: llvm-as < %s | opt -adce | llvm-dis | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce | llvm-dis | not grep call
declare int %strlen(sbyte*)
-; RUN: llvm-as < %s | opt -adce | llvm-dis | not grep null
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce | llvm-dis | not grep null
declare int %strlen(sbyte*)
-; RUN: llvm-as < %s | opt -adce | llvm-dis | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce | llvm-dis | not grep call
; The call is not live just because the PHI uses the call retval!
-; RUN: llvm-as < %s | opt -adce -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce -disable-output
void %test() {
unreachable
-; RUN: llvm-as < %s | opt -argpromotion -instcombine | not grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -argpromotion -instcombine | not grep load
%QuadTy = type {int, int, int, int}
-; RUN: llvm-as < %s | opt -argpromotion -mem2reg | llvm-dis | not grep alloca
+; RUN: llvm-upgrade < %s | llvm-as | opt -argpromotion -mem2reg | llvm-dis | not grep alloca
implementation
-; RUN: llvm-as < %s | opt -argpromotion -instcombine | llvm-dis | not grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -argpromotion -instcombine | llvm-dis | not grep load
%G1 = constant int 0
%G2 = constant int* %G1
-; RUN: llvm-as < %s | opt -argpromotion | llvm-dis | not grep 'load int\* null'
+; RUN: llvm-upgrade < %s | llvm-as | opt -argpromotion | llvm-dis | not grep 'load int\* null'
implementation
-; RUN: llvm-as < %s | opt -argpromotion | llvm-dis | grep 'load int\* %A'
+; RUN: llvm-upgrade < %s | llvm-as | opt -argpromotion | llvm-dis | grep 'load int\* %A'
implementation
-; RUN: llvm-as < %s | opt -argpromotion | llvm-dis | grep x.val
+; RUN: llvm-upgrade < %s | llvm-as | opt -argpromotion | llvm-dis | grep x.val
; XFAIL: *
implementation ; Functions:
-; RUN: llvm-as < %s | opt -block-placement -disable-output -print
+; RUN: llvm-upgrade < %s | llvm-as | opt -block-placement -disable-output -print
int %test() {
-; RUN: llvm-as < %s | opt -loop-extract -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-extract -disable-output
void %solve() {
entry:
-; RUN: llvm-as < %s | opt -loop-extract -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-extract -disable-output
; This testcase is failing the loop extractor because not all exit blocks
; are dominated by all of the live-outs.
-; RUN: llvm-as < %s | opt -loop-extract-single -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-extract-single -disable-output
void %ab() {
entry:
-; RUN: llvm-as < %s | opt -loop-extract -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-extract -disable-output
void %sendMTFValues() {
entry:
-; RUN: llvm-as < %s | opt -loop-extract -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-extract -disable-output
%struct.node_t = type { double*, %struct.node_t*, %struct.node_t**, double**, double*, int, int }
%struct.table_t = type { [1 x %struct.node_t**], [1 x %struct.node_t**] }
-; RUN: llvm-as < %s | opt -loop-extract -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-extract -disable-output
void %maketree() {
-; RUN: llvm-as < %s | opt -loop-extract -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-extract -disable-output
implementation ; Functions:
-; RUN: llvm-as < %s | opt -extract-blocks -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -extract-blocks -disable-output
implementation
-; RUN: llvm-as < %s | opt -extract-blocks -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -extract-blocks -disable-output
int %foo() {
br label %EB
EB:
-; RUN: llvm-as < %s | opt -condprop -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -condprop -disable-output
; PR877
target endian = big
-; RUN: llvm-as < %s | opt -condprop -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -condprop -disable-output
; PR979
target datalayout = "e-p:32:32"
target endian = little
-; RUN: llvm-as < %s | opt -condprop | llvm-dis | not grep 'br label'
+; RUN: llvm-upgrade < %s | llvm-as | opt -condprop | llvm-dis | not grep 'br label'
int %test(bool %C) {
br bool %C, label %T1, label %F1
-; RUN: llvm-as < %s | opt -condprop | llvm-dis | not grep phi
+; RUN: llvm-upgrade < %s | llvm-as | opt -condprop | llvm-dis | not grep phi
int %test(uint %C, bool %Val) {
switch uint %C, label %T1 [
-; RUN: llvm-as < %s | opt -condprop | llvm-dis | not grep phi
+; RUN: llvm-upgrade < %s | llvm-as | opt -condprop | llvm-dis | not grep phi
declare bool %foo()
; Make sure that the constant propogator doesn't divide by zero!
;
-; RUN: llvm-as < %s | opt -constprop
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop
;
int "test"() {
; Fix #2: The unary not instruction now no longer exists. Change to xor.
-; RUN: llvm-as < %s | opt -constprop | llvm-dis | not grep 'int 0'
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep 'int 0'
int "test1"() {
%R = xor int 123, -1
; SetCC on boolean values was not implemented!
-; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not grep 'set'
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | not grep 'set'
bool "test1"() {
%A = setle bool true, false
; Make sure that the constant propagator doesn't cause a sigfpe
;
-; RUN: llvm-as < %s | opt -constprop
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop
;
int "test"() {
-; RUN: llvm-as < %s | opt -constprop | llvm-dis | not grep 'ret bool false'
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep 'ret bool false'
%b = external global [2 x { }]
-; RUN: llvm-as < %s | opt -constprop | llvm-dis | grep 4294967295 &&
-; RUN: llvm-as < %s | opt -constprop | llvm-dis | not grep zeroinitializer
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 4294967295 &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep zeroinitializer
< 4 x uint> %test() {
%tmp40 = bitcast <2 x long> bitcast (<4 x int> < int 0, int 0, int -1, int 0 > to <2 x long>) to <4 x uint>
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'ret bool false'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'ret bool false'
bool %test() {
%X = trunc uint 320 to bool
ret bool %X
-; RUN: llvm-as < %s | opt -constprop | llvm-dis | grep 'ret int -1' &&
-; RUN: llvm-as < %s | opt -constprop | llvm-dis | grep 'ret uint 1'
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'ret int -1' &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'ret uint 1'
int %test1() {
%A = sext bool true to int
; This is a basic sanity check for constant propogation. The add instruction
; should be eliminated.
-; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not grep add
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | not grep add
int %test(bool %B) {
br bool %B, label %BB1, label %BB2
; bswap should be constant folded when it is passed a constant argument
-; RUN: llvm-as < %s | opt -constprop | llvm-dis | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep call
declare ushort %llvm.bswap.i16(ushort)
declare uint %llvm.bswap.i32(uint)
-; RUN: llvm-as < %s | opt -constprop | llvm-dis | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep call
declare double %cos(double)
declare double %sin(double)
-; RUN: llvm-as < %s | opt -constprop | llvm-dis | grep -F 'ret int* null' | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep -F 'ret int* null' | wc -l | grep 2
int* %test1() {
%X = cast float 0.0 to int*
ret int* %X
; Ensure constant propogation of logical instructions is working correctly.
-; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not egrep 'and|or|xor'
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | not egrep 'and|or|xor'
int "test1"() { %R = and int 4,1234 ret int %R }
; Ensure constant propogation of 'not' instructions is working correctly.
-; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not grep xor
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | not grep xor
int "test1"() {
%R = xor int 4, -1
; This is a basic sanity check for constant propogation. The add instruction
; should be eliminated.
-; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not grep phi
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | not grep phi
int %test(bool %B) {
BB0:
; Ensure constant propagation of remainder instructions is working correctly.
-; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not grep rem
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | not grep rem
int %test1() {
%R = rem int 4, 3
-; RUN: llvm-as < %s | opt -constmerge > /dev/null
+; RUN: llvm-upgrade < %s | llvm-as | opt -constmerge > /dev/null
%foo = internal constant {int} {int 7}
%bar = internal constant {int} {int 7}
-; RUN: llvm-as < %s | opt -constmerge | llvm-dis | %prcontext foo 2 | grep bar
+; RUN: llvm-upgrade < %s | llvm-as | opt -constmerge | llvm-dis | %prcontext foo 2 | grep bar
%foo = constant int 6
%bar = constant int 6
-; RUN: llvm-as < %s | opt -constmerge | llvm-dis | grep foo
-; RUN: llvm-as < %s | opt -constmerge | llvm-dis | grep bar
+; RUN: llvm-upgrade < %s | llvm-as | opt -constmerge | llvm-dis | grep foo
+; RUN: llvm-upgrade < %s | llvm-as | opt -constmerge | llvm-dis | grep bar
; Don't merge constants in different sections.
-; RUN: llvm-as < %s | opt -cee
+; RUN: llvm-upgrade < %s | llvm-as | opt -cee
implementation
; }
; }
;
-; RUN: llvm-as < %s | opt -cee -simplifycfg | llvm-dis | not grep bb3
+; RUN: llvm-upgrade < %s | llvm-as | opt -cee -simplifycfg | llvm-dis | not grep bb3
implementation
declare void %bar()
; Testcase distilled from bisort where we tried to perform branch target
; forwarding where it was not safe.
-; RUN: llvm-as < %s | opt -cee
+; RUN: llvm-upgrade < %s | llvm-as | opt -cee
;
%HANDLE = type { int, %HANDLE*, %HANDLE* }
%struct.node = type { int, %HANDLE*, %HANDLE* }
-; RUN: llvm-as < %s | opt -cee
+; RUN: llvm-upgrade < %s | llvm-as | opt -cee
;
; The 'cee' pass is breaking SSA form when it blindly forwards the branch from
; Eq to branch to "Forwarded" instead.
-; RUN: llvm-as < %s | opt -cee
+; RUN: llvm-upgrade < %s | llvm-as | opt -cee
;
; This testcase causes an assertion error.
;
; Test to make sure that SSA is correctly updated
-; RUN: llvm-as < %s | opt -cee
+; RUN: llvm-upgrade < %s | llvm-as | opt -cee
;
implementation ; Functions:
; Simple test to make sure dominators are updated properly
-; RUN: llvm-as < %s | opt -cee
+; RUN: llvm-upgrade < %s | llvm-as | opt -cee
implementation ; Functions:
-; RUN: llvm-as < %s | opt -cee -constprop -instcombine -dce | llvm-dis | not grep 'REMOVE'
+; RUN: llvm-upgrade < %s | llvm-as | opt -cee -constprop -instcombine -dce | llvm-dis | not grep 'REMOVE'
int %test1(int %A) {
%cond = seteq int %A, 40
; Note that this is a "feature" test, not a correctness test.
;
; XFAIL: *
-; RUN: llvm-as < %s | opt -cee -simplifycfg | llvm-dis | not grep cond213
+; RUN: llvm-upgrade < %s | llvm-as | opt -cee -simplifycfg | llvm-dis | not grep cond213
;
implementation ; Functions:
; Any succeeding uses of the pointer should get this info
;
; XFAIL: *
-; RUN: llvm-as < %s | opt -cee -instcombine -simplifycfg | llvm-dis | not grep br
+; RUN: llvm-upgrade < %s | llvm-as | opt -cee -instcombine -simplifycfg | llvm-dis | not grep br
implementation ; Functions:
-; RUN: llvm-as < %s | opt -cee -constprop -instcombine -dce | llvm-dis | not grep 'REMOVE'
+; RUN: llvm-upgrade < %s | llvm-as | opt -cee -constprop -instcombine -dce | llvm-dis | not grep 'REMOVE'
int %test_case_values_should_propagate(int %A) {
switch int %A, label %D [
;
; This should eliminate all BB's except BB0, BB9, BB10
;
-; RUN: llvm-as < %s | opt -cee -instcombine -simplifycfg | llvm-dis | not grep 'bb[2-8]'
+; RUN: llvm-upgrade < %s | llvm-as | opt -cee -instcombine -simplifycfg | llvm-dis | not grep 'bb[2-8]'
implementation ; Functions:
; folded completely away if possible. This is a very common case, so it should
; be efficient.
;
-; RUN: llvm-as < %s | opt -analyze -tddatastructure
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
;
implementation
;
-; RUN: llvm-as < %s | opt -analyze -tddatastructure
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
%crazy = type [2 x { [2 x sbyte], short } ]
implementation
; This file contains a list of situations where node folding should happen...
;
-; RUN: llvm-as < %s | opt -analyze -tddatastructure
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
implementation
; very simple test
;
-; RUN: llvm-as < %s | opt -analyze -tddatastructure
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
implementation
;
-; RUN: llvm-as < %s | opt -analyze -tddatastructure
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
%str = type { int*, int* }
; This file contains a list of cases where node folding should NOT happen
;
-; RUN: llvm-as < %s | opt -analyze -tddatastructure
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
;
implementation
;
-; RUN: llvm-as < %s | opt -analyze -tddatastructure
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
%G = global int 2 ; <int*> [#uses=1]
%H = global int* null
;
-; RUN: llvm-as < %s | opt -analyze -tddatastructure
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
int* %test1(int *%A) {
%R = getelementptr int* %A, long 1
; A test for "physical subtyping" used in some C programs...
;
-; RUN: llvm-as < %s | opt -analyze -tddatastructure
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
;
%ST = type { int, int* } ; "Subtype"
%DT = type { int, int*, int } ; "derived type"
-; RUN: llvm-as < %s | opt -analyze -tddatastructure
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
implementation ; Functions:
-; RUN: llvm-as < %s | opt -analyze -tddatastructure
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
void %foo(int* %X) {
store int 4, int* %X
-; RUN: llvm-as < %s | opt -analyze -tddatastructure
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
implementation
-; RUN: llvm-as < %s | opt -analyze -tddatastructure
+; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
%str = type { int, int* }
-; RUN: llvm-as < %s | opt -deadargelim -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -deadargelim -disable-output
implementation
-; RUN: llvm-as < %s | opt -deadargelim | llvm-dis | not grep DEADARG
+; RUN: llvm-upgrade < %s | llvm-as | opt -deadargelim | llvm-dis | not grep DEADARG
implementation
-; RUN: llvm-as < %s | opt -deadargelim -disable-output &&
-; RUN: llvm-as < %s | opt -deadargelim | llvm-dis | not grep 47 &&
-; RUN: llvm-as < %s | opt -deadargelim | llvm-dis | not grep 1.0
+; RUN: llvm-upgrade < %s | llvm-as | opt -deadargelim -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -deadargelim | llvm-dis | not grep 47 &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -deadargelim | llvm-dis | not grep 1.0
int %bar(int %A) {
%tmp4 = tail call int (int, ...)* %foo( int %A, int %A, int %A, int %A, ulong 47, double 1.000000e+00 )
-; RUN: llvm-as < %s | opt -deadargelim | llvm-dis | not grep DEAD
+; RUN: llvm-upgrade < %s | llvm-as | opt -deadargelim | llvm-dis | not grep DEAD
implementation
-; RUN: llvm-as < %s | opt -deadargelim -die | llvm-dis | not grep DEAD
+; RUN: llvm-upgrade < %s | llvm-as | opt -deadargelim -die | llvm-dis | not grep DEAD
%P = external global int
-; RUN: llvm-as < %s | opt -dse -scalarrepl -instcombine | llvm-dis | not grep 'ret int undef'
+; RUN: llvm-upgrade < %s | llvm-as | opt -dse -scalarrepl -instcombine | llvm-dis | not grep 'ret int undef'
int %test(double %__x) {
%__u = alloca { [3 x int] }
-; RUN: llvm-as < %s | opt -dse | llvm-dis | grep 'store int 1234567'
+; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | grep 'store int 1234567'
; Do not delete stores that are only partially killed.
-; RUN: llvm-as < %s | opt -dse | llvm-dis | grep store
+; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | grep store
double %foo(sbyte* %X) {
%X_addr = alloca sbyte*
-; RUN: llvm-as < %s | opt -globalsmodref-aa -dse -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -dse -disable-output
target endian = big
target pointersize = 32
target triple = "powerpc-apple-darwin8"
-; RUN: llvm-as < %s | opt -dse | llvm-dis | not grep 'store sbyte'
+; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | not grep 'store sbyte'
; Ensure that the dead store is deleted in this case. It is wholely
; overwritten by the second store.
int %test() {
-; RUN: llvm-as < %s | opt -dse | llvm-dis | not grep DEAD
+; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | not grep DEAD
void %test(int* %Q) {
%P = alloca int
-; RUN: llvm-as < %s | opt -dse | llvm-dis | not grep DEAD
+; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | not grep DEAD
declare void %ext()
-; RUN: llvm-as < %s | opt -dse | llvm-dis | not grep DEAD
+; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | not grep DEAD
void %test(int* %Q, int* %P) {
%DEAD = load int* %Q
-; RUN: llvm-as < %s | opt -dse | llvm-dis | not grep DEAD
+; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | not grep DEAD
void %test(int* %Q, int* %P) {
%DEAD = load int* %Q
; Test that: extern int X[] and int X[] = { 1, 2, 3, 4 } are resolved
; correctly.
;
-; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | not grep external
+; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve | llvm-dis | not grep external
%X = external global [0 x int]
%X = global [4 x int] [ int 1, int 2, int 3, int 4 ]
; Test that: extern int X[] and int X[] = { 1, 2, 3, 4 } are resolved
; correctly. This doesn't have constantexprs
;
-; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | not grep external
+; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve | llvm-dis | not grep external
;
%X = external global [0 x int]
-; RUN: llvm-as < %s | opt -funcresolve -funcresolve | llvm-dis | not grep declare
+; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve -funcresolve | llvm-dis | not grep declare
declare void %qsortg(sbyte*, int, int)
; XFAIL: *
;
-; RUN: llvm-as < %s | opt -funcresolve -instcombine | llvm-dis | not grep '\.\.\.'
+; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve -instcombine | llvm-dis | not grep '\.\.\.'
declare int %foo(...)
declare int %foo(int)
-; RUN: llvm-as < %s | opt -funcresolve -disable-output 2>&1 | not grep WARNING
+; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve -disable-output 2>&1 | not grep WARNING
%__popcount_tab = external constant [0 x ubyte]
%__popcount_tab = constant [4 x ubyte] c"\00\01\01\02"
-; RUN: llvm-as < %s | opt -funcresolve -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve -disable-output
void %foo(int, int) {
ret void
-; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | not grep declare
+; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve | llvm-dis | not grep declare
%Table = constant int(...)* %foo
-; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | grep declare
+; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve | llvm-dis | grep declare
declare void %test(...)
-; RUN: llvm-as < %s | opt -funcresolve | dis | not grep declare
+; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve | dis | not grep declare
declare void %test(int)
-; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | not grep foo
+; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve | llvm-dis | not grep foo
; The funcresolve pass was resolving the two foo's together in this test,
; adding a ConstantPointerRef to one of them. Then because of this
-; RUN: llvm-as < %s | opt -funcresolve -disable-output 2>&1 | not grep WARNING
+; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve -disable-output 2>&1 | not grep WARNING
declare int %foo(int *%X)
declare int %foo(float *%X)
; This tests a hack put into place specifically for the C++ libstdc++ library.
; It uses an ugly hack which is cleaned up by the funcresolve pass.
-; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | grep %X | grep '{'
+; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve | llvm-dis | grep %X | grep '{'
%X = external global { int }
%X = global [ 4 x sbyte ] zeroinitializer
-; RUN: llvm-as < %s | opt -funcresolve -disable-output 2>&1 | not grep WARNING
+; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve -disable-output 2>&1 | not grep WARNING
void %test() {
-; RUN: llvm-as < %s | opt -funcresolve -instcombine | llvm-dis | grep '\.\.\.' | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve -instcombine | llvm-dis | grep '\.\.\.' | not grep call
declare int %foo(...)
; This shows where the function is called with the prototype indicating a
; return type exists, but it really doesn't.
-; RUN: llvm-as < %s | opt -funcresolve -instcombine | llvm-dis | grep '\.\.\.' | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve -instcombine | llvm-dis | grep '\.\.\.' | not grep call
declare int %foo(...)
; This shows where the function is called with the prototype indicating a
; return type doesn't exists, but it really does.
;
-; RUN: llvm-as < %s | opt -funcresolve -instcombine | llvm-dis | grep '\.\.\.' | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve -instcombine | llvm-dis | grep '\.\.\.' | not grep call
declare void %foo(...)
-; RUN: llvm-as < %s | opt -funcresolve
+; RUN: llvm-upgrade < %s | llvm-as | opt -funcresolve
declare int %read(...)
; This testcase shows a bug where an common subexpression exists, but there
; is no shared dominator block that the expression can be hoisted out to.
;
-; RUN: llvm-as < %s | opt -gcse | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | opt -gcse | llvm-dis
int "test"(int %X, int %Y) {
%Z = add int %X, %Y
; This testcase shows a bug where an common subexpression exists, but there
; is no shared dominator block that the expression can be hoisted out to.
;
-; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | not grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse | llvm-dis | not grep load
int %test(int* %P) {
store int 5, int* %P
; Various test cases to ensure basic functionality is working for GCSE
-; RUN: llvm-as < %s | opt -gcse
+; RUN: llvm-upgrade < %s | llvm-as | opt -gcse
implementation
-; RUN: llvm-as < %s | opt -gcse -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -gcse -instcombine | llvm-dis | not grep sub
+; RUN: llvm-upgrade < %s | llvm-as | opt -gcse -instcombine -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -gcse -instcombine | llvm-dis | not grep sub
uint %test_extractelement(<4 x uint> %V) {
%R = extractelement <4 x uint> %V, uint 1
-; RUN: llvm-as < %s | opt -globaldce
+; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce
;
implementation
-; RUN: llvm-as < %s | opt -globaldce
+; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce
;
%X = global void() * %func
implementation
; Make sure that functions are removed successfully if they are referred to by
; a global that is dead. Make sure any globals they refer to die as well.
-; RUN: llvm-as < %s | opt -globaldce | llvm-dis | not grep foo
+; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce | llvm-dis | not grep foo
%b = internal global int ()* %foo ;; Unused, kills %foo
; This testcase tests that a worklist is being used, and that globals can be
; removed if they are the subject of a constexpr and ConstantPointerRef
-; RUN: llvm-as < %s | opt -globaldce | llvm-dis | not grep global
+; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce | llvm-dis | not grep global
%t0 = internal global [4 x sbyte] c"foo\00"
%t1 = internal global [4 x sbyte] c"bar\00"
-; RUN: llvm-as < %s | opt -globaldce
+; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce
%foo = internal global int 7 ;; Should die when function %foo is killed
; distilled from 255.vortex
-; RUN: llvm-as < %s | opt -globaldce | llvm-dis | not grep testfunc
+; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce | llvm-dis | not grep testfunc
implementation
; Weak variables should be preserved by global DCE!
-; RUN: llvm-as < %s | opt -globaldce | llvm-dis | grep %A
+; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce | llvm-dis | grep %A
%A = weak global int 54
-; RUN: llvm-as < %s | opt -globaldce | llvm-dis | not grep global
+; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce | llvm-dis | not grep global
%X = uninitialized global int
%Y = internal global int 7
-; RUN: llvm-as < %s | opt -globalopt
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt
%V = global float 12.0
%G = internal global int* null
-; RUN: llvm-as < %s | opt -globalopt -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt -disable-output
; PR579
%g_40507551 = internal global short 31038 ; <short*> [#uses=1]
-; RUN: llvm-as < %s | opt -globalopt -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt -disable-output
%RPyString = type { int, %arraytype.Char }
%arraytype.Char = type { int, [0 x sbyte] }
%arraytype.Signed = type { int, [0 x int] }
-; RUN: llvm-as < %s | opt -globalopt -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt -disable-output
%struct._list = type { int*, %struct._list* }
%struct._play = type { int, int*, %struct._list*, %struct._play* }
%nrow = internal global int 0 ; <int*> [#uses=2]
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep global
%X = internal global int 4
-; RUN: llvm-as < %s | opt -globalopt -disable-output &&
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep CTOR
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep CTOR
%llvm.global_ctors = appending global [10 x { int, void ()* }] [
{ int, void ()* } { int 65535, void ()* %CTOR1 },
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep internal
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep internal
; This is a harder case to delete as the GEP has a variable index.
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep internal
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep internal
%G = internal global int 123
; In this case, the global can only be broken up by one level.
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep 12345
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep 12345
%G = internal global { int, [4 x float] } zeroinitializer
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep global
%G = internal global { int, float, {double} } { int 1, float 1.0, {double} {double 17.27} }
-; RUN: llvm-as < %s | opt -globalopt -instcombine | llvm-dis | grep 'ret bool true'
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt -instcombine | llvm-dis | grep 'ret bool true'
;; check that global opt turns integers that only hold 0 or 1 into bools.
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep %G
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep %G
%G = internal global int 0
%H = internal global { int* } { int* %G }
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep G
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep G
%G = internal global int 17
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep global
%G = internal global int* null
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep malloc
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep malloc
%G = internal global int* null
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep malloc
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep malloc
%G = internal global int* null
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | grep 'G1 = internal constant'
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | grep 'G1 = internal constant'
%G1 = internal global [58 x sbyte] c"asdlfkajsdlfkajsd;lfkajds;lfkjasd;flkajsd;lkfja;sdlkfjasd\00"
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep internal
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep internal
; both globals are write only, delete them.
%G0 = internal global [58 x sbyte] c"asdlfkajsdlfkajsd;lfkajds;lfkjasd;flkajsd;lkfja;sdlkfjasd\00"
; Test that PHI nodes and select instructions do not necessarily make stuff
; non-constant.
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep global
%X = internal global int 4
%Y = internal global int 5
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | grep 'call void %Actual'
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | grep 'call void %Actual'
; Check that a comparison does not prevent an indirect call from being made
; direct. The global will still remain, but indirect call elim is still good.
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep global
%G = internal global void ()* null
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep G
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep G
%G = internal global int 17
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep store
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep store
%llvm.global_ctors = appending global [1 x { int, void ()* }] [ { int, void ()* } { int 65535, void ()* %_GLOBAL__I__Z3foov } ] ; <[1 x { int, void ()* }]*> [#uses=0]
%X.0 = internal global int undef ; <int*> [#uses=2]
-; RUN: llvm-as < %s | opt -ipconstprop -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -ipconstprop -disable-output
implementation
internal void %foo(int %X) {
-; RUN: llvm-as < %s | opt -ipconstprop -deadargelim | llvm-dis | not grep %X
+; RUN: llvm-upgrade < %s | llvm-as | opt -ipconstprop -deadargelim | llvm-dis | not grep %X
implementation
-; RUN: llvm-as < %s | opt -ipconstprop -instcombine | llvm-dis | grep 'ret bool true'
+; RUN: llvm-upgrade < %s | llvm-as | opt -ipconstprop -instcombine | llvm-dis | grep 'ret bool true'
implementation
internal int %foo(bool %C) {
; Induction variable pass is doing bad things with pointer induction vars,
; trying to do arithmetic on them directly.
;
-; RUN: llvm-as < %s | opt -indvars
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars
;
void %test(int %A, uint %S, sbyte* %S) {
; This is a test case for the expression analysis code, not really indvars.
; It was assuming any constant of int type was a ConstantInteger.
;
-; RUN: llvm-as < %s | opt -indvars
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars
%X = global int 7
-; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep indvar
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | grep indvar
int %test() {
br bool true, label %LoopHead, label %LoopHead
-; RUN: llvm-as < %s | opt -indvars | llvm-dis | %prcontext Loop: 1 | grep %indvar
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | %prcontext Loop: 1 | grep %indvar
; The indvar simplification code should ensure that the first PHI in the block
; is the canonical one!
; The induction variable canonicalization pass shouldn't leave dead
; instructions laying around!
;
-; RUN: llvm-as < %s | opt -indvars | llvm-dis | not grep '#uses=0'
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | not grep '#uses=0'
int %mul(int %x, int %y) {
entry:
-; RUN: llvm-as < %s | opt -indvars -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -disable-output
void %test() {
entry:
-; RUN: llvm-as < %s | opt -indvars -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -disable-output
void %_ZN17CoinFactorization7cleanupEv() {
entry:
br bool false, label %loopexit.14, label %cond_continue.3
-; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep indvar | not grep uint
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | grep indvar | not grep uint
%G = global long 0
-; RUN: llvm-as < %s | opt -indvars -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -disable-output
implementation ; Functions:
-; RUN: llvm-as < %s | opt -indvars -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -disable-output
%struct.__false_type = type { ubyte }
"struct.__gnu_cxx::_Hashtable_node<const llvm::Constant*>" = type { "struct.__gnu_cxx::_Hashtable_node<const llvm::Constant*>"*, "struct.llvm::Constant"* }
-; RUN: llvm-as < %s | opt -indvars -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -disable-output
void %.outPlank_21() {
entry:
-; RUN: llvm-as < %s | opt -indvars -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -disable-output
void %_ZN5ArrayISt7complexIdEEC2ERK10dim_vector() {
entry:
-; RUN: llvm-as < %s | opt -indvars -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -disable-output
implementation ; Functions:
-; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep 'ret int 152'
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | grep 'ret int 152'
int %main() {
entry:
-; RUN: llvm-as < %s | opt -indvars -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -disable-output
void %main() {
entry:
-; RUN: llvm-as < %s | opt -indvars -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -disable-output
%fixtab = external global [29 x [29 x [2 x uint]]] ; <[29 x [29 x [2 x uint]]]*> [#uses=1]
-; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep 'ret int 27'
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | grep 'ret int 27'
; Make sure to compute the right exit value based on negative strides.
; PR726
-; RUN: llvm-as < %s | opt -indvars -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -disable-output
void %get_block() {
endif.0: ; preds = %entry
-; RUN: llvm-as < %s | opt -indvars -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -disable-output
%struct.p7prior_s = type { int, int, [200 x float], [200 x [7 x float]], int, [200 x float], [200 x [20 x float]], int, [200 x float], [200 x [20 x float]] }
; The i induction variable looks like a wrap-around, but it really is just
; a simple affine IV. Make sure that indvars eliminates it.
-; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep phi | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | grep phi | wc -l | grep 1
void %foo() {
entry:
; these loops all have predictable exit values we can replace the use outside
; of the loop with a closed-form computation, making the loop dead.
;
-; RUN: llvm-as < %s | opt -indvars -adce -simplifycfg | llvm-dis | not grep br
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -adce -simplifycfg | llvm-dis | not grep br
int %polynomial_constant() {
br label %Loop
; LFTR should eliminate the need for the computation of i*i completely. It
; is only used to compute the exit value.
-; RUN: llvm-as < %s | opt -indvars -dce | llvm-dis | not grep mul
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -dce | llvm-dis | not grep mul
%A = external global int
-; RUN: llvm-as < %s | opt -indvars -adce -simplifycfg | llvm-dis | not grep br
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -adce -simplifycfg | llvm-dis | not grep br
;
; Testcase distilled from 256.bzip2
-; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep indvar
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | grep indvar
%G = global int* null
-; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep indvar
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | grep indvar
%G = global long 0
; the exit value of the loop will be for some value, allowing us to substitute
; it directly into users outside of the loop, making the loop dead.
;
-; RUN: llvm-as < %s | opt -indvars -adce -simplifycfg | llvm-dis | not grep br
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -adce -simplifycfg | llvm-dis | not grep br
int %linear_setne() { ;; for (i = 0; i != 100; ++i)
entry:
; These tests have an infinite trip count. We obviously shouldn't remove the
; loops! :)
;
-; RUN: llvm-as < %s | opt -indvars -adce -simplifycfg | llvm-dis | grep set | wc -l > %t2
-; RUN: llvm-as < %s | llvm-dis | grep set | wc -l > %t1
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -adce -simplifycfg | llvm-dis | grep set | wc -l > %t2
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep set | wc -l > %t1
; RUN: diff %t1 %t2
int %infinite_linear() { ;; test for (i = 1; i != 100; i += 2)
-; RUN: llvm-as < %s | opt -indvars -instcombine | llvm-dis | grep 'store int 0'
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -instcombine | llvm-dis | grep 'store int 0'
; Test that -indvars can reduce variable stride IVs. If it can reduce variable
; stride iv's, it will make %iv. and %m.0.0 isomorphic to each other without
; cycles, allowing the tmp.21 subtraction to be eliminated.
-; RUN: llvm-as < %s | opt -inline -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -disable-output
declare int %External()
-; RUN: llvm-as < %s | opt -inline -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -disable-output
implementation
int %main() {
-; RUN: llvm-as < %s | opt -inline -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -disable-output
implementation
-; RUN: llvm-as < %s | opt -inline -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -disable-output
implementation
int %main() {
-; RUN: llvm-as < %s | opt -inline -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -disable-output
implementation ; Functions:
; node in the exception destination, and the inlined function contains an
; unwind instruction.
-; RUN: llvm-as < %s | opt -inline -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -disable-output
implementation
-; RUN: llvm-as < %s | opt -inline -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -disable-output
; Inlining the first call caused the inliner function to delete the second
; call. Then the inliner tries to inline the second call, which no longer
-; RUN: llvm-as < %s | opt -inline -prune-eh -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -prune-eh -disable-output
implementation
-; RUN: llvm-as < %s | opt -inline -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -disable-output
int %test() {
unwind
-; RUN: llvm-as < %s | opt -inline -prune-eh -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -prune-eh -disable-output
"struct.std::__codecvt_abstract_base<char,char,__mbstate_t>" = type { "struct.std::locale::facet" }
"struct.std::basic_streambuf<wchar_t,std::char_traits<wchar_t> >" = type { int (...)**, int*, int*, int*, int*, int*, int*, "struct.std::locale" }
-; RUN: llvm-as < %s | opt -inline -prune-eh -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -prune-eh -disable-output
; PR827
%_ZTV8CRjii = internal global [1 x int (...)*] [ int (...)* %_ZN8CRjii12NlFeeEPN5Jr7sE ] ; <[1 x int (...)*]*> [#uses=0]
-; RUN: llvm-as < %s | opt -inline -prune-eh -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -prune-eh -disable-output
; PR993
target endian = little
target pointersize = 32
-; RUN: llvm-as < %s | opt -inline -prune-eh -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -prune-eh -disable-output
; PR992
target datalayout = "e-p:32:32"
target endian = little
; This test ensures that alloca instructions in the entry block for an inlined
; function are moved to the top of the function they are inlined into.
;
-; RUN: llvm-as < %s | opt -inline | llvm-dis | %prcontext alloca 1 | grep Entry:
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | %prcontext alloca 1 | grep Entry:
int %func(int %i) {
%X = alloca int
-; RUN: llvm-as < %s | opt -inline -disable-output -print
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -disable-output -print
int %func(int %i) {
ret int %i
-; RUN: llvm-as < %s | opt -inline | llvm-dis | grep 'ret int 1'
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | grep 'ret int 1'
; ModuleID = 'short.opt.bc'
implementation ; Functions:
; This test ensures that inlining an "empty" function does not destroy the CFG
;
-; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep br
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | not grep br
int %func(int %i) {
ret int %i
; Test that functions with dynamic allocas get inlined in a case where
; naively inlining it would result in a miscompilation.
-; RUN: llvm-as < %s | opt -inline &&
-; RUN: llvm-as < %s | opt -inline | llvm-dis | grep llvm.stacksave &&
-; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep callee
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | grep llvm.stacksave &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | not grep callee
declare void %ext(int*)
implementation
-; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep tail
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | not grep tail
implementation
; Test that the inliner doesn't leave around dead allocas, and that it folds
; uncond branches away after it is done specializing.
-; RUN: llvm-as < %s | opt -inline -disable-output &&
-; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep 'alloca.*uses=0' &&
-; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep 'br label'
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | not grep 'alloca.*uses=0' &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | not grep 'br label'
%A = weak global int 0 ; <int*> [#uses=1]
%B = weak global int 0 ; <int*> [#uses=1]
-; RUN: llvm-as < %s | opt -inline -disable-output &&
-; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep callee &&
-; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep div
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | not grep callee &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | not grep div
implementation
; This checks to ensure that the inline pass deletes functions if they get
; inlined into all of their callers.
-; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep %reallysmall
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | not grep %reallysmall
implementation
-; RUN: llvm-as < %s | opt -inline -disable-output &&
-; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep 'callee[12](' &&
-; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep mul
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | not grep 'callee[12](' &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | not grep mul
implementation
; Test that we can inline a simple function, turning the calls in it into invoke
; instructions
-; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep 'call[^e]'
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | not grep 'call[^e]'
declare void %might_throw()
; Test that if an invoked function is inlined, and if that function cannot
; throw, that the dead handler is now unreachable.
-; RUN: llvm-as < %s | opt -inline -simplifycfg | llvm-dis | not grep UnreachableExceptionHandler
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline -simplifycfg | llvm-dis | not grep UnreachableExceptionHandler
declare void %might_throw()
; Test that any rethrown exceptions in an inlined function are automatically
; turned into branches to the invoke destination.
-; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep unwind$
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | not grep unwind$
declare void %might_throw()
; This testcase causes instcombine to hang.
;
-; RUN: llvm-as < %s | opt -instcombine
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine
implementation
; Instcombine was missing a test that caused it to make illegal transformations
; sometimes. In this case, it transforms the sub into an add:
; RUN: echo foo
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep add
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep add
;
; stayed on the worklist, as soon as it came back up to be processed, bad things
; happened, and opt asserted.
;
-; RUN: llvm-as < %s | opt -instcombine
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine
;
%.LC0 = internal global [21 x sbyte] c"hbMakeCodeLengths(1)\00" ; <[21 x sbyte]*> [#uses=1]
; This testcase is incorrectly getting completely eliminated. There should be
; SOME instruction named %c here, even if it's a bitwise and.
;
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep '%c'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep '%c'
;
ulong %test3(ulong %A) {
%c1 = cast ulong %A to ubyte
-; RUN: llvm-as < %s | opt -instcombine
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine
%bob = type { int }
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep add
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep add
int %test(int %A) {
%A.neg = sub int 0, %A
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 4294967295
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 4294967295
ulong %test(ulong %Val) {
%tmp.3 = cast ulong %Val to uint ; <uint> [#uses=1]
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
%X = global int 5
long %test() {
; because it things that the constant value is a not expression... and
; constantly inverts the branch back and forth.
;
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
ubyte %test19(bool %c) {
br bool true, label %True, label %False
; This is a bug in the VMcode library, not instcombine, it's just convenient
; to expose it here.
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
%A = global int 1
%B = global int 2
; should pass through the optimizer without failure.
;
; Extra code:
-; RUN: llvm-as < %s | opt -instcombine
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine
;
target endian = little
; This testcase can be simplified by "realizing" that alloca can never return
; null.
-; RUN: llvm-as < %s | opt -instcombine -simplifycfg | llvm-dis | not grep 'br '
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -simplifycfg | llvm-dis | not grep 'br '
implementation ; Functions:
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep load
void %test(int* %P) {
%X = volatile load int* %P ; Dead but not deletable!
ret void
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep false
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep false
;
; This actually looks like a constant propagation bug
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
declare int* %bar()
; The cast in this testcase is not eliminable on a 32-bit target!
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep inttoptr
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep inttoptr
target endian = little
target pointersize = 32
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep call | notcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep call | notcast
declare void %free(sbyte*)
; invoke instruction, we really cannot perform this transformation at all at
; least without splitting the critical edge.
;
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
declare sbyte* %test()
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 34
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep 34
int %test(int %X) {
; Do not fold into shr X, 34, as this uses undefined behavior!
; This testcase caused the combiner to go into an infinite loop, moving the
; cast back and forth, changing the seteq to operate on int vs uint and back.
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
bool %test(uint %A, int %B) {
%C = sub uint 0, %A
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
int %test() {
ret int 0
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
%Ty = type opaque
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
%p = weak global int 0
-; RUN: llvm-as < %s | opt -instcombine
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine
; This testcase should not send the instcombiner into an infinite loop!
-; RUN: llvm-as < %s | opt -instcombine -mem2reg | llvm-dis | not grep 'int 1'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -mem2reg | llvm-dis | not grep 'int 1'
; When propagating the load through the select, make sure that the load is
; inserted where the original load was, not where the select is. Not doing
-; RUN: llvm-as < %s | opt -instcombine -mem2reg -simplifycfg | llvm-dis | \
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -mem2reg -simplifycfg | llvm-dis | \
; RUN: grep -v store | not grep 'int 1'
; Test to make sure that instcombine does not accidentally propagate the load
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep -- -65536
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep -- -65536
bool %test(int %tmp.124) {
%tmp.125 = shl int %tmp.124, ubyte 8
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep and
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep and
sbyte %test21(sbyte %A) {
%C = shr sbyte %A, ubyte 7 ;; sign extend
; be eliminated. In many cases the setCC is also eliminated based on the
; constant value and the range of the casted value.
;
-; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | notcast '.*int'
+; RUN: llvm-upgrade %s -o - | llvm-as | opt -instcombine | llvm-dis | notcast '.*int'
implementation ; Functions:
-; RUN: llvm-as %s -o - | opt -instcombine
+; RUN: llvm-upgrade %s -o - | llvm-as | opt -instcombine
%struct.llvm_java_object_base = type opaque
"java/lang/Object" = type { %struct.llvm_java_object_base }
-; RUN: llvm-as < %s | opt -instcombine
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine
int %test(int %X) {
%Y = rem int %X, undef
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'ret bool false'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep 'ret bool false'
bool %test(ulong %tmp.169) {
%tmp.1710 = shr ulong %tmp.169, ubyte 1
%tmp.1912 = setgt ulong %tmp.1710, 0
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
uint %test(bool %C, uint %tmp.15) {
%tmp.16 = select bool %C, uint 8, uint 1
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
int %_Z13func_31585107li(int %l_39521025, int %l_59244666) {
%shortcirc_val = select bool false, uint 1, uint 0 ; <uint> [#uses=1]
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
; PR577
bool %test() {
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
; PR585
bool %test() {
%tmp.26 = div int 0, -2147483648 ; <int> [#uses=1]
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'ret bool true'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'ret bool true'
; PR586
%g_07918478 = external global uint ; <uint*> [#uses=1]
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
; This example caused instcombine to spin into an infinite loop.
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
%struct.rtx_const = type { uint, { %union.real_extract } }
%struct.rtx_def = type { int, [1 x %union.rtunion_def] }
-; RUN: llvm-as < %s | opt -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep undef
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep undef
int %test(sbyte %A) {
%B = cast sbyte %A to int
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
int %test() {
%tmp203 = seteq uint 1, 2 ; <bool> [#uses=1]
%tmp203 = cast bool %tmp203 to int ; <int> [#uses=1]
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
float %test(<4 x float> %V) {
%V2 = insertelement <4 x float> %V, float 1.0, uint 3
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
%struct.DecRefPicMarking_s = type { int, int, int, int, int, %struct.DecRefPicMarking_s* }
%struct.datapartition = type { %typedef.Bitstream*, %typedef.DecodingEnvironment, int (%struct.syntaxelement*, %struct.img_par*, %struct.inp_par*, %struct.datapartition*)* }
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep shl &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | notcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep shl &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | notcast
; This cannot be turned into a sign extending cast!
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
void %test() {
bb38.i:
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
%struct.gs_matrix = type { float, int, float, int, float, int, float, int, float, int, float, int }
%struct.gx_bitmap = type { ubyte*, int, int, int }
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep undef
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep undef
; XFAIL: *
%str = constant [4 x ubyte] c"str\00"
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
target endian = big
target pointersize = 32
target triple = "powerpc-apple-darwin8"
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
; PR905
%RPYTHON_EXCEPTION = type { %RPYTHON_EXCEPTION_VTABLE* }
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep and
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep and
; PR913
int %test(int* %tmp1) {
; The optimizer should be able to remove cast operation here.
-; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | not grep 'sext.*int'
+; RUN: llvm-upgrade %s -o - | llvm-as | opt -instcombine | llvm-dis | not grep 'sext.*int'
bool %eq_signed_to_small_unsigned(sbyte %SB) {
%Y = cast sbyte %SB to uint ; <uint> [#uses=1]
; This test case is reduced from llvmAsmParser.cpp
; The optimizer should not remove the cast here.
-; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | grep 'sext.*int'
+; RUN: llvm-upgrade %s -o - | llvm-as | opt -instcombine | llvm-dis | grep 'sext.*int'
bool %test(short %X) {
%A = cast short %X to uint
-; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | grep 'and'
+; RUN: llvm-upgrade %s -o - | llvm-as | opt -instcombine | llvm-dis | grep 'and'
ulong %foo(ulong %tmp, ulong %tmp2) {
%tmp = cast ulong %tmp to uint
%tmp2 = cast ulong %tmp2 to uint
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep mul | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep mul | wc -l | grep 2
<4 x float> %test(<4 x float> %V) {
-;RUN: llvm-as < %s | opt -instcombine | llvm-dis |not grep memmove.i32
+;RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis |not grep memmove.i32
; Instcombine was trying to turn this into a memmove.i32
target datalayout = "e-p:64:64"
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep lshr
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep lshr
; Verify this is not turned into -1.
int %test(ubyte %amt) {
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'and.*32' &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'or.*153'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'and.*32' &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep 'or.*153'
; PR1014
int %test(int %tmp1) {
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep select | not grep 'int\*'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep select | not grep 'int\*'
; This testcase corresponds to PR362, which notices that this horrible code
; is generated by the C++ front-end and LLVM optimizers, which has lots of
-; RUN: llvm-as < %s | opt -instcombine -gcse -instcombine | llvm-dis | not grep getelementptr
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -gcse -instcombine | llvm-dis | not grep getelementptr
bool %test(int* %A) {
%B = getelementptr int* %A, int 1
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | notcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | notcast
target pointersize = 32
int *%test(int *%P) {
; This is the sequence of stuff that the Java front-end expands for a single
; <= comparison. Check to make sure we turn it into a <= (only)
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep -v setle | not grep '#uses'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep -v setle | not grep '#uses'
bool %le(int %A, int %B) {
%c1 = setgt int %A, %B;
; This test makes sure that add instructions are properly eliminated.
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep -v OK | not grep add
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep -v OK | not grep add
implementation
; Zero byte allocas should be deleted.
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep alloca
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep alloca
declare void %use(...)
void %test() {
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep and | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep and | wc -l | grep 1
; Should be optimized to one and.
bool %test1(uint %a, uint %b) {
;
; Which corresponds to test1.
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'or '
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep 'or '
int %test1(int %X, int %Y) {
%A = and int %X, 7
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep and
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep and
implementation
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | notcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | notcast
uint %testAdd(int %X, int %Y) {
%tmp = add int %X, %Y
; This file contains various testcases that require tracking whether bits are
; set or cleared by various instructions.
-; RUN: llvm-as < %s | opt -instcombine -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine -instcombine | llvm-dis | not grep %ELIM
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -instcombine -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -instcombine | llvm-dis | not grep %ELIM
; Reduce down to a single XOR
int %test3(int %B) {
-; RUN: llvm-as < %s | opt -instcombine -simplifycfg -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine -simplifycfg | llvm-dis | not grep 'call void %abort'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -simplifycfg -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -simplifycfg | llvm-dis | not grep 'call void %abort'
%b_rec.0 = external global int
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep ret | wc -l | grep 3 &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'call.*bswap'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep ret | wc -l | grep 3 &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep 'call.*bswap'
bool %test1(ushort %tmp2) {
%tmp10 = call ushort %llvm.bswap.i16( ushort %tmp2 )
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'call.*llvm.bswap' | wc -l | grep 5
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'call.*llvm.bswap' | wc -l | grep 5
uint %test1(uint %i) {
%tmp1 = shr uint %i, ubyte 24 ; <uint> [#uses=1]
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep call | not grep bitcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep call | not grep bitcast
target endian = little
target pointersize = 32
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis
declare void %llvm.memmove(sbyte*, sbyte*, uint, uint)
declare void %llvm.memcpy(sbyte*, sbyte*, uint, uint)
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep call | notcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep call | notcast
implementation
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'setne\|setle\|setge'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep 'setne\|setle\|setge'
int %test1(uint %X, uint %Y) {
%C = setne uint %X, %Y
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep bitcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep bitcast
bool %test1(uint %val) {
%t1 = bitcast uint %val to int
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep ubyte
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep ubyte
int %test1(uint %X) {
%Y = cast uint %X to ubyte ;; Turn into an AND
-; RUN: llvm-as < %s | opt -instcombine -globaldce | llvm-dis | not grep Array
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -globaldce | llvm-dis | not grep Array
; Pulling the cast out of the load allows us to eliminate the load, and then
; the whole array.
; test that casted mallocs get converted to malloc of the right type
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep bitcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep bitcast
int* %test(uint %size) {
%X = malloc long, uint %size
-; RUN: llvm-as < %s | opt -instcombine -mem2reg | llvm-dis | not grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -mem2reg | llvm-dis | not grep load
int %test1(uint* %P) {
%A = alloca uint
; This tests for various complex cast elimination cases instcombine should
; handle.
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | notcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | notcast
bool %test1(int %X) {
%A = cast int %X to uint
; Tests to make sure elimination of casts is working correctly
-; RUN: llvm-as < %s | opt -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep '%c' | notcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep '%c' | notcast
%inbuf = external global [32832 x ubyte]
; Tests to make sure elimination of casts is working correctly
-; RUN: llvm-as < %s | opt -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep '\([sz]ext\)\|\(trunc\)'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep '\([sz]ext\)\|\(trunc\)'
target pointersize = 32
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'ret int %A'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'ret int %A'
int %test(int %A) {
%X = or bool false, false
; This test makes sure that div instructions are properly eliminated.
;
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep div
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep div
implementation
; Test some floating point casting cases
-; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | notcast
-; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | \
+; RUN: llvm-upgrade %s -o - | llvm-as | opt -instcombine | llvm-dis | notcast
+; RUN: llvm-upgrade %s -o - | llvm-as | opt -instcombine | llvm-dis | \
; RUN: grep 'ret [us]byte \(-1\)\|\(255\)'
sbyte %test() {
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep getelementptr
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep getelementptr
bool %test1(short* %P, int %I, int %J) {
%X = getelementptr short* %P, int %I
; The %A getelementptr instruction should be eliminated here
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep -v '%B' | not grep getelementptr
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep -v '%B' | not grep getelementptr
%Global = constant [10 x sbyte] c"helloworld"
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | notcast '' 'getelementptr.*'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | notcast '' 'getelementptr.*'
%G = external global [3 x sbyte]
implementation
; Test folding of constantexpr geps into normal geps.
-; RUN: llvm-as < %s | opt -instcombine -gcse -instcombine | llvm-dis | not grep getelementptr
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -gcse -instcombine | llvm-dis | not grep getelementptr
%Array = external global [40 x int]
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep trunc
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep trunc
target endian = little
target pointersize = 32
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | %prcontext div 1 | grep then:
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | %prcontext div 1 | grep then:
;; This tests that the div is hoisted into the then block.
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep load
%X = constant int 42
%X2 = constant int 47
; test that malloc's with a constant argument are promoted to array allocations
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep getelementptr
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep getelementptr
int* %test() {
%X = malloc int, uint 4
; This test makes sure that memmove instructions are properly eliminated.
;
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'call void %llvm.memmove'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep 'call void %llvm.memmove'
%S = internal constant [33 x sbyte] c"panic: restorelist inconsistency\00"
; This test makes sure that mul instructions are properly eliminated.
;
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep mul
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep mul
implementation
; This file contains various testcases that check to see that instcombine
; is narrowing computations when possible.
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'ret bool false'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'ret bool false'
; test1 - Eliminating the casts in this testcase (by narrowing the AND
; operation) allows instcombine to realize the function always returns false.
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep xor
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep xor
implementation
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: llvm-as < %s | opt -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep -v xor | not grep 'or '
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep -v xor | not grep 'or '
implementation
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep phi
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep phi
implementation
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: llvm-as < %s | opt -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep rem
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep rem
implementation
; This test makes sure that these instructions are properly eliminated.
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep select &&
-; RUN: llvm-as < %s | opt -instcombine -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep select &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
implementation
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: llvm-as < %s | opt -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep set
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep set
%X = uninitialized global int
; This test case was reduced from MultiSource/Applications/hbd. It makes sure
; that folding doesn't happen in case a zext is applied where a sext should have
; been when a setcc is used with two casts.
-; RUN: llvm-as < %s | llc -instcombine | llvm-dis | not grep 'br bool false'
+; RUN: llvm-upgrade < %s | llvm-as | llc -instcombine | llvm-dis | not grep 'br bool false'
int %bug(ubyte %inbuff) {
entry:
%tmp = bitcast ubyte %inbuff to sbyte ; <sbyte> [#uses=1]
; into equivalent setne,eq instructions.
;
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep -v seteq | grep -v setne | not grep set
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep -v seteq | grep -v setne | not grep set
bool %test1(uint %A) {
%B = setge uint %A, 1 ; setne %A, 0
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | egrep 'shl|lshr|ashr' | wc -l | grep 3
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | egrep 'shl|lshr|ashr' | wc -l | grep 3
int %test0(int %A, int %B, ubyte %C) {
%X = shl int %A, ubyte %C
-; RUN: llvm-as < %s | opt -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'lshr int' | wc -l | grep 2 &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep ashr
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'lshr int' | wc -l | grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep ashr
int %test1(int %X, ubyte %A) {
%Y = shr int %X, ubyte %A ; can be logical shift.
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: llvm-as < %s | opt -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep sh
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep sh
implementation
-; RUN: llvm-as < %s | opt -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep '(and\|xor\|add\|shl\|shr)'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep '(and\|xor\|add\|shl\|shr)'
int %test1(int %x) {
%tmp.1 = and int %x, 65535 ; <int> [#uses=1]
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | %prcontext div 1 | grep ret
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | %prcontext div 1 | grep ret
;; This tests that the instructions in the entry blocks are sunk into each
;; arm of the 'if'.
-; RUN: llvm-as < %s | opt -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep call
;; Test that llvm.stackrestore is removed when possible.
-; RUN: llvm-as < %s | opt -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep -v 'store.*,.*null' | not grep store
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep -v 'store.*,.*null' | not grep store
void %test1(int* %P) {
store int undef, int* %P
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep -v 'sub int %Cok, %Bok' | not grep sub
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep -v 'sub int %Cok, %Bok' | not grep sub
implementation
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'sub float' &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'mul float' &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'insertelement.*0.00' &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'call.*llvm.x86.sse.mul' &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'call.*llvm.x86.sse.sub'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'sub float' &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'mul float' &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep 'insertelement.*0.00' &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep 'call.*llvm.x86.sse.mul' &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep 'call.*llvm.x86.sse.sub'
ushort %Convert_sse(float %f) {
entry:
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep shufflevec | wc -l | grep 1 &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep insertelement &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep extractelement
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep shufflevec | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep insertelement &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep extractelement
<4 x float> %test(<4 x float> %tmp, <4 x float> %tmp1) {
%tmp4 = extractelement <4 x float> %tmp, uint 1 ; <float> [#uses=1]
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'add float'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'add float'
%V = type <4 x float>
-; RUN: llvm-as < %s | opt -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep vector_shuffle
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep vector_shuffle
%T = type <4 x float>
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: llvm-as < %s | opt -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'xor '
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep 'xor '
%G1 = global uint 0
%G2 = global uint 0
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'and int %Y, 8'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'and int %Y, 8'
int %test1(ubyte %X) {
%Y = cast ubyte %X to int
; Tests to make sure elimination of casts is working correctly
-; RUN: llvm-as < %s | opt -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | notcast '' '%c1.*'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | notcast '' '%c1.*'
long %test_sext_zext(short %A) {
%c1 = zext short %A to uint
-; RUN: llvm-as < %s | opt -lcssa | llvm-dis | grep "%SJE.0.0.lcssa = phi .struct.SetJmpMapEntry" &&
-; RUN: llvm-as < %s | opt -lcssa | llvm-dis | grep "%SJE.0.0.lcssa1 = phi .struct.SetJmpMapEntry"
+; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | grep "%SJE.0.0.lcssa = phi .struct.SetJmpMapEntry" &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | grep "%SJE.0.0.lcssa1 = phi .struct.SetJmpMapEntry"
%struct.SetJmpMapEntry = type { sbyte*, uint, %struct.SetJmpMapEntry* }
-; RUN: llvm-as < %s | opt -lcssa | llvm-dis | grep "%X.1.lcssa" &&
-; RUN: llvm-as < %s | opt -lcssa | llvm-dis | not grep "%X.1.lcssa1"
+; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | grep "%X.1.lcssa" &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | not grep "%X.1.lcssa1"
declare bool %c1()
declare bool %c2()
-; RUN: llvm-as < %s | opt -lcssa
+; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa
%struct.SetJmpMapEntry = type { sbyte*, uint, %struct.SetJmpMapEntry* }
-; RUN: llvm-as < %s | opt -lcssa -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa -disable-output
; PR977
declare int %opost_block()
-; RUN: llvm-as < %s | opt -lcssa -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa -disable-output
; PR977
void %process_backlog() {
-; RUN: llvm-as < %s | opt -lcssa | llvm-dis | grep "X3.lcssa = phi int" &&
-; RUN: llvm-as < %s | opt -lcssa | llvm-dis | grep "%X4 = add int 3, %X3.lcssa"
+; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | grep "X3.lcssa = phi int" &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | grep "%X4 = add int 3, %X3.lcssa"
void %lcssa(bool %S2) {
entry:
-; RUN: llvm-as < %s | opt -basicaa -licm -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -licm -disable-output
;%MoveArray = external global [64 x ulong]
; Exit blocks need to be updated for all nested loops...
-; RUN: llvm-as < %s | opt -loopsimplify
+; RUN: llvm-upgrade < %s | llvm-as | opt -loopsimplify
implementation ; Functions:
; This testcase fails because preheader insertion is not updating exit node
; information for loops.
-; RUN: llvm-as < %s | opt -licm
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm
int %main(int %argc, sbyte** %argv) {
bb0: ; No predecessors!
; happens because preheader insertion doesn't insert a preheader for this
; case... bad.
-; RUN: llvm-as < %s | opt -licm -adce -simplifycfg | llvm-dis | not grep 'br '
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm -adce -simplifycfg | llvm-dis | not grep 'br '
int %main(int %argc) {
br label %bb5
; LICM is adding stores before phi nodes. bad.
-; RUN: llvm-as < %s | opt -licm
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm
bool %test(bool %c) {
br bool %c, label %Loop, label %Out
; Test that hoisting is disabled for pointers of different types...
;
-; RUN: llvm-as < %s | opt -licm
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm
void %test(int* %P) {
br label %Loop
; loaded from. Basically if the load gets hoisted, the subtract gets turned
; into a constant zero.
;
-; RUN: llvm-as < %s | opt -licm -load-vn -gcse -instcombine | llvm-dis | grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm -load-vn -gcse -instcombine | llvm-dis | grep load
%X = global int 7
declare void %foo()
; This testcase tests for a problem where LICM hoists
; potentially trapping instructions when they are not guaranteed to execute.
;
-; RUN: llvm-as < %s | opt -licm | llvm-dis | %prcontext "IfUnEqual" 2 | grep div
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm | llvm-dis | %prcontext "IfUnEqual" 2 | grep div
%X = global int 0
declare void %foo()
; This testcase tests to make sure a trapping instruction is hoisted when
; it is guaranteed to execute.
;
-; RUN: llvm-as < %s | opt -licm | llvm-dis | %prcontext "test" 2 | grep div
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm | llvm-dis | %prcontext "test" 2 | grep div
%X = global int 0
declare void %foo(int)
-; RUN: llvm-as < %s | opt -licm | lli
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm | lli
implementation ; Functions:
-; RUN: llvm-as < %s | opt -licm | llvm-dis | %prcontext volatile 1 | grep Loop
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm | llvm-dis | %prcontext volatile 1 | grep Loop
%X = global int 7
-; RUN: llvm-as < %s | opt -globalsmodref-aa -licm -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -licm -disable-output
%PL_regcomp_parse = internal global sbyte* null
-; RUN: llvm-as < %s | opt -licm -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm -disable-output
%struct.roadlet = type { sbyte*, %struct.vehicle*, [8 x %struct.roadlet*], [8 x %struct.roadlet* (%struct.roadlet*, %struct.vehicle*, int)*] }
%struct.vehicle = type { %struct.roadlet*, sbyte*, int, int, %union.._631., int }
-; RUN: llvm-as < %s | opt -licm -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm -disable-output
void %test({int}* %P) {
br label %Loop
-; RUN: llvm-as < %s | opt -licm -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm -disable-output
; PR908
%struct.alloc_chain = type { sbyte*, %struct.alloc_chain* }
-; RUN: llvm-as < %s | opt -licm | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm | llvm-dis
void "testfunc"(int %i) {
-; RUN: llvm-as < %s | opt -basicaa -licm | llvm-dis | %prcontext sin 1 | grep Out:
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -licm | llvm-dis | %prcontext sin 1 | grep Out:
declare double %sin(double)
declare void %foo()
-; RUN: llvm-as < %s | opt -basicaa -licm | llvm-dis | %prcontext strlen 1 | grep Out:
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -licm | llvm-dis | %prcontext strlen 1 | grep Out:
declare int %strlen(sbyte*)
declare void %foo()
; Test that LICM works when there is not a loop-preheader
-; RUN: llvm-as < %s | opt -licm | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm | llvm-dis
void "testfunc"(int %i, bool %ifcond) {
br bool %ifcond, label %Then, label %Else
-; RUN: llvm-as < %s | opt -licm -stats 2>&1 | grep "memory locations promoted to register"
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm -stats 2>&1 | grep "memory locations promoted to register"
%X = global int 7
; This testcase checks to make sure the sinker does not cause problems with
; critical edges.
-; RUN: llvm-as < %s | opt -licm | llvm-dis | %prcontext add 1 | grep Exit
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm | llvm-dis | %prcontext add 1 | grep Exit
implementation ; Functions:
; the instruction to the exit blocks instead of executing it on every
; iteration of the loop.
;
-; RUN: llvm-as < %s | opt -licm | llvm-dis | %prcontext mul 1 | grep Out:
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm | llvm-dis | %prcontext mul 1 | grep Out:
int %test(int %N) {
Entry:
; result of the load is only used outside of the loop, sink the load instead of
; hoisting it!
;
-; RUN: llvm-as < %s | opt -licm | llvm-dis | %prcontext load 1 | grep Out:
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm | llvm-dis | %prcontext load 1 | grep Out:
%X = global int 5
; instructions from the loop. Instead they got hoisted, which is better than
; leaving them in the loop, but increases register pressure pointlessly.
-; RUN: llvm-as < %s | opt -licm | llvm-dis | %prcontext getelementptr 1 | grep Out:
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm | llvm-dis | %prcontext getelementptr 1 | grep Out:
%Ty = type { int, int }
%X = external global %Ty
; This testcase ensures that we can sink instructions from loops with
; multiple exits.
;
-; RUN: llvm-as < %s | opt -licm | llvm-dis | %prcontext mul 1 | grep 'Out[12]:'
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm | llvm-dis | %prcontext mul 1 | grep 'Out[12]:'
int %test(int %N, bool %C) {
Entry:
; some exits out of the loop, and that we can do so without breaking dominator
; info.
;
-; RUN: llvm-as < %s | opt -licm | llvm-dis | %prcontext add 1 | grep exit2:
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm | llvm-dis | %prcontext add 1 | grep exit2:
implementation ; Functions:
-; RUN: llvm-as < %s | opt -licm | llvm-dis | %prcontext add 1 | grep preheader.loopexit:
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm | llvm-dis | %prcontext add 1 | grep preheader.loopexit:
implementation
; Potentially trapping instructions may be sunk as long as they are guaranteed
; to be executed.
;
-; RUN: llvm-as < %s | opt -licm | llvm-dis | %prcontext div 1 | grep Out:
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm | llvm-dis | %prcontext div 1 | grep Out:
int %test(int %N) {
Entry:
; equivelent form.
;
; XFAIL: *
-; RUN: llvm-as < %s | opt -q -raise > Output/%s.raised.bc
+; RUN: llvm-upgrade < %s | llvm-as | opt -q -raise > Output/%s.raised.bc
; RUN: lli -force-interpreter -array-checks < Output/%s.raised.bc
;
; An invalid assertion killed the level raiser. Fixed.
;
-; RUN: llvm-as < %s | opt -raise
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise
implementation
; method pointer type into a call. In doing so, it would have to change the
; types of the arguments to the call, but broke doing so.
;
-; RUN: llvm-as < %s | opt -raise
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise
implementation
; Note that this code is actually miscompiled from the input source, but despite
; that, level raise should not hang!
;
-; RUN: llvm-as < %s | opt -raise
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise
%Disjunct = type { \2 *, short, sbyte, sbyte *, { short, short, sbyte, sbyte, \2, sbyte * } *, { short, short, sbyte, sbyte, \2, sbyte * } * }
%chosen_disjuncts = uninitialized global %Disjunct * * ; <%Disjunct * * *> [#uses=1]
; getelementptr instruction... with a bad level raise pass, this code
; will segfault on execution.
;
-; RUN: llvm-as < %s | opt -raise |lli
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise |lli
%Village = type { [4 x \3 *], \2 *, { \2 *, { int, int, int, \5 * } *, \2 * }, { int, int, int, { \2 *, { int, int, int, \6 * } *, \2 * }, { \2 *, { int, int,
int, \6 * } *, \2 * }, { \2 *, { int, int, int, \6 * } *, \2 * }, { \2 *, { int, int, int, \6 * } *, \2 * } }, int, int }
; Level raise is making an incorrect transformation, which causes incorrect
; bytecode to be generated.
;
-; RUN: llvm-as < %s | opt -raise | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis
;
%Village = type { [4 x \3 *], \2 *, { \2 *, { int, int, int, \5 * } *, \2 * }, { int, int, int, { \2 *, { int, int, int, \6 * } *, \2 * }, { \2 *, { int, int, int, \6 * } *, \2 * }, { \2 *, { int, int, int, \6 * } *, \2 * }, { \2 *, { int, int, int, \6 * } *, \2 * } }, int, int }
; LevelRaise should eliminate all cast instructions from this testcase.
;
; XFAIL: *
-; RUN: llvm-as < %s | opt -raise | llvm-dis | notcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis | notcast
%Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } *
%hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int }
; prevented reg115 from being able to change.
;
; XFAIL: *
-; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep bitcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis | not grep bitcast
%Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } *
%HashEntry = type { uint, sbyte *, \2 } *
; XFAIL: *
-; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep bitcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis | not grep bitcast
%Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } *
%HashEntry = type { uint, sbyte *, \2 } *
; return (int*)malloc(i+j);
; }
-; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep bitcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis | not grep bitcast
implementation
; to a 32 bit version of the number with all upper 16 bits clear (ushort->uint
; involves no sign extension). Optimizing this to a single cast is invalid!
;
-; RUN: llvm-as < %s | opt -raise -q | lli
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise -q | lli
;
implementation
; This testcase is not level raised properly...
; XFAIL: *
-; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep bitcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis | not grep bitcast
%List = type { int, %List* }
; This testcase should have the cast propogated through the load
; just like a store does...
;
-; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep 'bitcast uint \*'
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis | not grep 'bitcast uint \*'
int "test"(uint * %Ptr) {
%P2 = cast uint *%Ptr to int *
; XFAIL: *
-; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep bitcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis | not grep bitcast
%FILE = type { int, ubyte*, ubyte*, ubyte, ubyte, uint, uint, uint }
; This could be fixed by making all stores add themselves to a list, and check
; their arguments are consistent AFTER all other values are propogated.
; XFAIL: *
-; RUN: llvm-as < %s | opt -raise | llvm-dis | notcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis | notcast
%Tree = type %struct.tree*
%struct.tree = type { int, double, double, %Tree, %Tree, %Tree, %Tree }
-; RUN: llvm-as < %s | opt -raise
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise
%Tree = type %struct.tree*
%struct.tree = type { int, double, double, %Tree, %Tree, %Tree, %Tree }
; This crashes raise, with an cast<> failure
-; RUN: llvm-as < %s | opt -raise
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise
implementation
sbyte* %test(int* %ptr) {
; because both the source and the destination of the %Y cast are converted
; to a new type, which causes massive problems.
-; RUN: llvm-as < %s | opt -raise -raise-start-inst=W
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise -raise-start-inst=W
int **%test(sbyte **%S) {
BB0:
; Looks like we don't raise alloca's like we do mallocs
; XFAIL: *
-; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep bitcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis | not grep bitcast
implementation ; Functions:
-; RUN: llvm-as < %s | opt -raise -raise-start-inst=cast271
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise -raise-start-inst=cast271
%CON_list = type { %CON_list*, %CON_node* }
%CON_node = type { %DIS_list*, %DIS_list*, int }
-; RUN: llvm-as < %s | opt -raise
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise
int* %test(int* %P, int* %Q) {
%P = cast int* %P to ulong
-; RUN: llvm-as < %s | opt -raise | llvm-dis | grep -v uint | not grep 4294967295
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis | grep -v uint | not grep 4294967295
%length_code = uninitialized global [256 x ubyte]
-; RUN: llvm-as < %s | opt -raise | llvm-dis | grep call | not grep '\.\.\.'
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis | grep call | not grep '\.\.\.'
implementation
; Due to a recent change, this testcase now sends the raise pass into an infinite loop
;
-; RUN: llvm-as < %s | opt -raise
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise
implementation
; This testcase should be able to eliminate at least one of the casts.
;
-; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep 'REMOVE'
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis | not grep 'REMOVE'
int %foo(sbyte * %PF) {
%UPF = cast sbyte* %PF to uint()*
; Testcase reduced from 197.parser by bugpoint
-; RUN: llvm-as < %s | opt -raise -raise-start-inst=cast455 > /dev/null
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise -raise-start-inst=cast455 > /dev/null
void %conjunction_prune() {
; <label>:0 ; No predecessors!
-; RUN: llvm-as < %s | opt -raise -raise-start-inst=cast459
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise -raise-start-inst=cast459
int %deflateInit2_({ ubyte*, uint, ulong, ubyte*, uint, ulong, sbyte*, { \4, int, ubyte*, ulong, ubyte*, int, int, ubyte, ubyte, int, uint, uint, uint, ubyte*, ulong, ushort*, ushort*, uint, uint, uint, uint, uint, long, uint, uint, int, uint, uint, uint, uint, uint, uint, int, int, uint, int, [573 x { { ushort }, { ushort } }], [61 x { { ushort }, { ushort } }], [39 x { { ushort }, { ushort } }], { { { ushort }, { ushort } }*, int, { int }* }, { { { ushort }, { ushort } }*, int, { int }* }, { { { ushort }, { ushort } }*, int, { int }* }, [16 x ushort], [573 x int], int, int, [573 x ubyte], ubyte*, uint, uint, ushort*, ulong, ulong, uint, int, ushort, int }*, sbyte* (sbyte*, uint, uint)*, void (sbyte*, sbyte*)*, sbyte*, int, ulong, ulong }* %strm, int %level, int %method, int %windowBits, int %memLevel, int %strategy, sbyte* %version, int %stream_size) {
bb0: ; No predecessors!
-; RUN: llvm-as < %s | opt -raise
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise
declare void %foo()
-; RUN: llvm-as < %s | opt -raise | llvm-dis | notcast
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis | notcast
void %test(...) { ret void }
-; RUN: llvm-as < %s | opt -raise -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise -disable-output
%T = type { [0 x ubyte] }
; The expr analysis routines were being too aggressive across cast instructions!
-; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep 4294967295
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis | not grep 4294967295
target endian = big
target pointersize = 64
; The program should not just cast 2143289344 to float and store it!
;
-; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep 41DFF
+; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis | not grep 41DFF
void %test() {
%mem_tmp = alloca float
; This testcase exposed a problem with the loop identification pass (LoopInfo).
; Basically, it was incorrectly calculating the loop nesting information.
;
-; RUN: llvm-as < %s | opt -loopsimplify
+; RUN: llvm-upgrade < %s | llvm-as | opt -loopsimplify
implementation ; Functions:
; inserted for the "fail" loop, but the exit block of a loop is not updated
; to be the preheader instead of the exit loop itself.
-; RUN: llvm-as < %s | opt -loopsimplify
+; RUN: llvm-upgrade < %s | llvm-as | opt -loopsimplify
int %re_match_2() {
br label %loopentry.1
-; RUN: llvm-as < %s | opt -tailduplicate -instcombine -simplifycfg -licm -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -instcombine -simplifycfg -licm -disable-output
target endian = little
target pointersize = 32
;
; This is distilled from a monsterous crafty example.
-; RUN: llvm-as < %s | opt -licm -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm -disable-output
%G = weak global int 0 ; <int*> [#uses=13]
-; RUN: llvm-as < %s | opt -loopsimplify -verify -licm -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loopsimplify -verify -licm -disable-output
implementation ; Functions:
void %.subst_48() {
-; RUN: llvm-as < %s | opt -loopsimplify -licm -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loopsimplify -licm -disable-output
void %main() {
entry:
br bool false, label %Out, label %loop
-; RUN: llvm-as < %s | opt -loopsimplify -licm -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loopsimplify -licm -disable-output
; This is PR306
-; RUN: llvm-as < %s | opt -loopsimplify -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loopsimplify -disable-output
implementation
-; RUN: llvm-as < %s | opt -scalarrepl -loopsimplify -licm -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -loopsimplify -licm -disable-output
implementation ; Functions:
-; RUN: llvm-as < %s | opt -loopsimplify
+; RUN: llvm-upgrade < %s | llvm-as | opt -loopsimplify
implementation
-; RUN: llvm-as < %s | opt -loopsimplify
+; RUN: llvm-upgrade < %s | llvm-as | opt -loopsimplify
void %foo(bool %C) {
br bool %C, label %T, label %F
; Loop Simplify should turn phi nodes like X = phi [X, Y] into just Y, eliminating them.
-; RUN: llvm-as < %s | opt -loopsimplify | llvm-dis | grep phi | wc -l | grep 6
+; RUN: llvm-upgrade < %s | llvm-as | opt -loopsimplify | llvm-dis | grep phi | wc -l | grep 6
%A = weak global [3000000 x int] zeroinitializer ; <[3000000 x int]*> [#uses=1]
%B = weak global [20000 x int] zeroinitializer ; <[20000 x int]*> [#uses=1]
; for all loops. This allows the -indvars pass to recognize the %IV
; induction variable in this testcase.
-; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep indvar
+; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | grep indvar
int %test(bool %C) {
br label %Loop
-; RUN: llvm-as < %s | opt -loop-reduce -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce -disable-output
void %try_swap() {
entry:
-; RUN: llvm-as < %s | opt -loop-reduce -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce -disable-output
int %image_to_texture(uint %indvar454) {
loopentry.1.outer:
-; RUN: llvm-as < %s | opt -loop-reduce -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce -disable-output
void %main() {
entry:
-; RUN: llvm-as < %s | opt -loop-reduce -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce -disable-output
; Test to make sure that loop-reduce never crashes on IV's
; with different types but identical strides.
-; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | not grep 'cast uint 1 to uint'
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep 'cast uint 1 to uint'
; The setlt wants to use a value that is incremented one more than the dominant
; IV. Don't insert the 1 outside the loop, preventing folding it into the add.
; Check that this test makes INDVAR and related stuff dead.
-; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | grep phi | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | grep phi | wc -l | grep 2
declare bool %pred()
; Don't reduce the byte access to P[i], at least not on targets that
; support an efficient 'mem[r1+r2]' addressing mode.
-; RUN: llvm-as < %s | opt -loop-reduce -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce -disable-output
declare bool %pred(int)
; having overlapping live ranges that result in copies. We want the setcc instruction
; immediately before the conditional branch.
;
-; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | %prcontext 'br bool' 1 | grep set
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | %prcontext 'br bool' 1 | grep set
void %foo(float* %D, uint %E) {
entry:
; Check that the index of 'P[outer]' is pulled out of the loop.
-; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | not grep 'getelementptr.*%outer.*%INDVAR'
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep 'getelementptr.*%outer.*%INDVAR'
declare bool %pred()
declare int %foo()
; Check that the index of 'P[outer]' is pulled out of the loop.
-; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | not grep 'getelementptr.*%outer.*%INDVAR'
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep 'getelementptr.*%outer.*%INDVAR'
declare bool %pred()
-; RUN: llvm-as < %s | opt -loop-reduce &&
-; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | not grep mul
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep mul
; Make sure we don't get a multiply by 6 in this loop.
; Check that this test makes INDVAR and related stuff dead, because P[indvar]
; gets reduced, making INDVAR dead.
-; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | not grep INDVAR
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep INDVAR
declare bool %pred()
declare int %getidx()
-; RUN: llvm-as < %s | opt -loop-reduce -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce -disable-output
; LSR should not crash on this.
fastcc void %loadloop() {
-; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | grep phi | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | grep phi | wc -l | grep 1
; This should only result in one PHI node!
; Check that this test makes INDVAR and related stuff dead.
-; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | not grep INDVAR
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep INDVAR
declare bool %pred()
-; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | grep mul | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | grep mul | wc -l | grep 1
; LSR should not make two copies of the Q*L expression in the preheader!
sbyte %test(sbyte* %A, sbyte* %B, int %L, int %Q, int %N) {
-; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | grep phi | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | grep phi | wc -l | grep 1
; This testcase should have ONE stride 18 indvar, the other use should have a
; loop invariant value (B) added to it inside of the loop, instead of having
-; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | grep 'add uint %iv.*inc, 1'
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | grep 'add uint %iv.*inc, 1'
;
; Make sure that the use of the IV outside of the loop (the store) uses the
; post incremented value of the IV, not the preincremented value. This
-; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis &&
; Base should not be i*3, it should be i*2.
-; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | not grep 'mul.*%i, 3' &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep 'mul.*%i, 3' &&
; Indvar should not start at zero:
-; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | not grep 'phi uint .* 0'
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep 'phi uint .* 0'
; mul uint %i, 3
; Check that variable strides are reduced to adds instead of multiplies.
-; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | not grep 'mul'
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep 'mul'
declare bool %pred(int)
-; RUN: llvm-as < %s | opt -loop-unroll -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-unroll -disable-output
int %main() {
entry:
-; RUN: llvm-as < %s | opt -loop-unroll -loopsimplify -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-unroll -loopsimplify -disable-output
implementation ; Functions:
-; RUN: llvm-as < %s | opt -loop-unroll | llvm-dis | grep "bb72.2"
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-unroll | llvm-dis | grep "bb72.2"
void %vorbis_encode_noisebias_setup() {
entry:
-; RUN: llvm-as < %s | opt -loop-unswitch -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-unswitch -disable-output
target endian = big
target pointersize = 32
-; RUN: llvm-as < %s | opt -loop-unswitch -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-unswitch -disable-output
void %sort_Eq(int * %S2) {
entry:
-; RUN: llvm-as < %s | opt -loop-unswitch -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-unswitch -disable-output
%struct.BLEND_MAP = type { short, short, short, int, %struct.BLEND_MAP_ENTRY* }
%struct.BLEND_MAP_ENTRY = type { float, ubyte, { [5 x float], [4 x ubyte] } }
-; RUN: llvm-as < %s | opt -loop-unswitch -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-unswitch -disable-output
implementation ; Functions:
void %init_caller_save() {
-; RUN: llvm-as < %s | opt -loop-unswitch -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-unswitch -disable-output
implementation ; Functions:
int %test(int* %A, bool %C) {
; This testcase was reduced from Shootout-C++/reversefile.cpp by bugpoint
-; RUN: llvm-as < %s | opt -lowerinvoke -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -lowerinvoke -disable-output
declare void %baz()
-; RUN: llvm-as < %s | opt -lowerinvoke -enable-correct-eh-support -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -lowerinvoke -enable-correct-eh-support -disable-output
void %_ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale() {
entry:
-; RUN: llvm-as < %s | opt -lowerinvoke -enable-correct-eh-support -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -lowerinvoke -enable-correct-eh-support -disable-output
implementation ; Functions:
-; RUN: llvm-as < %s | opt -lowerinvoke -enable-correct-eh-support -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -lowerinvoke -enable-correct-eh-support -disable-output
declare fastcc int %ll_listnext__listiterPtr()
-; RUN: llvm-as < %s | opt -lowerinvoke -disable-output &&
-; RUN: llvm-as < %s | opt -lowerinvoke -disable-output -enable-correct-eh-support
+; RUN: llvm-upgrade < %s | llvm-as | opt -lowerinvoke -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -lowerinvoke -disable-output -enable-correct-eh-support
implementation
-; RUN: llvm-as < %s | opt -lowersetjmp -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -lowersetjmp -disable-output
%struct.jmpenv = type { int, sbyte }
implementation
-; RUN: llvm-as < %s | opt -lowersetjmp
+; RUN: llvm-upgrade < %s | llvm-as | opt -lowersetjmp
%lldb.compile_unit = type { uint, ushort, ushort, sbyte*, sbyte*, sbyte*, { }* }
%d.compile_unit = external global %lldb.compile_unit ; <%lldb.compile_unit*> [#uses=1]
-; RUN: llvm-as < %s | opt -lowersetjmp | llvm-dis | grep invoke
+; RUN: llvm-upgrade < %s | llvm-as | opt -lowersetjmp | llvm-dis | grep invoke
%JmpBuf = type int
%.str_1 = internal constant [13 x sbyte] c"returned %d\0A\00"
-; RUN: llvm-as < %s | opt -lowerswitch
+; RUN: llvm-upgrade < %s | llvm-as | opt -lowerswitch
void %child(int %ct.1) {
entry: ; No predecessors!
-; RUN: llvm-as < %s | opt -lowerswitch
+; RUN: llvm-upgrade < %s | llvm-as | opt -lowerswitch
void %test() {
switch uint 0, label %Next []
-; RUN: llvm-as < %s | opt -lowerswitch -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -lowerswitch -disable-output
void %solve() {
entry:
; Uninitialized values are not handled correctly.
;
-; RUN: llvm-as < %s | opt -mem2reg
+; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg
;
implementation
; This input caused the mem2reg pass to die because it was trying to promote
; the %r alloca, even though it is invalid to do so in this case!
;
-; RUN: llvm-as < %s | opt -mem2reg
+; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg
implementation
-; RUN: llvm-as < %s | opt -mem2reg
+; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg
implementation ; Functions:
; This testcases makes sure that mem2reg can handle unreachable blocks.
-; RUN: llvm-as < %s | opt -mem2reg
+; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg
int %test() {
%X = alloca int
; Mem2reg used to only add one incoming value to a PHI node, even if it had
; multiple incoming edges from a block.
;
-; RUN: llvm-as < %s | opt -mem2reg -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg -disable-output
int %test(bool %c1, bool %c2) {
%X = alloca int
; Promoting some values allows promotion of other values.
-; RUN: llvm-as < %s | opt -mem2reg | llvm-dis | not grep alloca
+; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg | llvm-dis | not grep alloca
int %test2() {
%result = alloca int ; ty=int*
; Mem2reg should not insert dead PHI nodes! The naive algorithm inserts a PHI
; node in L3, even though there is no load of %A in anything dominated by L3.
-; RUN: llvm-as < %s | opt -mem2reg | llvm-dis | not grep phi
+; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg | llvm-dis | not grep phi
void %test(int %B, bool %C) {
%A = alloca int
-; RUN: llvm-as < %s | opt -mem2reg -instcombine | llvm-dis | grep store
+; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg -instcombine | llvm-dis | grep store
; PR590
void %zero(sbyte* %p, int %n) {
-; RUN: llvm-as < %s | opt -mem2reg -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg -disable-output
; PR670
void %printk(int, ...) {
; generated code should perform the appropriate masking operations required
; depending on the endianness of the target...
; XFAIL: *
-; RUN: llvm-as < %s | opt -mem2reg | llvm-dis | not grep 'alloca'
+; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg | llvm-dis | not grep 'alloca'
implementation
; Simple sanity check testcase. Both alloca's should be eliminated.
-; RUN: llvm-as < %s | opt -mem2reg | llvm-dis | not grep 'alloca'
+; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg | llvm-dis | not grep 'alloca'
implementation
-; RUN: llvm-as < %s | opt -mem2reg | llvm-dis | not grep phi
+; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg | llvm-dis | not grep phi
implementation
-; RUN: llvm-as < %s | opt -predsimplify -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -disable-output
fastcc void %_ov_splice(int %n1, int %n2, int %ch2) {
entry:
-; RUN: llvm-as < %s | opt -predsimplify -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -disable-output
void %safe_strcpy(uint %size1) {
entry:
-; RUN: llvm-as < %s | opt -predsimplify -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -disable-output
void %gs_image_next() {
entry:
-; RUN: llvm-as < %s | opt -predsimplify | llvm-dis | grep br | grep return.i.bb8_crit_edge | grep false
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify | llvm-dis | grep br | grep return.i.bb8_crit_edge | grep false
%str = external global [4 x sbyte] ; <[4 x sbyte]*> [#uses=1]
-; RUN: llvm-as < %s | opt -predsimplify -instcombine -simplifycfg -disable-output &&
-; RUN: llvm-as < %s | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | not grep fail &&
-; RUN: llvm-as < %s | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | grep -c pass | grep 3
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -instcombine -simplifycfg -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | not grep fail &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | grep -c pass | grep 3
int %test1(int %x, int %y) {
entry:
-; RUN: llvm-as < %s | opt -predsimplify -instcombine -simplifycfg -disable-output &&
-; RUN: llvm-as < %s | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | grep -c pass | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -instcombine -simplifycfg -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | grep -c pass | grep 2
int %test(int %x, int %y) {
entry:
-; RUN: llvm-as < %s | opt -predsimplify -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -disable-output
void %readMotionInfoFromNAL() {
entry:
-; RUN: llvm-as < %s | opt -predsimplify -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -disable-output
int %test_wp_B_slice(int %select_method) {
entry:
-; RUN: llvm-as < %s | opt -predsimplify -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -disable-output
void %diff(int %N) {
entry:
-; RUN: llvm-as < %s | opt -predsimplify -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -disable-output
%struct.cube_struct = type { int, int, int, int*, int*, int*, int*, int*, uint*, uint*, uint**, uint**, uint*, uint*, uint, int, int*, int, int }
%cube = external global %struct.cube_struct ; <%struct.cube_struct*> [#uses=2]
-; RUN: llvm-as < %s | opt -predsimplify -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -disable-output
; ModuleID = 'b.bc'
target datalayout = "e-p:32:32"
-; RUN: llvm-as < %s | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | not grep fail &&
-; RUN: llvm-as < %s | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | grep -c pass | grep 4
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | not grep fail &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | grep -c pass | grep 4
void %test1(int %x) {
entry:
-; RUN: llvm-as < %s | opt -predsimplify -verify
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -verify
void %dgefa() {
entry:
-; RUN: llvm-as < %s | opt -predsimplify -verify
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -verify
; ModuleID = 'bugpoint-reduced-simplified.bc'
target endian = little
-; RUN: llvm-as < %s | opt -predsimplify -simplifycfg | llvm-dis | grep pass
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -simplifycfg | llvm-dis | grep pass
void %regtest(int %x) {
entry:
-; RUN: llvm-as < %s | opt -predsimplify -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -disable-output
; ModuleID = '<stdin>'
target endian = little
-; RUN: llvm-as < %s | opt -prune-eh | llvm-dis | grep invoke
+; RUN: llvm-upgrade < %s | llvm-as | opt -prune-eh | llvm-dis | grep invoke
declare void %External()
-; RUN: llvm-as < %s | opt -prune-eh -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -prune-eh -disable-output
implementation
-; RUN: llvm-as < %s | opt -prune-eh | llvm-dis | not grep invoke
+; RUN: llvm-upgrade < %s | llvm-as | opt -prune-eh | llvm-dis | not grep invoke
implementation
-; RUN: llvm-as < %s | opt -prune-eh | llvm-dis | not grep 'ret int'
+; RUN: llvm-upgrade < %s | llvm-as | opt -prune-eh | llvm-dis | not grep 'ret int'
void %noreturn() {
unwind
-; RUN: llvm-as < %s | opt -prune-eh | llvm-dis | not grep invoke
+; RUN: llvm-upgrade < %s | llvm-as | opt -prune-eh | llvm-dis | not grep invoke
implementation
-; RUN: llvm-as < %s | opt -raiseallocs -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -raiseallocs -disable-output
implementation ; Functions:
void %main() {
; This situation can occur due to the funcresolve pass.
;
-; RUN: llvm-as < %s | opt -raiseallocs | llvm-dis | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -raiseallocs | llvm-dis | not grep call
declare void %free(sbyte*)
-; RUN: llvm-as < %s | opt -reassociate -instcombine -constprop -dce | llvm-dis | not grep add
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine -constprop -dce | llvm-dis | not grep add
int %test(int %A) {
%X = add int %A, 1
-; RUN: llvm-as < %s | opt -reassociate -instcombine -constprop -die | llvm-dis | not grep 5
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine -constprop -die | llvm-dis | not grep 5
int %test(int %A, int %B) {
%W = add int %B, -5
; With sub reassociation, constant folding can eliminate all of the constants.
;
-; RUN: llvm-as < %s | opt -reassociate -constprop -instcombine -dce | llvm-dis | not grep add
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -constprop -instcombine -dce | llvm-dis | not grep add
int %test(int %A, int %B) {
%W = add int 5, %B
; With sub reassociation, constant folding can eliminate the two 12 constants.
;
-; RUN: llvm-as < %s | opt -reassociate -constprop -dce | llvm-dis | not grep 12
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -constprop -dce | llvm-dis | not grep 12
int "test"(int %A, int %B, int %C, int %D) {
%M = add int %A, 12
; The reassociate pass is not preserving dominance properties correctly
;
-; RUN: llvm-as < %s | opt -reassociate
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate
int %compute_dist(int %i, int %j) {
%reg119 = sub int %j, %i
-; RUN: llvm-as < %s | opt -reassociate -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -disable-output
implementation ; Functions:
-; RUN: llvm-as < %s | opt -reassociate -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -disable-output
void %test(int %a, int %b, int %c, int %d) {
%tmp.2 = xor int %a, %b ; <int> [#uses=1]
-; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis | grep 'ret int 0'
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep 'ret int 0'
int %f(int %a0, int %a1, int %a2, int %a3, int %a4) {
%tmp.2 = add int %a4, %a3 ; <int> [#uses=1]
-; RUN: llvm-as < %s | opt -reassociate -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -disable-output
void %foo() {
%tmp162 = sub <4 x float> zeroinitializer, zeroinitializer
; With reassociation, constant folding can eliminate the 12 and -12 constants.
;
-; RUN: llvm-as < %s | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep add
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep add
int %test(int %arg) {
%tmp1 = sub int -12, %arg
; With reassociation, constant folding can eliminate the +/- 30 constants.
;
-; RUN: llvm-as < %s | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep 30
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep 30
int "test"(int %reg109, int %reg1111) {
%reg115 = add int %reg109, -30 ; <int> [#uses=1]
-; RUN: llvm-as < %s | opt -reassociate -gcse | llvm-dis | grep add | wc -l | grep 6
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -gcse | llvm-dis | grep add | wc -l | grep 6
; Each of these functions should turn into two adds each.
%e = external global int
-; RUN: llvm-as < %s | opt -reassociate -gcse -instcombine | llvm-dis | not grep add
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -gcse -instcombine | llvm-dis | not grep add
%a = weak global int 0
%b = weak global int 0
-; RUN: llvm-as < %s | opt -reassociate -dce | llvm-dis | not grep '\(and\|sub\)'
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -dce | llvm-dis | not grep '\(and\|sub\)'
int %test1(int %a, int %b) {
%tmp.2 = and int %b, %a
; In this case, we want to reassociate the specified expr so that i+j can be
; hoisted out of the inner most loop.
;
-; RUN: llvm-as < %s | opt -reassociate | llvm-dis | grep 115 | not grep 117
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate | llvm-dis | grep 115 | not grep 117
%.LC0 = internal global [4 x sbyte] c"%d\0A\00" ; <[4 x sbyte]*> [#uses=1]
; This should be one add and two multiplies.
-; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis | grep mul | wc -l | grep 2 &&
-; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis | grep add | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep mul | wc -l | grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep add | wc -l | grep 1
int %test(int %A, int %B, int %C) {
%aa = mul int %A, %A
-; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis | not grep 'sub int 0'
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | not grep 'sub int 0'
int %test(int %X, int %Y, int %Z) {
%A = sub int 0, %X
-; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis | grep mul | wc -l | grep 2
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep mul | wc -l | grep 2
; This should have exactly 2 multiplies when we're done.
; This should turn into one multiply and one add.
-; RUN: llvm-as < %s | opt -instcombine -reassociate -instcombine | llvm-dis | grep mul | wc -l | grep 1 &&
-; RUN: llvm-as < %s | opt -instcombine -reassociate -instcombine | llvm-dis | grep add | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -reassociate -instcombine | llvm-dis | grep mul | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -reassociate -instcombine | llvm-dis | grep add | wc -l | grep 1
int %main(int %t) {
%tmp.3 = mul int %t, 12 ; <int> [#uses=1]
%tmp.4 = add int %tmp.3, 5 ; <int> [#uses=1]
-; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis | not grep sub
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | not grep sub
; Test that we can turn things like X*-(Y*Z) -> X*-1*Y*Z.
; Reassociation should apply to Add, Mul, And, Or, & Xor
;
-; RUN: llvm-as < %s | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep 12
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep 12
int "test_mul"(int %arg) {
%tmp1 = mul int 12, %arg
; There should be exactly one shift and one add left.
-; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis | grep shl | wc -l | grep 1 &&
-; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis | grep add | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep shl | wc -l | grep 1 &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep add | wc -l | grep 1
int %test(int %X, int %Y) {
%tmp.2 = shl int %X, ubyte 1 ; <int> [#uses=1]
; With shl->mul reassociation, we can see that this is (shl A, 9) * A
;
-; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis | grep 'shl .*, ubyte 9'
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep 'shl .*, ubyte 9'
int %test(int %A, int %B) {
%X = shl int %A, ubyte 5
; With sub reassociation, constant folding can eliminate the 12 and -12 constants.
;
-; RUN: llvm-as < %s | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep 12
+; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep 12
int "test"(int %A, int %B) {
%X = add int -12, %A
; real benchmark (mst from Olden benchmark, MakeGraph function). When SCCP is
; fixed, this should be eliminated by a single SCCP application.
;
-; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep loop
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | not grep loop
int* %test() {
bb1:
-; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep sub
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | not grep sub
void %test3(int, int) {
add int 0, 0
; This test shows a case where SCCP is incorrectly eliminating the PHI node
; because it thinks it has a constant 0 value, when it really doesn't.
-; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep phi
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep phi
int "test"(int %A, bool %c) {
bb1:
; this is in fact NOT the case, so the return should still be alive in the code
; after sccp and CFG simplification have been performed.
;
-; RUN: llvm-as < %s | opt -sccp -simplifycfg | llvm-dis | grep ret
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -simplifycfg | llvm-dis | grep ret
void "old_main"() {
-; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep '%X'
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | not grep '%X'
%G = uninitialized global [40x int]
-; RUN: llvm-as < %s | opt -sccp -simplifycfg | llvm-dis | not grep then:
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -simplifycfg | llvm-dis | not grep then:
void %cprop_test11(int* %data.1) {
entry: ; No predecessors!
; The PHI cannot be eliminated from this testcase, SCCP is mishandling invoke's!
-; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep phi
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep phi
declare void %foo()
int %test(bool %cond) {
-; RUN: llvm-as < %s | opt -sccp -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -disable-output
implementation
-; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep 'ret int 1'
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep 'ret int 1'
; This function definitely returns 1, even if we don't know the direction
; of the branch.
-; RUN: llvm-as < %s | opt -sccp -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -disable-output
target endian = big
target pointersize = 32
; This is a basic sanity check for constant propogation. The add instruction
; should be eliminated.
-; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep add
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | not grep add
int %test(bool %B) {
br bool %B, label %BB1, label %BB2
-; RUN: llvm-as < %s | opt -sccp -adce -simplifycfg | llvm-dis | not grep br
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -adce -simplifycfg | llvm-dis | not grep br
; No matter how hard you try, sqrt(1.0) is always 1.0. This allows the
; optimizer to delete this loop.
-; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | grep -v 'ret int 17' | grep -v 'ret int undef' | not grep ret
+; RUN: llvm-upgrade < %s | llvm-as | opt -ipsccp | llvm-dis | grep -v 'ret int 17' | grep -v 'ret int undef' | not grep ret
implementation
-; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | grep -v 'ret int 0' | grep -v 'ret int undef' | not grep ret
+; RUN: llvm-upgrade < %s | llvm-as | opt -ipsccp | llvm-dis | grep -v 'ret int 0' | grep -v 'ret int undef' | not grep ret
implementation
-; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | not grep global
+; RUN: llvm-upgrade < %s | llvm-as | opt -ipsccp | llvm-dis | not grep global
%G = internal global int undef
; This test makes sure that these instructions are properly constant propagated.
;
-; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep load
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | not grep load
%X = constant int 42
%Y = constant [2 x { int, float }] [ { int, float } { int 12, float 1.0 },
-; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep 'ret int 0'
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep 'ret int 0'
; Test that SCCP has basic knowledge of when and/or nuke overdefined values.
-; RUN: llvm-as < %s | opt -sccp -dce -simplifycfg | llvm-dis | not grep br
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -dce -simplifycfg | llvm-dis | not grep br
int %test(int %param) {
entry:
; This is the test case taken from appel's book that illustrates a hard case
; that SCCP gets right. BB3 should be completely eliminated.
;
-; RUN: llvm-as < %s | opt -sccp -constprop -dce -cfgsimplify | llvm-dis | not grep BB3
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -constprop -dce -cfgsimplify | llvm-dis | not grep BB3
int %testfunction(int %i0, int %j0) {
BB1:
-; RUN: llvm-as < %s | opt -sccp -disable-output &&
-; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep select
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | not grep select
int %test1(bool %C) {
%X = select bool %C, int 0, int 0
-; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep alloca | grep '4 x'
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep alloca | grep '4 x'
; Test that an array is not incorrectly deconstructed...
-; RUN: llvm-as < %s | opt -scalarrepl
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl
void %main() {
%E = alloca { { int, float, double, long }, { int, float, double, long } } ; <{ { int, float, double, long }, { int, float, double, long } }*> [#uses=1]
-; RUN: llvm-as < %s | opt -scalarrepl
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl
int %test() {
%X = alloca { [ 4 x int] }
; Scalar replacement was incorrectly promoting this alloca!!
;
-; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | sed 's/;.*//g' | grep '\['
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | sed 's/;.*//g' | grep '\['
sbyte *%test() {
%A = alloca [30 x sbyte]
-; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep alloca | grep '{'
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep alloca | grep '{'
implementation ; Functions:
declare int %.callback_1(sbyte*)
-; RUN: llvm-as < %s | opt -scalarrepl -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -disable-output
target endian = big
target pointersize = 32
%struct.rtx_def = type { [2 x ubyte], int, [1 x %union.rtunion_def] }
-; RUN: llvm-as < %s | opt -scalarrepl -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -disable-output
target endian = big
target pointersize = 32
-; RUN: llvm-as < %s | opt -scalarrepl -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -disable-output
void %output_toc() {
entry:
-; RUN: llvm-as < %s | opt -scalarrepl -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -disable-output
target datalayout = "e-p:32:32"
target endian = little
-; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis &&
-; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep -F 'alloca [2 x <4 x int>]'
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep -F 'alloca [2 x <4 x int>]'
int %func(<4 x float> %v0, <4 x float> %v1) {
%vsiidx = alloca [2 x <4 x int>], align 16 ; <[2 x <4 x int>]*> [#uses=3]
-; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | not grep alloca &&
-; RUN: llvm-as < %s | opt -scalarrepl -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | not grep alloca &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -disable-output
target endian = big
target pointersize = 32
-; RUN: llvm-as < %s | opt -scalarrepl -mem2reg | llvm-dis | not grep alloca
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -mem2reg | llvm-dis | not grep alloca
int %test() {
%X = alloca [ 4 x int ]
-; RUN: llvm-as < %s | opt -scalarrepl -mem2reg | llvm-dis | grep alloca
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -mem2reg | llvm-dis | grep alloca
int %test() {
%X = alloca [ 4 x int ]
-; RUN: llvm-as < %s | opt -scalarrepl -mem2reg | llvm-dis | not grep alloca
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -mem2reg | llvm-dis | not grep alloca
int %test() {
%X = alloca { int, float }
-; RUN: llvm-as < %s | opt -simplifycfg -instcombine -mem2reg | llvm-dis | not grep alloca
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -instcombine -mem2reg | llvm-dis | not grep alloca
;
; This tests to see if mem2reg can promote alloca instructions whose addresses
; are used by PHI nodes that are immediately loaded. The LLVM C++ front-end
; Test promotion of loads that use the result of a select instruction. This
; should be simplified by the instcombine pass.
-; RUN: llvm-as < %s | opt -instcombine -mem2reg | llvm-dis | not grep alloca
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -mem2reg | llvm-dis | not grep alloca
int %main() {
%mem_tmp.0 = alloca int ; <int*> [#uses=3]
-; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis
implementation
-; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | not grep alloca &&
-; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep 'ret sbyte'
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | not grep alloca &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep 'ret sbyte'
; PR892
-; RUN: llvm-as < %s | opt -scalarrepl -disable-output &&
-; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | not grep alloca
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | not grep alloca
void %test(<4 x float>* %F, float %f) {
entry:
; Basic block #2 should not be merged into BB #3!
;
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | grep 'br label'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | grep 'br label'
;
declare void %foo()
implementation
;
; Which is not valid SSA
;
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis
void "test"() {
br bool true, label %end, label %Loop
; -simplifycfg is not folding blocks if there is a PHI node involved. This
; should be fixed eventually
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep br
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep br
int %main(int %argc) {
br label %InlinedFunctionReturnNode
-; RUN: llvm-as < %s | opt -simplifycfg
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg
int %test(int %A, int %B, bool %cond) {
J:
-; RUN: llvm-as < %s | opt -simplifycfg -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output
implementation ; Functions:
; Do not remove the invoke!
;
-; RUN: llvm-as < %s | opt -simplifycfg -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output
int %test() {
%A = invoke int %test() to label %Ret except label %Ret
; Do not remove the invoke!
;
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | grep invoke
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | grep invoke
int %test() {
invoke int %test() to label %Ret except label %Ret
; This test checks to make sure that 'br X, Dest, Dest' is folded into
; 'br Dest'
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep 'br bool %c2'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br bool %c2'
declare void %noop()
; due to the fact that the SimplifyCFG function does not use
; the ConstantFoldTerminator function.
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep 'br bool %c2'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br bool %c2'
declare void %noop()
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep switch
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep switch
int %test1() { ; Test normal folding
switch uint 5, label %Default [
-; RUN: llvm-as < %s | opt -simplifycfg -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output
implementation ; Functions:
-; RUN: llvm-as < %s | opt -simplifycfg -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output
; PR584
%g_38098584 = external global uint ; <uint*> [#uses=1]
-; RUN: llvm-as < %s | opt -simplifycfg -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output
void %main() {
entry:
-; RUN: llvm-as < %s | opt -simplifycfg -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output
%arraytype.1.Char = type { int, [0 x sbyte] }
%arraytype.4.Signed = type { int, [0 x int] }
-; RUN: llvm-as < %s | opt -simplifycfg -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output
bool %foo() {
%X = invoke bool %foo() to label %N unwind label %F
; Make sure this doesn't turn into an infinite loop
-; RUN: llvm-as < %s | opt -simplifycfg -constprop -simplifycfg | llvm-dis | grep bb86
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -constprop -simplifycfg | llvm-dis | grep bb86
%struct.anon = type { uint, int, int, int, [1024 x sbyte] }
%_zero_ = external global %struct.anon* ; <%struct.anon**> [#uses=2]
-; RUN: llvm-as < %s | opt -simplifycfg -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output
void %polnel_() {
entry:
-; RUN: llvm-as < %s | opt -simplifycfg -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output
void %main(int %c) {
entry:
-; RUN: llvm-as < %s | opt -load-vn -gcse -simplifycfg -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -simplifycfg -disable-output
; PR867
target endian = big
-; RUN: llvm-as < %s | opt -simplifycfg -disable-output &&
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep select
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep select
; PR957
-; RUN: llvm-as < %s | opt -simplifycfg -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output
%struct..4._102 = type { %struct.QVectorData* }
%struct..5._125 = type { %struct.QMapData* }
-;RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep 'br label'
+;RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br label'
void %test(bool %C) {
br bool %C, label %A, label %B
A:
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep seteq
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep seteq
; Check that simplifycfg deletes a dead 'seteq' instruction when it
; folds a conditional branch into a switch instruction.
; Test merging of blocks with phi nodes.
;
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep 'N:'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'N:'
;
int %test(bool %a) {
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep br
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep br
void %foo(bool %C, int* %P) {
br bool %C, label %T, label %F
; If this test is successful, the function should be reduced to 'call; ret'
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not egrep 'invoke|br'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not egrep 'invoke|br'
declare void %bar()
; Test merging of blocks that only have PHI nodes in them
;
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep 'N:'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'N:'
;
int %test(bool %a, bool %b) {
; where the mergedinto block doesn't have any PHI nodes, and is in fact
; dominated by the block-to-be-eliminated
;
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep 'N:'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'N:'
;
int %test(bool %a, bool %b) {
; nodes away allows the branches to be eliminated, performing a simple form of
; 'if conversion'.
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis > %t.xform
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis > %t.xform
; RUN: not grep phi %t.xform && grep ret %t.xform
declare void %use(bool)
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep br
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep br
int %test(bool %C, int %V1, int %V2) {
entry:
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep select
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep select
;; The PHI node in this example should not be turned into a select, as we are
;; not able to ifcvt the entire block. As such, converting to a select just
; a PHI node and a return. Make sure the simplify cfg can straighten out this
; important case. This is basically the most trivial form of tail-duplication.
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep 'br label'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br label'
int %test(bool %B, int %A, int %B) {
br bool %B, label %T, label %F
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep unreachable
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep unreachable
void %test1(bool %C, bool* %BP) {
br bool %C, label %T, label %F
; Test CFG simplify removal of branch instructions...
;
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep br
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep br
void "test1"() {
-; RUN: llvm-as < %s | opt -simplifycfg -instcombine -simplifycfg | llvm-dis | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -instcombine -simplifycfg | llvm-dis | not grep call
declare void %bar()
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep call
declare void %bar()
; This test ensures that the simplifycfg pass continues to constant fold
; terminator instructions.
-; RUN: llvm-as < %s | opt -simplifycfg | not grep br
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | not grep br
int %test(int %A, int %B) {
J:
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | grep 'br bool' | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | grep 'br bool' | wc -l | grep 1
void %test(int* %P, int* %Q, bool %A, bool %B) {
br bool %A, label %a, label %b ;; fold the two branches into one
-; RUN: llvm-as < %s | opt -simplifycfg -adce | llvm-dis | not grep 'call void %f1' &&
-; RUN: llvm-as < %s | opt -simplifycfg -adce -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -adce | llvm-dis | not grep 'call void %f1' &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -adce -disable-output
declare void %f1()
declare void %f2()
declare void %f3()
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep 'br'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br'
declare void %bar(int)
void %test(bool %P, int* %Q) {
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep br
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep br
int %test1(bool %C) {
entry:
-; RUN: llvm-as < %s | opt -simplifycfg -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output
void %NewExtractNames() {
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep br
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep br
declare void %foo1()
declare void %foo2()
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep 'br'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br'
bool %_ZN4llvm11SetCondInst7classofEPKNS_11InstructionE({uint, uint}* %I) {
entry:
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | grep switch | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | grep switch | wc -l | grep 1
; Test that a switch going to a switch on the same value can be merged. All
; three switches in this example can be merged into one big one.
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep 'call void %DEAD'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'call void %DEAD'
; Test that we can thread a simple known condition through switch statements.
-; RUN: llvm-as < %s | opt -simplify-libcalls -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls -disable-output
%G = constant [3 x sbyte] c"%s\00"
; Test that the ExitInMainOptimization pass works correctly
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep -c 'ret int 3' | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | grep -c 'ret int 3' | grep 1
declare void %exit(int)
declare void %exitonly(int)
; Test that the ToAsciiOptimizer works correctly
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*%ffs'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*%ffs'
declare int %ffs(int)
declare int %ffsl(int)
; Test that the FPrintFOptimizer works correctly
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*fprintf'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*fprintf'
;
%struct._IO_FILE = type { int, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, %struct._IO_marker*, %struct._IO_FILE*, int, int, int, ushort, sbyte, [1 x sbyte], sbyte*, long, sbyte*, sbyte*, int, [52 x sbyte] }
; Test that the IsDigitOptimizer works correctly
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call'
declare int %isdigit(int)
declare int %isascii(int)
; Test that the StrCatOptimizer works correctly
-; RUN: llvm-as < %s | opt -constprop -simplify-libcalls -disable-output &&
-; RUN: llvm-as < %s | opt -constprop -simplify-libcalls | llvm-dis | not grep 'call.*llvm.memcpy'
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -simplify-libcalls -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -simplify-libcalls | llvm-dis | not grep 'call.*llvm.memcpy'
declare sbyte* %llvm.memcpy(sbyte*,sbyte*,int,int)
%h = constant [2 x sbyte] c"h\00"
; Test that the StrCatOptimizer works correctly
-; RUN: llvm-as < %s | opt -constprop -simplify-libcalls -disable-output &&
-; RUN: llvm-as < %s | opt -constprop -simplify-libcalls | llvm-dis | not grep 'call.*llvm.memmove'
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -simplify-libcalls -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -simplify-libcalls | llvm-dis | not grep 'call.*llvm.memmove'
declare sbyte* %llvm.memmove(sbyte*,sbyte*,int,int)
%h = constant [2 x sbyte] c"h\00"
; Test that the LLVMMemSetOptimizer works correctly
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*llvm.memset'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*llvm.memset'
declare void %llvm.memset(sbyte*,ubyte,uint,uint)
; Testcase for calls to the standard C "pow" function
;
; Equivalent to: http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01786.html
-; RUN: llvm-as < %s | opt -simplify-libcalls -disable-output &&
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call double .pow'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call double .pow'
declare double %pow(double, double)
; Test that the PutsCatOptimizer works correctly
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*fputs'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*fputs'
;
%struct._IO_FILE = type { int, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, %struct._IO_marker*, %struct._IO_FILE*, int, int, int, ushort, sbyte, [1 x sbyte], sbyte*, long, sbyte*, sbyte*, int, [52 x sbyte] }
%struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, int }
; Test that the SPrintFOptimizer works correctly
-; RUN: llvm-as < %s | opt -simplify-libcalls -disable-output &&
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*sprintf'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*sprintf'
declare int %sprintf(sbyte*,sbyte*,...)
declare int %puts(sbyte*)
; Test that the StrCatOptimizer works correctly
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*strcat'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*strcat'
declare sbyte* %strcat(sbyte*,sbyte*)
declare int %puts(sbyte*)
; Test that the StrChrOptimizer works correctly
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*%strchr'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*%strchr'
declare sbyte* %strchr(sbyte*,int)
declare int %puts(sbyte*)
; Test that the StrCmpOptimizer works correctly
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*strcmp'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*strcmp'
declare int %strcmp(sbyte*,sbyte*)
declare int %puts(sbyte*)
; Test that the StrCpyOptimizer works correctly
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*strcpy'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*strcpy'
declare sbyte* %strcpy(sbyte*,sbyte*)
declare int %puts(sbyte*)
; Test that the StrCatOptimizer works correctly
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*strlen'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*strlen'
declare uint %strlen(sbyte*)
%hello = constant [6 x sbyte] c"hello\00"
; Test that the StrNCmpOptimizer works correctly
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*strncmp'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*strncmp'
declare int %strncmp(sbyte*,sbyte*,int)
declare int %puts(sbyte*)
; Test that the ToAsciiOptimizer works correctly
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*toascii'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*toascii'
declare int %toascii(int)
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*floor(' &&
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep 'call.*floorf('
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*ceil(' &&
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep 'call.*ceilf('
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*nearbyint(' &&
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep 'call.*nearbyintf('
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*floor(' &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | grep 'call.*floorf('
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*ceil(' &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | grep 'call.*ceilf('
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*nearbyint(' &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | grep 'call.*nearbyintf('
; XFAIL: sparc
declare double %floor(double)
; Test that the memcmpOptimizer works correctly
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*memcmp' &&
-; RUN: llvm-as < %s | opt -simplify-libcalls -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*memcmp' &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls -disable-output
declare int %memcmp(sbyte*,sbyte*,int)
%h = constant [2 x sbyte] c"h\00"
-; RUN: llvm-as < %s | opt -tailcallelim | llvm-dis | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | not grep call
int %factorial(int %x) {
entry:
; go out to the anonymous users of the demo script for "suggesting"
; optimizations that should be done. :)
-; RUN: llvm-as < %s | opt -tailcallelim | llvm-dis | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | not grep call
int %mul(int %x, int %y) {
entry:
; This function contains two tail calls, which should be eliminated
-; RUN: llvm-as < %s | opt -tailcallelim -stats -disable-output 2>&1 | grep '2 tailcallelim'
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim -stats -disable-output 2>&1 | grep '2 tailcallelim'
int %Ack(int %M.1, int %N.1) {
entry:
-; RUN: llvm-as < %s | opt -tailcallelim | llvm-dis | grep 'call int %foo'
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | grep 'call int %foo'
declare void %bar(int*)
int %foo(uint %N) {
; This function contains intervening instructions which should be moved out of the way
-; RUN: llvm-as < %s | opt -tailcallelim | llvm-dis | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | not grep call
int %Test(int %X) {
entry:
-; RUN: llvm-as < %s | opt -tailcallelim | llvm-dis | %prcontext alloca 1 | grep 'int %foo'
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | %prcontext alloca 1 | grep 'int %foo'
declare void %bar(int*)
int %foo() {
-; RUN: llvm-as < %s | opt -tailcallelim | llvm-dis | grep sub &&
-; RUN: llvm-as < %s | opt -tailcallelim | llvm-dis | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | grep sub &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | not grep call
int %test(int %X) {
%Y = sub int %X, 1
; Though this case seems to be fairly unlikely to occur in the wild, someone
; plunked it into the demo script, so maybe they care about it.
;
-; RUN: llvm-as < %s | opt -tailcallelim | llvm-dis | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | not grep call
int %aaa(int %c) {
entry:
; instruction into the terminating blocks because there was other code
; optimized out of the function after the taildup happened.
; XFAIL: *
-; RUN: llvm-as < %s | opt -tailcallelim | llvm-dis | not grep call
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | not grep call
int %t4(int %a) {
entry:
-; RUN: llvm-as < %s | opt -tailcallelim | llvm-dis | grep 'tail call void %foo'
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | grep 'tail call void %foo'
declare void %foo()
-; RUN: llvm-as < %s | opt -tailduplicate -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -disable-output
void %motion_result7() {
entry:
-; RUN: llvm-as < %s | opt -tailduplicate -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -disable-output
implementation
-; RUN: llvm-as < %s | opt -tailduplicate -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -disable-output
implementation
-; RUN: llvm-as < %s | opt -tailduplicate -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -disable-output
int %foo() {
entry:
-; RUN: llvm-as < %s | opt -tailduplicate -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -disable-output
void %interpret() {
entry:
-; RUN: llvm-as < %s | opt -tailduplicate | llvm-dis | grep add | not grep uses=1
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate | llvm-dis | grep add | not grep uses=1
int %test1(bool %C, int %A, int* %P) {
entry:
; This test checks to make sure phi nodes are updated properly
;
-; RUN: llvm-as < %s | opt -tailduplicate -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -disable-output
-; RUN: llvm-as < %s | opt -tailduplicate -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -disable-output
declare void %__main()
-; RUN: llvm-as < %s | opt -tailduplicate -disable-output
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -disable-output
void %ab() {
entry:
-; RUN: llvm-as < %s | opt -tailduplicate | llc -march=x86 | grep 'je ' &&
-; RUN: llvm-as < %s | opt -tailduplicate | llc -march=x86 | not grep jmp
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate | llc -march=x86 | grep 'je ' &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate | llc -march=x86 | not grep jmp
; This should have no unconditional jumps in it. The C source is:
;void foo(int c, int* P) {
; if (c & 8) P[3] = 1;
;}
+implementation
void %foo(int %c, int* %P) {
entry: