1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll
Mehdi Amini fe32b980b3 Make the default triple optional by allowing an empty string
When building LLVM as a (potentially dynamic) library that can be linked against
by multiple compilers, the default triple is not really meaningful.
We allow to explicitely set it to an empty string when configuring LLVM.
In this case, said "target independent" tests in the test suite that are using
the default triple are disabled by matching the newly available feature
"default_triple".

Reviewers: probinson, echristo
Differential Revision: http://reviews.llvm.org/D12660

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247775
2015-09-16 05:34:32 +00:00

24 lines
768 B
LLVM

; RUN: opt < %s -O3 | llc -no-integrated-as | FileCheck %s
; REQUIRES: default_triple
;; We don't want branch folding to fold asm directives.
; CHECK: bork_directive
; CHECK: bork_directive
; CHECK-NOT: bork_directive
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
}