mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-25 04:35:32 -04:00
3a6f6d93bf
`llc -march` is problematic because it only switches the target architecture, but leaves the operating system unchanged. This occasionally leads to indeterministic tests because the OS from LLVM_DEFAULT_TARGET_TRIPLE is used. However we can simply always use `llc -mtriple` instead. This changes all the tests to do this to avoid people using -march when they copy and paste parts of tests. See also the discussion in https://reviews.llvm.org/D35287 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309774 91177308-0d34-0410-b5e6-96231b3b80d8
80 lines
1.8 KiB
YAML
80 lines
1.8 KiB
YAML
# RUN: llc -mtriple=x86_64-- -verify-machineinstrs -run-pass block-placement -o - %s | FileCheck %s
|
|
# Check the conditional jump in bb.1 is changed to unconditional after block placement swaps bb.2 and bb.3.
|
|
|
|
--- |
|
|
@a = external global i16
|
|
@b = external global i32
|
|
|
|
declare void @dummy1()
|
|
declare void @dummy2()
|
|
declare void @dummy3()
|
|
|
|
; Function Attrs: nounwind
|
|
define void @f2() {
|
|
br i1 undef, label %bb1, label %bb3
|
|
|
|
bb1:
|
|
call void @dummy1()
|
|
call void @dummy1()
|
|
call void @dummy1()
|
|
br i1 undef, label %bb2, label %bb2
|
|
|
|
bb2:
|
|
call void @dummy2()
|
|
call void @dummy2()
|
|
call void @dummy2()
|
|
br label %bb4
|
|
|
|
bb3:
|
|
call void @dummy3()
|
|
call void @dummy3()
|
|
call void @dummy3()
|
|
br label %bb2
|
|
|
|
bb4:
|
|
ret void
|
|
}
|
|
|
|
|
|
...
|
|
---
|
|
# CHECK-LABEL: name: f2
|
|
# CHECK: bb.1:
|
|
# CHECK: JMP_1 %bb.2
|
|
# CHECK: bb.3:
|
|
# CHECK: bb.2:
|
|
name: f2
|
|
body: |
|
|
bb.0 (%ir-block.0):
|
|
successors: %bb.1(50), %bb.3(50)
|
|
|
|
JNE_1 %bb.1, implicit %eflags
|
|
JMP_1 %bb.3
|
|
bb.1:
|
|
successors: %bb.2(100)
|
|
|
|
CALL64pcrel32 @dummy1, csr_64, implicit %rsp, implicit-def %rsp
|
|
CALL64pcrel32 @dummy1, csr_64, implicit %rsp, implicit-def %rsp
|
|
CALL64pcrel32 @dummy1, csr_64, implicit %rsp, implicit-def %rsp
|
|
JNE_1 %bb.2, implicit %eflags
|
|
|
|
bb.2:
|
|
successors: %bb.4(100)
|
|
|
|
CALL64pcrel32 @dummy2, csr_64, implicit %rsp, implicit-def %rsp
|
|
CALL64pcrel32 @dummy2, csr_64, implicit %rsp, implicit-def %rsp
|
|
CALL64pcrel32 @dummy2, csr_64, implicit %rsp, implicit-def %rsp
|
|
JMP_1 %bb.4
|
|
|
|
bb.3:
|
|
successors: %bb.2(100)
|
|
CALL64pcrel32 @dummy3, csr_64, implicit %rsp, implicit-def %rsp
|
|
CALL64pcrel32 @dummy3, csr_64, implicit %rsp, implicit-def %rsp
|
|
CALL64pcrel32 @dummy3, csr_64, implicit %rsp, implicit-def %rsp
|
|
JMP_1 %bb.2
|
|
|
|
bb.4:
|
|
RETQ
|
|
|
|
...
|