diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-06-02 17:52:33 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-02 17:52:33 +0000 |
commit | 009b1c42aa6266385f2c37e227516b24077e6dd7 (patch) | |
tree | 64ba909838c23261cace781ece27d106134ea451 /test/CodeGen/X86/cmp-test.ll | |
download | src-test2-009b1c42aa6266385f2c37e227516b24077e6dd7.tar.gz src-test2-009b1c42aa6266385f2c37e227516b24077e6dd7.zip |
Notes
Diffstat (limited to 'test/CodeGen/X86/cmp-test.ll')
-rw-r--r-- | test/CodeGen/X86/cmp-test.ll | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/CodeGen/X86/cmp-test.ll b/test/CodeGen/X86/cmp-test.ll new file mode 100644 index 000000000000..91c8a87ea541 --- /dev/null +++ b/test/CodeGen/X86/cmp-test.ll @@ -0,0 +1,27 @@ +; RUN: llvm-as < %s | llc -march=x86 | grep cmp | count 1 +; RUN: llvm-as < %s | llc -march=x86 | grep test | count 1 + +define i32 @f1(i32 %X, i32* %y) { + %tmp = load i32* %y ; <i32> [#uses=1] + %tmp.upgrd.1 = icmp eq i32 %tmp, 0 ; <i1> [#uses=1] + br i1 %tmp.upgrd.1, label %ReturnBlock, label %cond_true + +cond_true: ; preds = %0 + ret i32 1 + +ReturnBlock: ; preds = %0 + ret i32 0 +} + +define i32 @f2(i32 %X, i32* %y) { + %tmp = load i32* %y ; <i32> [#uses=1] + %tmp1 = shl i32 %tmp, 3 ; <i32> [#uses=1] + %tmp1.upgrd.2 = icmp eq i32 %tmp1, 0 ; <i1> [#uses=1] + br i1 %tmp1.upgrd.2, label %ReturnBlock, label %cond_true + +cond_true: ; preds = %0 + ret i32 1 + +ReturnBlock: ; preds = %0 + ret i32 0 +} |