Similar to 806761a762.
For IR files without a target triple, -mtriple= specifies the full
target triple while -march= merely sets the architecture part of the
default target triple, leaving a target triple which may not make sense,
e.g. amdgpu-apple-darwin.
Therefore, -march= is error-prone and not recommended for tests without
a target triple. The issue has been benign as we recognize
$unknown-apple-darwin as ELF instead of rejecting it outrightly.
This patch changes AMDGPU tests to not rely on the default
OS/environment components. Tests that need fixes are not changed:
```
LLVM :: CodeGen/AMDGPU/fabs.f64.ll
LLVM :: CodeGen/AMDGPU/fabs.ll
LLVM :: CodeGen/AMDGPU/floor.ll
LLVM :: CodeGen/AMDGPU/fneg-fabs.f64.ll
LLVM :: CodeGen/AMDGPU/fneg-fabs.ll
LLVM :: CodeGen/AMDGPU/r600-infinite-loop-bug-while-reorganizing-vector.ll
LLVM :: CodeGen/AMDGPU/schedule-if-2.ll
```
39 lines
1.3 KiB
LLVM
39 lines
1.3 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=amdgcn -mcpu=kaveri -verify-machineinstrs < %s | FileCheck %s
|
|
|
|
define amdgpu_kernel void @test(i32 %arg, i32 %arg1) {
|
|
; CHECK-LABEL: test:
|
|
; CHECK: ; %bb.0: ; %bb
|
|
; CHECK-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x9
|
|
; CHECK-NEXT: s_waitcnt lgkmcnt(0)
|
|
; CHECK-NEXT: s_cmp_eq_u32 s0, 0
|
|
; CHECK-NEXT: s_cselect_b64 s[2:3], -1, 0
|
|
; CHECK-NEXT: s_cmp_eq_u32 s1, 0
|
|
; CHECK-NEXT: s_cselect_b64 s[0:1], -1, 0
|
|
; CHECK-NEXT: s_or_b64 s[0:1], s[2:3], s[0:1]
|
|
; CHECK-NEXT: s_and_b64 vcc, exec, s[0:1]
|
|
; CHECK-NEXT: s_cbranch_vccnz .LBB0_3
|
|
; CHECK-NEXT: ; %bb.1: ; %bb9
|
|
; CHECK-NEXT: s_and_b64 vcc, exec, 0
|
|
; CHECK-NEXT: .LBB0_2: ; %bb10
|
|
; CHECK-NEXT: ; =>This Inner Loop Header: Depth=1
|
|
; CHECK-NEXT: s_mov_b64 vcc, vcc
|
|
; CHECK-NEXT: s_cbranch_vccz .LBB0_2
|
|
; CHECK-NEXT: .LBB0_3: ; %DummyReturnBlock
|
|
; CHECK-NEXT: s_endpgm
|
|
bb:
|
|
%tmp = icmp ne i32 %arg, 0
|
|
%tmp7 = icmp ne i32 %arg1, 0
|
|
%tmp8 = and i1 %tmp, %tmp7
|
|
br i1 %tmp8, label %bb9, label %bb11
|
|
|
|
bb9: ; preds = %bb
|
|
br label %bb10
|
|
|
|
bb10: ; preds = %bb10, %bb9
|
|
br label %bb10
|
|
|
|
bb11: ; preds = %bb
|
|
ret void
|
|
}
|