
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 ```
148 lines
3.9 KiB
YAML
148 lines
3.9 KiB
YAML
# RUN: llc -mtriple=amdgcn -verify-machineinstrs -run-pass si-optimize-exec-masking %s -o - | FileCheck -check-prefix=GCN %s
|
|
|
|
---
|
|
# GCN-LABEL: name: reduce_and_saveexec
|
|
# GCN: $exec = S_AND_B64 $exec, killed $vcc
|
|
# GCN-NEXT: S_ENDPGM 0
|
|
name: reduce_and_saveexec
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
$vcc = IMPLICIT_DEF
|
|
$sgpr0_sgpr1 = S_AND_B64 $exec, killed $vcc, implicit-def $scc
|
|
$exec = COPY killed $sgpr0_sgpr1
|
|
S_ENDPGM 0
|
|
...
|
|
---
|
|
# GCN-LABEL: name: reduce_and_saveexec_commuted
|
|
# GCN: $exec = S_AND_B64 killed $vcc, $exec
|
|
# GCN-NEXT: S_ENDPGM 0
|
|
name: reduce_and_saveexec_commuted
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
$vcc = IMPLICIT_DEF
|
|
$sgpr0_sgpr1 = S_AND_B64 killed $vcc, $exec, implicit-def $scc
|
|
$exec = COPY killed $sgpr0_sgpr1
|
|
S_ENDPGM 0
|
|
...
|
|
---
|
|
# GCN-LABEL: name: reduce_and_saveexec_liveout
|
|
# GCN: $sgpr0_sgpr1 = S_AND_B64 $exec, killed $vcc
|
|
# GCN-NEXT: $exec = COPY
|
|
name: reduce_and_saveexec_liveout
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
$vcc = IMPLICIT_DEF
|
|
$sgpr0_sgpr1 = S_AND_B64 $exec, killed $vcc, implicit-def $scc
|
|
$exec = COPY $sgpr0_sgpr1
|
|
S_ENDPGM 0
|
|
...
|
|
---
|
|
# GCN-LABEL: name: and_saveexec
|
|
# GCN: $sgpr0_sgpr1 = S_AND_SAVEEXEC_B64 $vcc
|
|
# GCN-NEXT: S_ENDPGM 0
|
|
name: and_saveexec
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
$vcc = IMPLICIT_DEF
|
|
$sgpr0_sgpr1 = COPY $exec
|
|
$sgpr2_sgpr3 = S_AND_B64 $sgpr0_sgpr1, killed $vcc, implicit-def $scc
|
|
$exec = S_MOV_B64_term $sgpr2_sgpr3
|
|
S_ENDPGM 0
|
|
...
|
|
---
|
|
# GCN-LABEL: name: reduce_or_saveexec
|
|
# GCN: $exec = S_OR_B64 $exec, killed $vcc
|
|
# GCN-NEXT: S_ENDPGM 0
|
|
name: reduce_or_saveexec
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
$vcc = IMPLICIT_DEF
|
|
$sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
|
|
$exec = COPY killed $sgpr0_sgpr1
|
|
S_ENDPGM 0
|
|
...
|
|
---
|
|
# GCN-LABEL: name: reduce_xor_saveexec
|
|
# GCN: $exec = S_XOR_B64 $exec, killed $vcc
|
|
# GCN-NEXT: S_ENDPGM 0
|
|
name: reduce_xor_saveexec
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
$vcc = IMPLICIT_DEF
|
|
$sgpr0_sgpr1 = S_XOR_B64 $exec, killed $vcc, implicit-def $scc
|
|
$exec = COPY killed $sgpr0_sgpr1
|
|
S_ENDPGM 0
|
|
...
|
|
---
|
|
# GCN-LABEL: name: reduce_andn2_saveexec
|
|
# GCN: $exec = S_ANDN2_B64 $exec, killed $vcc
|
|
# GCN-NEXT: S_ENDPGM 0
|
|
name: reduce_andn2_saveexec
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
$vcc = IMPLICIT_DEF
|
|
$sgpr0_sgpr1 = S_ANDN2_B64 $exec, killed $vcc, implicit-def $scc
|
|
$exec = COPY killed $sgpr0_sgpr1
|
|
S_ENDPGM 0
|
|
...
|
|
---
|
|
# GCN-LABEL: name: reduce_orn2_saveexec
|
|
# GCN: $exec = S_ORN2_B64 $exec, killed $vcc
|
|
# GCN-NEXT: S_ENDPGM 0
|
|
name: reduce_orn2_saveexec
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
$vcc = IMPLICIT_DEF
|
|
$sgpr0_sgpr1 = S_ORN2_B64 $exec, killed $vcc, implicit-def $scc
|
|
$exec = COPY killed $sgpr0_sgpr1
|
|
S_ENDPGM 0
|
|
...
|
|
---
|
|
# GCN-LABEL: name: reduce_nand_saveexec
|
|
# GCN: $exec = S_NAND_B64 $exec, killed $vcc
|
|
# GCN-NEXT: S_ENDPGM 0
|
|
name: reduce_nand_saveexec
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
$vcc = IMPLICIT_DEF
|
|
$sgpr0_sgpr1 = S_NAND_B64 $exec, killed $vcc, implicit-def $scc
|
|
$exec = COPY killed $sgpr0_sgpr1
|
|
S_ENDPGM 0
|
|
...
|
|
---
|
|
# GCN-LABEL: name: reduce_nor_saveexec
|
|
# GCN: $exec = S_NOR_B64 $exec, killed $vcc
|
|
# GCN-NEXT: S_ENDPGM 0
|
|
name: reduce_nor_saveexec
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
$vcc = IMPLICIT_DEF
|
|
$sgpr0_sgpr1 = S_NOR_B64 $exec, killed $vcc, implicit-def $scc
|
|
$exec = COPY killed $sgpr0_sgpr1
|
|
S_ENDPGM 0
|
|
...
|
|
---
|
|
# GCN-LABEL: name: reduce_xnor_saveexec
|
|
# GCN: $exec = S_XNOR_B64 $exec, killed $vcc
|
|
# GCN-NEXT: S_ENDPGM 0
|
|
name: reduce_xnor_saveexec
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
$vcc = IMPLICIT_DEF
|
|
$sgpr0_sgpr1 = S_XNOR_B64 $exec, killed $vcc, implicit-def $scc
|
|
$exec = COPY killed $sgpr0_sgpr1
|
|
S_ENDPGM 0
|
|
...
|
|
---
|