diff options
author | Tanya Lattner <tonic@nondot.org> | 2008-02-19 01:41:04 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2008-02-19 01:41:04 +0000 |
commit | 53a66d10f01ebfeac7b8e59ca677f2cf2d4a3b26 (patch) | |
tree | 896c6dee3a55f268ea98656237c7954799fd8ec7 /test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll | |
parent | efec751a1b786724862ceff52748df94873a807e (diff) | |
download | external_llvm-53a66d10f01ebfeac7b8e59ca677f2cf2d4a3b26.zip external_llvm-53a66d10f01ebfeac7b8e59ca677f2cf2d4a3b26.tar.gz external_llvm-53a66d10f01ebfeac7b8e59ca677f2cf2d4a3b26.tar.bz2 |
Remove llvm-upgrade and update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47296 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll')
-rw-r--r-- | test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll | 49 |
1 files changed, 19 insertions, 30 deletions
diff --git a/test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll b/test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll index 61d802c..41c90bd 100644 --- a/test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll +++ b/test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade %s | llvm-as | llc +; RUN: llvm-as < %s | llc ;; Date: May 28, 2003. ;; From: test/Programs/External/SPEC/CINT2000/254.gap.llvm.bc @@ -16,35 +16,24 @@ ;; The next instruction contributes a leading non-zero so another ;; zero should not be added before it! ;; + %FileType = type { i32, [256 x i8], i32, i32, i32, i32 } +@OutputFiles = external global [16 x %FileType] ; <[16 x %FileType]*> [#uses=1] +@Output = internal global %FileType* null ; <%FileType**> [#uses=1] - -%FileType = type { int, [256 x sbyte], int, int, int, int } -%OutputFiles = uninitialized global [16 x %FileType] -%Output = internal global %FileType* null - - -implementation; Functions: - -internal int %OpenOutput(sbyte* %filename.1) { +define internal i32 @OpenOutput(i8* %filename.1) { entry: - %tmp.0 = load %FileType** %Output - %tmp.4 = getelementptr %FileType* %tmp.0, long 1 - - ;;------ Original instruction in 254.gap.llvm.bc: - ;; %tmp.10 = seteq { int, [256 x sbyte], int, int, int, int }* %tmp.4, getelementptr ([16 x { int, [256 x sbyte], int, int, int, int }]* getelementptr ([16 x { int, [256 x sbyte], int, int, int, int }]* %OutputFiles, long 1), long 0, long 0) - - ;;------ Code sequence produced by preselection phase for above instr: - ;; This code sequence is folded incorrectly by llc during selection - ;; causing an assertion about a dynamic casting error. - %addrOfGlobal = getelementptr [16 x %FileType]* %OutputFiles, long 0 - %constantGEP = getelementptr [16 x %FileType]* %addrOfGlobal, long 1 - %constantGEP = getelementptr [16 x %FileType]* %constantGEP, long 0, long 0 - %tmp.10 = seteq %FileType* %tmp.4, %constantGEP - br bool %tmp.10, label %return, label %endif.0 - -endif.0: - ret int 0 - -return: - ret int 1 + %tmp.0 = load %FileType** @Output ; <%FileType*> [#uses=1] + %tmp.4 = getelementptr %FileType* %tmp.0, i64 1 ; <%FileType*> [#uses=1] + %addrOfGlobal = getelementptr [16 x %FileType]* @OutputFiles, i64 0 ; <[16 x %FileType]*> [#uses=1] + %constantGEP = getelementptr [16 x %FileType]* %addrOfGlobal, i64 1 ; <[16 x %FileType]*> [#uses=1] + %constantGEP.upgrd.1 = getelementptr [16 x %FileType]* %constantGEP, i64 0, i64 0 ; <%FileType*> [#uses=1] + %tmp.10 = icmp eq %FileType* %tmp.4, %constantGEP.upgrd.1 ; <i1> [#uses=1] + br i1 %tmp.10, label %return, label %endif.0 + +endif.0: ; preds = %entry + ret i32 0 + +return: ; preds = %entry + ret i32 1 } + |