-; RUN: llvm-upgrade < %s | llvm-as | llc -relocation-model=pic -mtriple=i386-linux-gnu | not grep -F .text
-; RUN: llvm-upgrade < %s | llvm-as | llc -relocation-model=pic -mtriple=i686-apple-darwin | not grep lea
+; RUN: llvm-as < %s | llc -relocation-model=pic -mtriple=i386-linux-gnu | not grep -F .text
+; RUN: llvm-as < %s | llc -relocation-model=pic -mtriple=i686-apple-darwin | not grep lea
+; RUN: llvm-as < %s | llc -relocation-model=pic -mtriple=i686-apple-darwin | grep add | count 2
-implementation ; Functions:
+declare void @_Z3bari(i32)
-declare void %_Z3bari( int )
-
-linkonce void %_Z3fooILi1EEvi(int %Y) {
+define linkonce void @_Z3fooILi1EEvi(i32 %Y) {
entry:
- %Y_addr = alloca int ; <int*> [#uses=2]
- "alloca point" = cast int 0 to int ; <int> [#uses=0]
- store int %Y, int* %Y_addr
- %tmp = load int* %Y_addr ; <int> [#uses=1]
- switch int %tmp, label %bb10 [
- int 0, label %bb3
- int 1, label %bb
- int 2, label %bb
- int 3, label %bb
- int 4, label %bb
- int 5, label %bb
- int 6, label %bb
- int 7, label %bb
- int 8, label %bb
- int 9, label %bb
- int 10, label %bb
- int 12, label %bb1
- int 13, label %bb5
- int 14, label %bb6
- int 16, label %bb2
- int 17, label %bb4
- int 23, label %bb8
- int 27, label %bb7
- int 34, label %bb9
+ %Y_addr = alloca i32 ; <i32*> [#uses=2]
+ %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
+ store i32 %Y, i32* %Y_addr
+ %tmp = load i32* %Y_addr ; <i32> [#uses=1]
+ switch i32 %tmp, label %bb10 [
+ i32 0, label %bb3
+ i32 1, label %bb
+ i32 2, label %bb
+ i32 3, label %bb
+ i32 4, label %bb
+ i32 5, label %bb
+ i32 6, label %bb
+ i32 7, label %bb
+ i32 8, label %bb
+ i32 9, label %bb
+ i32 10, label %bb
+ i32 12, label %bb1
+ i32 13, label %bb5
+ i32 14, label %bb6
+ i32 16, label %bb2
+ i32 17, label %bb4
+ i32 23, label %bb8
+ i32 27, label %bb7
+ i32 34, label %bb9
]
bb: ; preds = %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry
br label %bb2
bb2: ; preds = %bb1, %entry
- call void %_Z3bari( int 1 )
+ call void @_Z3bari( i32 1 )
br label %bb11
bb3: ; preds = %entry
br label %bb6
bb6: ; preds = %bb5, %entry
- call void %_Z3bari( int 2 )
+ call void @_Z3bari( i32 2 )
br label %bb11
bb7: ; preds = %entry
br label %bb9
bb9: ; preds = %bb8, %entry
- call void %_Z3bari( int 3 )
+ call void @_Z3bari( i32 3 )
br label %bb11
bb10: ; preds = %entry