diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-09 06:41:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-09 06:41:03 +0000 |
commit | cb921e7b5771f74e8073ba6f7eeda8681dab9c26 (patch) | |
tree | 1a34ad2db45c75087e6ea8599a413544f0073597 /test/CodeGen/X86/SwitchLowering.ll | |
parent | 4a26cc4de63dc5eb02549a281a1c86347e59fb0b (diff) | |
download | llvm-cb921e7b5771f74e8073ba6f7eeda8681dab9c26.tar.gz llvm-cb921e7b5771f74e8073ba6f7eeda8681dab9c26.tar.bz2 llvm-cb921e7b5771f74e8073ba6f7eeda8681dab9c26.tar.xz |
move tests that depend on the x86 backend out of codegen/generic,
and remove a few old and unreduced ones. Fixes PR5624.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95656 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/SwitchLowering.ll')
-rw-r--r-- | test/CodeGen/X86/SwitchLowering.ll | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/CodeGen/X86/SwitchLowering.ll b/test/CodeGen/X86/SwitchLowering.ll new file mode 100644 index 0000000000..29a0e82bf5 --- /dev/null +++ b/test/CodeGen/X86/SwitchLowering.ll @@ -0,0 +1,28 @@ +; RUN: llc < %s -march=x86 | grep cmp | count 1 +; PR964 + +define i8* @FindChar(i8* %CurPtr) { +entry: + br label %bb + +bb: ; preds = %bb, %entry + %indvar = phi i32 [ 0, %entry ], [ %indvar.next, %bb ] ; <i32> [#uses=3] + %CurPtr_addr.0.rec = bitcast i32 %indvar to i32 ; <i32> [#uses=1] + %gep.upgrd.1 = zext i32 %indvar to i64 ; <i64> [#uses=1] + %CurPtr_addr.0 = getelementptr i8* %CurPtr, i64 %gep.upgrd.1 ; <i8*> [#uses=1] + %tmp = load i8* %CurPtr_addr.0 ; <i8> [#uses=3] + %tmp2.rec = add i32 %CurPtr_addr.0.rec, 1 ; <i32> [#uses=1] + %tmp2 = getelementptr i8* %CurPtr, i32 %tmp2.rec ; <i8*> [#uses=1] + %indvar.next = add i32 %indvar, 1 ; <i32> [#uses=1] + switch i8 %tmp, label %bb [ + i8 0, label %bb7 + i8 120, label %bb7 + ] + +bb7: ; preds = %bb, %bb + tail call void @foo( i8 %tmp ) + ret i8* %tmp2 +} + +declare void @foo(i8) + |