CodeGen peephole: fold redundant phys reg copies
[oota-llvm.git] / test / CodeGen / X86 / 2008-03-14-SpillerCrash.ll
index 544c9b5819ece968ca20457590c204d15e701711..d484b45a576374db8ead90ce562c1073368f092a 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -mtriple=i386-pc-linux-gnu
+; RUN: llc < %s -mtriple=i386-pc-linux-gnu
 ; PR2138
 
        %struct.__locale_struct = type { [13 x %struct.locale_data*], i16*, i32*, i32*, [13 x i8*] }
@@ -6,12 +6,12 @@
        %struct.locale_data = type { i8*, i8*, i32, i32, { void (%struct.locale_data*)*, %struct.anon }, i32, i32, i32, [0 x %struct.locale_data_value] }
        %struct.locale_data_value = type { i32* }
 
-@wcstoll_l = alias i64 (i32*, i32**, i32, %struct.__locale_struct*)* @__wcstoll_l              ; <i64 (i32*, i32**, i32, %struct.__locale_struct*)*> [#uses=0]
+@wcstoll_l = alias i64 (i32*, i32**, i32, %struct.__locale_struct*), i64 (i32*, i32**, i32, %struct.__locale_struct*)* @__wcstoll_l
 
 define i64 @____wcstoll_l_internal(i32* %nptr, i32** %endptr, i32 %base, i32 %group, %struct.__locale_struct* %loc) nounwind  {
 entry:
-       %tmp27 = load i32* null, align 4                ; <i32> [#uses=1]
-       %tmp83 = getelementptr i32* %nptr, i32 1                ; <i32*> [#uses=1]
+       %tmp27 = load i32, i32* null, align 4           ; <i32> [#uses=1]
+       %tmp83 = getelementptr i32, i32* %nptr, i32 1           ; <i32*> [#uses=1]
        %tmp233 = add i32 0, -48                ; <i32> [#uses=1]
        br label %bb271.us
 bb271.us:              ; preds = %entry
@@ -31,8 +31,8 @@ bb374.outer:          ; preds = %bb311.split, %bb271.us
        %tmp373.reg2mem.0.ph = add i64 %tmp370371552.pn, %tmp369551.pn          ; <i64> [#uses=1]
        br label %bb374.us
 bb374.us:              ; preds = %bb314.us, %bb374.outer
-       %tmp376.us = getelementptr i32* %s.5.ph, i32 0          ; <i32*> [#uses=3]
-       %tmp378.us = load i32* %tmp376.us, align 4              ; <i32> [#uses=2]
+       %tmp376.us = getelementptr i32, i32* %s.5.ph, i32 0             ; <i32*> [#uses=3]
+       %tmp378.us = load i32, i32* %tmp376.us, align 4         ; <i32> [#uses=2]
        %tmp302.us = icmp eq i32* %tmp376.us, %tmp83            ; <i1> [#uses=1]
        %bothcond484.us = or i1 false, %tmp302.us               ; <i1> [#uses=1]
        br i1 %bothcond484.us, label %bb383, label %bb305.us
@@ -45,4 +45,6 @@ bb383:                ; preds = %bb374.us, %bb311.split
        ret i64 0
 }
 
-declare i64 @__wcstoll_l(i32*, i32**, i32, %struct.__locale_struct*) nounwind 
+define i64 @__wcstoll_l(i32*, i32**, i32, %struct.__locale_struct*) nounwind {
+  ret i64 0
+}