diff options
author | Bill Wendling <isanbard@gmail.com> | 2007-10-19 21:09:55 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2007-10-19 21:09:55 +0000 |
commit | 46329b72097fe55d565d8d05b3c07dfdde04bf8e (patch) | |
tree | 8205a201289b28b8c61e611af09d640a9979a73b /test/Transforms | |
parent | 3d6e9e2fabde4875e638fb27a89392f286a3013e (diff) | |
download | external_llvm-46329b72097fe55d565d8d05b3c07dfdde04bf8e.zip external_llvm-46329b72097fe55d565d8d05b3c07dfdde04bf8e.tar.gz external_llvm-46329b72097fe55d565d8d05b3c07dfdde04bf8e.tar.bz2 |
Don't branch fold inline asm statements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43191 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-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 0000000..8afdcae --- /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 +} |