Similar to 806761a7629df268c8aed49657aeccffa6bca449. 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 ```
62 lines
3.2 KiB
YAML
62 lines
3.2 KiB
YAML
# RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -mattr=-xnack -verify-machineinstrs -run-pass post-RA-hazard-rec -o - %s | FileCheck -check-prefix=GCN %s
|
|
|
|
# GCN-LABEL: name: hazard_image_sample_d_buf_off6
|
|
# GCN: IMAGE_SAMPLE
|
|
# GCN-NEXT: S_NOP 0
|
|
# GCN-NEXT: BUFFER_LOAD_DWORD_OFFSET
|
|
---
|
|
name: hazard_image_sample_d_buf_off6
|
|
body: |
|
|
bb.0:
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = IMAGE_SAMPLE_D_V4_V9_nsa_gfx10 undef $vgpr3, undef $vgpr8, undef $vgpr7, undef $vgpr5, undef $vgpr4, undef $vgpr6, undef $vgpr0, undef $vgpr2, undef $vgpr2, undef $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, undef $sgpr8_sgpr9_sgpr10_sgpr11, 15, 2, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (load (s128))
|
|
$vgpr1 = BUFFER_LOAD_DWORD_OFFSET undef $sgpr0_sgpr1_sgpr2_sgpr3, undef $sgpr4, 6, 0, 0, implicit $exec
|
|
...
|
|
|
|
# GCN-LABEL: name: no_hazard_image_sample_d_buf_off1
|
|
# GCN: IMAGE_SAMPLE
|
|
# GCN-NEXT: BUFFER_LOAD_DWORD_OFFSET
|
|
---
|
|
name: no_hazard_image_sample_d_buf_off1
|
|
body: |
|
|
bb.0:
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = IMAGE_SAMPLE_D_V4_V9_nsa_gfx10 undef $vgpr3, undef $vgpr8, undef $vgpr7, undef $vgpr5, undef $vgpr4, undef $vgpr6, undef $vgpr0, undef $vgpr2, undef $vgpr2, undef $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, undef $sgpr8_sgpr9_sgpr10_sgpr11, 15, 2, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (load (s128))
|
|
$vgpr1 = BUFFER_LOAD_DWORD_OFFSET undef $sgpr0_sgpr1_sgpr2_sgpr3, undef $sgpr4, 1, 0, 0, implicit $exec
|
|
...
|
|
|
|
# GCN-LABEL: name: no_hazard_image_sample_d_buf_far
|
|
# GCN: IMAGE_SAMPLE
|
|
# GCN-NEXT: V_NOP_e32
|
|
# GCN-NEXT: BUFFER_LOAD_DWORD_OFFSET
|
|
---
|
|
name: no_hazard_image_sample_d_buf_far
|
|
body: |
|
|
bb.0:
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = IMAGE_SAMPLE_D_V4_V9_nsa_gfx10 undef $vgpr3, undef $vgpr8, undef $vgpr7, undef $vgpr5, undef $vgpr4, undef $vgpr6, undef $vgpr0, undef $vgpr2, undef $vgpr2, undef $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, undef $sgpr8_sgpr9_sgpr10_sgpr11, 15, 2, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (load (s128))
|
|
V_NOP_e32 implicit $exec
|
|
$vgpr1 = BUFFER_LOAD_DWORD_OFFSET undef $sgpr0_sgpr1_sgpr2_sgpr3, undef $sgpr4, 6, 0, 0, implicit $exec
|
|
...
|
|
|
|
# Non-NSA
|
|
# GCN-LABEL: name: no_hazard_image_sample_v4_v2_buf_off6
|
|
# GCN: IMAGE_SAMPLE
|
|
# GCN-NEXT: BUFFER_LOAD_DWORD_OFFSET
|
|
---
|
|
name: no_hazard_image_sample_v4_v2_buf_off6
|
|
body: |
|
|
bb.0:
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = IMAGE_SAMPLE_V4_V2_gfx10 undef $vgpr1_vgpr2, undef $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, undef $sgpr8_sgpr9_sgpr10_sgpr11, 15, 1, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (load (s128))
|
|
$vgpr1 = BUFFER_LOAD_DWORD_OFFSET undef $sgpr0_sgpr1_sgpr2_sgpr3, undef $sgpr4, 6, 0, 0, implicit $exec
|
|
...
|
|
|
|
# Less than 4 dwords
|
|
# GCN-LABEL: name: no_hazard_image_sample_v4_v3_buf_off6
|
|
# GCN: IMAGE_SAMPLE
|
|
# GCN-NEXT: BUFFER_LOAD_DWORD_OFFSET
|
|
---
|
|
name: no_hazard_image_sample_v4_v3_buf_off6
|
|
body: |
|
|
bb.0:
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = IMAGE_SAMPLE_V4_V3_nsa_gfx10 undef $vgpr1, undef $vgpr2, undef $vgpr0, undef $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, undef $sgpr8_sgpr9_sgpr10_sgpr11, 15, 2, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (load (s128))
|
|
$vgpr1 = BUFFER_LOAD_DWORD_OFFSET undef $sgpr0_sgpr1_sgpr2_sgpr3, undef $sgpr4, 6, 0, 0, implicit $exec
|
|
...
|