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/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll | |
download | src-test2-009b1c42aa6266385f2c37e227516b24077e6dd7.tar.gz src-test2-009b1c42aa6266385f2c37e227516b24077e6dd7.zip |
Notes
Diffstat (limited to 'test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll')
-rw-r--r-- | test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll b/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll new file mode 100644 index 000000000000..8afdcae50ae9 --- /dev/null +++ b/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll @@ -0,0 +1,18 @@ +; RUN: llvm-as < %s | opt -std-compile-opts -o - | llc -o - | grep bork_directive | wc -l | grep 2 + +;; We don't want branch folding to fold asm directives. + +define void @bork(i32 %param) { +entry: + %tmp = icmp eq i32 %param, 0 + br i1 %tmp, label %cond_true, label %cond_false + +cond_true: + call void asm sideeffect ".bork_directive /* ${0:c}:${1:c} */", "i,i,~{dirflag},~{fpsr},~{flags}"( i32 37, i32 927 ) + ret void + +cond_false: + call void asm sideeffect ".foo_directive ${0:c}:${1:c}", "i,i,~{dirflag},~{fpsr},~{flags}"( i32 37, i32 927 ) + call void asm sideeffect ".bork_directive /* ${0:c}:${1:c} */", "i,i,~{dirflag},~{fpsr},~{flags}"( i32 37, i32 927 ) + ret void +} |