2019-03-06 02:38:00 +08:00
|
|
|
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
2018-08-31 13:49:54 +08:00
|
|
|
# RUN: llc -mtriple=amdgcn-amd-amdhsa -run-pass=si-lower-control-flow -verify-machineinstrs %s -o - | FileCheck -check-prefixes=GCN %s
|
2018-06-12 08:41:26 +08:00
|
|
|
|
|
|
|
# Check that assert is not triggered
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: si-lower-control-flow
|
|
|
|
body: |
|
|
|
|
bb.0:
|
2019-03-06 02:38:00 +08:00
|
|
|
; GCN-LABEL: name: si-lower-control-flow
|
|
|
|
; GCN: [[COPY:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
|
|
|
|
; GCN: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 16, 0
|
|
|
|
; GCN: [[S_AND_B32_:%[0-9]+]]:sreg_32_xm0 = S_AND_B32 [[S_LOAD_DWORD_IMM]], 255, implicit-def $scc
|
|
|
|
; GCN: [[S_AND_B32_1:%[0-9]+]]:sreg_32_xm0 = S_AND_B32 65535, [[S_AND_B32_]], implicit-def $scc
|
[AMDGPU] Add support for immediate operand for S_ENDPGM
Summary:
Add support for immediate operand in S_ENDPGM
Change-Id: I0c56a076a10980f719fb2a8f16407e9c301013f6
Reviewers: alexshap
Subscribers: qcolombet, arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, eraman, arphaman, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59213
llvm-svn: 355902
2019-03-12 17:52:58 +08:00
|
|
|
; GCN: S_ENDPGM 0
|
2018-06-12 08:41:26 +08:00
|
|
|
%0:sgpr_64 = COPY $sgpr4_sgpr5
|
2019-05-01 06:08:23 +08:00
|
|
|
%1:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM %0, 16, 0, 0
|
2018-06-12 08:41:26 +08:00
|
|
|
%2:sreg_32_xm0 = S_AND_B32 %1, 255, implicit-def $scc
|
|
|
|
%3:sreg_32_xm0 = S_AND_B32 65535, %2, implicit-def $scc
|
[AMDGPU] Add support for immediate operand for S_ENDPGM
Summary:
Add support for immediate operand in S_ENDPGM
Change-Id: I0c56a076a10980f719fb2a8f16407e9c301013f6
Reviewers: alexshap
Subscribers: qcolombet, arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, eraman, arphaman, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59213
llvm-svn: 355902
2019-03-12 17:52:58 +08:00
|
|
|
S_ENDPGM 0
|
2018-06-12 08:41:26 +08:00
|
|
|
...
|
2019-03-06 02:38:00 +08:00
|
|
|
|
|
|
|
---
|
|
|
|
name: preserve_undef_flag_si_if_src
|
|
|
|
tracksRegLiveness: true
|
|
|
|
body: |
|
|
|
|
; GCN-LABEL: name: preserve_undef_flag_si_if_src
|
|
|
|
; GCN: bb.0:
|
|
|
|
; GCN: successors: %bb.1(0x40000000), %bb.2(0x40000000)
|
|
|
|
; GCN: [[COPY:%[0-9]+]]:sreg_64 = COPY $exec, implicit-def $exec
|
|
|
|
; GCN: [[S_AND_B64_:%[0-9]+]]:sreg_64 = S_AND_B64 [[COPY]], undef %1:sreg_64, implicit-def dead $scc
|
|
|
|
; GCN: [[S_XOR_B64_:%[0-9]+]]:sreg_64 = S_XOR_B64 [[S_AND_B64_]], [[COPY]], implicit-def dead $scc
|
|
|
|
; GCN: $exec = S_MOV_B64_term killed [[S_AND_B64_]]
|
|
|
|
; GCN: SI_MASK_BRANCH %bb.2, implicit $exec
|
|
|
|
; GCN: S_BRANCH %bb.1
|
|
|
|
; GCN: bb.1:
|
|
|
|
; GCN: successors: %bb.2(0x80000000)
|
|
|
|
; GCN: bb.2:
|
[AMDGPU] Add support for immediate operand for S_ENDPGM
Summary:
Add support for immediate operand in S_ENDPGM
Change-Id: I0c56a076a10980f719fb2a8f16407e9c301013f6
Reviewers: alexshap
Subscribers: qcolombet, arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, eraman, arphaman, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59213
llvm-svn: 355902
2019-03-12 17:52:58 +08:00
|
|
|
; GCN: S_ENDPGM 0
|
2019-03-06 02:38:00 +08:00
|
|
|
bb.0:
|
|
|
|
successors: %bb.1, %bb.2
|
|
|
|
|
|
|
|
%1:sreg_64 = SI_IF undef %0:sreg_64, %bb.2, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
|
|
|
|
S_BRANCH %bb.1
|
|
|
|
|
|
|
|
bb.1:
|
|
|
|
successors: %bb.2
|
|
|
|
|
|
|
|
bb.2:
|
[AMDGPU] Add support for immediate operand for S_ENDPGM
Summary:
Add support for immediate operand in S_ENDPGM
Change-Id: I0c56a076a10980f719fb2a8f16407e9c301013f6
Reviewers: alexshap
Subscribers: qcolombet, arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, eraman, arphaman, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59213
llvm-svn: 355902
2019-03-12 17:52:58 +08:00
|
|
|
S_ENDPGM 0
|
2019-03-06 02:38:00 +08:00
|
|
|
|
|
|
|
...
|