2017-06-22 14:26:41 +08:00
|
|
|
# RUN: llc -march=amdgcn -mcpu=fiji -start-before si-peephole-sdwa -o - %s | FileCheck -check-prefix=VI -check-prefix=GCN %s
|
|
|
|
# RUN: llc -march=amdgcn -mcpu=gfx900 -start-before si-peephole-sdwa -o - %s | FileCheck -check-prefix=GFX9 -check-prefix=GCN %s
|
2017-05-31 00:49:24 +08:00
|
|
|
|
|
|
|
# GCN-LABEL: {{^}}sdwa_imm_operand:
|
|
|
|
# GCN: v_mov_b32_e32 v[[SHIFT:[0-9]+]], 2
|
|
|
|
# GCN-NOT: v_mov_b32_e32 v{{[0-9]+}}, 2
|
|
|
|
# GCN: BB0_1:
|
|
|
|
# GCN: v_lshlrev_b32_sdwa v{{[0-9]+}}, v[[SHIFT]], v{{[0-9]+}} dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:BYTE_1
|
|
|
|
# GCN: v_lshlrev_b32_sdwa v{{[0-9]+}}, v[[SHIFT]], v{{[0-9]+}} dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:BYTE_1
|
|
|
|
|
|
|
|
# GCN-LABEL: {{^}}sdwa_sgpr_operand:
|
2017-06-22 14:26:41 +08:00
|
|
|
# VI: v_mov_b32_e32 v[[SHIFT:[0-9]+]], 2
|
|
|
|
# VI-NOT: v_mov_b32_e32 v{{[0-9]+}}, 2
|
|
|
|
# VI: BB1_1:
|
|
|
|
# VI: v_lshlrev_b32_sdwa v{{[0-9]+}}, v[[SHIFT]], v{{[0-9]+}} dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:BYTE_1
|
|
|
|
# VI: v_lshlrev_b32_sdwa v{{[0-9]+}}, v[[SHIFT]], v{{[0-9]+}} dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:BYTE_1
|
|
|
|
|
|
|
|
# GFX9: s_mov_b32 s[[SHIFT:[0-9]+]], 2
|
|
|
|
# GFX9-NOT: v_mov_b32_e32 v{{[0-9]+}}, 2
|
|
|
|
# GFX9: BB1_1:
|
|
|
|
# GFX9: v_lshlrev_b32_sdwa v{{[0-9]+}}, s[[SHIFT]], v{{[0-9]+}} dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:BYTE_1
|
|
|
|
# GFX9: v_lshlrev_b32_sdwa v{{[0-9]+}}, s[[SHIFT]], v{{[0-9]+}} dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:BYTE_1
|
2017-05-31 00:49:24 +08:00
|
|
|
|
|
|
|
--- |
|
|
|
|
; ModuleID = 'sdwa-scalar-ops.opt.ll'
|
|
|
|
source_filename = "sdwa-scalar-ops.opt.ll"
|
|
|
|
target datalayout = "e-p:32:32-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
|
|
|
|
|
|
|
|
define amdgpu_kernel void @sdwa_imm_operand(i32 addrspace(1)* nocapture %arg) {
|
|
|
|
bb:
|
|
|
|
br label %bb2
|
|
|
|
|
|
|
|
bb1: ; preds = %bb2
|
|
|
|
ret void
|
|
|
|
|
|
|
|
bb2: ; preds = %bb2, %bb
|
|
|
|
%lsr.iv = phi i64 [ %lsr.iv.next, %bb2 ], [ 0, %bb ]
|
|
|
|
%bc = bitcast i32 addrspace(1)* %arg to i8 addrspace(1)*
|
|
|
|
%uglygep4 = getelementptr i8, i8 addrspace(1)* %bc, i64 %lsr.iv
|
|
|
|
%uglygep45 = bitcast i8 addrspace(1)* %uglygep4 to i32 addrspace(1)*
|
|
|
|
%tmp5 = load i32, i32 addrspace(1)* %uglygep45, align 4
|
|
|
|
%tmp6 = lshr i32 %tmp5, 8
|
|
|
|
%tmp7 = and i32 %tmp6, 255
|
|
|
|
%tmp8 = zext i32 %tmp7 to i64
|
|
|
|
%tmp9 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 %tmp8
|
|
|
|
store i32 1, i32 addrspace(1)* %tmp9, align 4
|
|
|
|
%scevgep = getelementptr i32, i32 addrspace(1)* %uglygep45, i64 1
|
|
|
|
%tmp13 = load i32, i32 addrspace(1)* %scevgep, align 4
|
|
|
|
%tmp14 = lshr i32 %tmp13, 8
|
|
|
|
%tmp15 = and i32 %tmp14, 255
|
|
|
|
%tmp16 = zext i32 %tmp15 to i64
|
|
|
|
%tmp17 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 %tmp16
|
|
|
|
store i32 1, i32 addrspace(1)* %tmp17, align 4
|
|
|
|
%lsr.iv.next = add nuw nsw i64 %lsr.iv, 8
|
|
|
|
%tmp1 = trunc i64 %lsr.iv.next to i32
|
|
|
|
%tmp19 = icmp eq i32 %tmp1, 4096
|
|
|
|
br i1 %tmp19, label %bb1, label %bb2
|
|
|
|
}
|
|
|
|
|
|
|
|
define amdgpu_kernel void @sdwa_sgpr_operand(i32 addrspace(1)* nocapture %arg) {
|
|
|
|
bb:
|
|
|
|
br label %bb2
|
|
|
|
|
|
|
|
bb1: ; preds = %bb2
|
|
|
|
ret void
|
|
|
|
|
|
|
|
bb2: ; preds = %bb2, %bb
|
|
|
|
%lsr.iv = phi i64 [ %lsr.iv.next, %bb2 ], [ 0, %bb ]
|
|
|
|
%bc = bitcast i32 addrspace(1)* %arg to i8 addrspace(1)*
|
|
|
|
%uglygep4 = getelementptr i8, i8 addrspace(1)* %bc, i64 %lsr.iv
|
|
|
|
%uglygep45 = bitcast i8 addrspace(1)* %uglygep4 to i32 addrspace(1)*
|
|
|
|
%tmp5 = load i32, i32 addrspace(1)* %uglygep45, align 4
|
|
|
|
%tmp6 = lshr i32 %tmp5, 8
|
|
|
|
%tmp7 = and i32 %tmp6, 255
|
|
|
|
%tmp8 = zext i32 %tmp7 to i64
|
|
|
|
%tmp9 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 %tmp8
|
|
|
|
store i32 1, i32 addrspace(1)* %tmp9, align 4
|
|
|
|
%scevgep = getelementptr i32, i32 addrspace(1)* %uglygep45, i64 1
|
|
|
|
%tmp13 = load i32, i32 addrspace(1)* %scevgep, align 4
|
|
|
|
%tmp14 = lshr i32 %tmp13, 8
|
|
|
|
%tmp15 = and i32 %tmp14, 255
|
|
|
|
%tmp16 = zext i32 %tmp15 to i64
|
|
|
|
%tmp17 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 %tmp16
|
|
|
|
store i32 1, i32 addrspace(1)* %tmp17, align 4
|
|
|
|
%lsr.iv.next = add nuw nsw i64 %lsr.iv, 8
|
|
|
|
%tmp1 = trunc i64 %lsr.iv.next to i32
|
|
|
|
%tmp19 = icmp eq i32 %tmp1, 4096
|
|
|
|
br i1 %tmp19, label %bb1, label %bb2
|
|
|
|
}
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: sdwa_imm_operand
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 1
|
2017-05-31 00:49:24 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: sreg_64 }
|
|
|
|
- { id: 1, class: sreg_64 }
|
|
|
|
- { id: 2, class: vgpr_32 }
|
|
|
|
- { id: 3, class: sgpr_128 }
|
|
|
|
- { id: 4, class: sgpr_64 }
|
|
|
|
- { id: 5, class: sreg_32_xm0 }
|
|
|
|
- { id: 6, class: sgpr_32 }
|
|
|
|
- { id: 7, class: sreg_64 }
|
|
|
|
- { id: 8, class: sreg_64 }
|
|
|
|
- { id: 9, class: sreg_64_xexec }
|
|
|
|
- { id: 10, class: sreg_32_xm0 }
|
|
|
|
- { id: 11, class: sreg_32_xm0 }
|
|
|
|
- { id: 12, class: sreg_32_xm0 }
|
|
|
|
- { id: 13, class: sreg_32_xm0 }
|
|
|
|
- { id: 14, class: sreg_32_xm0 }
|
|
|
|
- { id: 15, class: sreg_32_xm0 }
|
|
|
|
- { id: 16, class: sreg_64 }
|
|
|
|
- { id: 17, class: vgpr_32 }
|
|
|
|
- { id: 18, class: vreg_64 }
|
|
|
|
- { id: 19, class: sreg_32_xm0 }
|
|
|
|
- { id: 20, class: sreg_32 }
|
|
|
|
- { id: 21, class: sreg_32_xm0 }
|
|
|
|
- { id: 22, class: sreg_32_xm0 }
|
|
|
|
- { id: 23, class: sreg_32_xm0 }
|
|
|
|
- { id: 24, class: sreg_64 }
|
|
|
|
- { id: 25, class: sreg_32_xm0 }
|
|
|
|
- { id: 26, class: sreg_32_xm0 }
|
|
|
|
- { id: 27, class: sreg_32_xm0 }
|
|
|
|
- { id: 28, class: sreg_32_xm0 }
|
|
|
|
- { id: 29, class: sreg_64 }
|
|
|
|
- { id: 30, class: vgpr_32 }
|
|
|
|
- { id: 31, class: vreg_64 }
|
|
|
|
- { id: 32, class: sreg_32_xm0 }
|
|
|
|
- { id: 33, class: sreg_32_xm0 }
|
|
|
|
- { id: 34, class: sreg_64 }
|
|
|
|
- { id: 35, class: sreg_32_xm0 }
|
|
|
|
- { id: 36, class: sreg_32_xm0 }
|
|
|
|
- { id: 37, class: sreg_32_xm0 }
|
|
|
|
- { id: 38, class: sreg_32_xm0 }
|
|
|
|
- { id: 39, class: vreg_64 }
|
|
|
|
- { id: 40, class: vgpr_32 }
|
|
|
|
- { id: 41, class: vreg_64 }
|
|
|
|
- { id: 42, class: sreg_32_xm0 }
|
|
|
|
- { id: 43, class: sreg_32 }
|
|
|
|
- { id: 44, class: sreg_32_xm0 }
|
|
|
|
- { id: 45, class: sreg_64 }
|
|
|
|
- { id: 46, class: sreg_32_xm0 }
|
|
|
|
- { id: 47, class: sreg_32_xm0 }
|
|
|
|
- { id: 48, class: sreg_32_xm0 }
|
|
|
|
- { id: 49, class: sreg_32_xm0 }
|
|
|
|
- { id: 50, class: sreg_64 }
|
|
|
|
- { id: 51, class: vreg_64 }
|
|
|
|
- { id: 52, class: sreg_64 }
|
|
|
|
- { id: 53, class: sreg_32_xm0 }
|
|
|
|
- { id: 54, class: sreg_32_xm0 }
|
|
|
|
- { id: 55, class: sreg_32_xm0 }
|
|
|
|
- { id: 56, class: sreg_32_xm0 }
|
|
|
|
- { id: 57, class: sreg_64 }
|
|
|
|
- { id: 58, class: sreg_32_xm0 }
|
|
|
|
- { id: 59, class: sreg_32_xm0 }
|
|
|
|
- { id: 60, class: vgpr_32 }
|
|
|
|
- { id: 61, class: vgpr_32 }
|
|
|
|
- { id: 62, class: vreg_64 }
|
|
|
|
- { id: 63, class: vgpr_32 }
|
|
|
|
- { id: 64, class: vgpr_32 }
|
|
|
|
- { id: 65, class: vgpr_32 }
|
|
|
|
- { id: 66, class: vgpr_32 }
|
|
|
|
- { id: 67, class: vreg_64 }
|
|
|
|
- { id: 68, class: vgpr_32 }
|
|
|
|
- { id: 69, class: vgpr_32 }
|
|
|
|
- { id: 70, class: vgpr_32 }
|
|
|
|
- { id: 71, class: vgpr_32 }
|
|
|
|
- { id: 72, class: vgpr_32 }
|
|
|
|
- { id: 73, class: vgpr_32 }
|
|
|
|
- { id: 74, class: vgpr_32 }
|
|
|
|
- { id: 75, class: vreg_64 }
|
|
|
|
- { id: 76, class: vgpr_32 }
|
|
|
|
- { id: 77, class: vgpr_32 }
|
|
|
|
- { id: 78, class: vgpr_32 }
|
|
|
|
- { id: 79, class: vgpr_32 }
|
|
|
|
- { id: 80, class: vreg_64 }
|
|
|
|
- { id: 81, class: vgpr_32 }
|
|
|
|
- { id: 82, class: vgpr_32 }
|
|
|
|
- { id: 83, class: vgpr_32 }
|
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$sgpr4_sgpr5', virtual-reg: '%4' }
|
2017-05-31 00:49:24 +08:00
|
|
|
frameInfo:
|
|
|
|
isFrameAddressTaken: false
|
|
|
|
isReturnAddressTaken: false
|
|
|
|
hasStackMap: false
|
|
|
|
hasPatchPoint: false
|
|
|
|
stackSize: 0
|
|
|
|
offsetAdjustment: 0
|
|
|
|
maxAlignment: 0
|
|
|
|
adjustsStack: false
|
|
|
|
hasCalls: false
|
|
|
|
hasOpaqueSPAdjustment: false
|
|
|
|
hasVAStart: false
|
|
|
|
hasMustTailInVarArgFunc: false
|
|
|
|
body: |
|
|
|
|
bb.0.bb:
|
|
|
|
successors: %bb.2.bb2(0x80000000)
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $sgpr4_sgpr5
|
2017-05-31 00:49:24 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
%4 = COPY $sgpr4_sgpr5
|
2019-05-01 06:08:23 +08:00
|
|
|
%9 = S_LOAD_DWORDX2_IMM %4, 0, 0, 0 :: (non-temporal dereferenceable invariant load 8 from `i64 addrspace(4)* undef`)
|
2017-05-31 00:49:24 +08:00
|
|
|
%8 = S_MOV_B64 0
|
|
|
|
%7 = COPY %9
|
2018-02-01 06:04:26 +08:00
|
|
|
%30 = V_MOV_B32_e32 1, implicit $exec
|
2017-05-31 00:49:24 +08:00
|
|
|
S_BRANCH %bb.2.bb2
|
|
|
|
|
|
|
|
bb.1.bb1:
|
[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
|
2017-05-31 00:49:24 +08:00
|
|
|
|
|
|
|
bb.2.bb2:
|
|
|
|
successors: %bb.1.bb1(0x04000000), %bb.2.bb2(0x7c000000)
|
|
|
|
|
|
|
|
%0 = PHI %8, %bb.0.bb, %1, %bb.2.bb2
|
|
|
|
%13 = COPY %7.sub1
|
2018-02-01 06:04:26 +08:00
|
|
|
%14 = S_ADD_U32 %7.sub0, %0.sub0, implicit-def $scc
|
|
|
|
%15 = S_ADDC_U32 %7.sub1, %0.sub1, implicit-def dead $scc, implicit $scc
|
2017-05-31 00:49:24 +08:00
|
|
|
%16 = REG_SEQUENCE %14, 1, %15, 2
|
|
|
|
%18 = COPY %16
|
2019-05-01 06:08:23 +08:00
|
|
|
%17 = FLAT_LOAD_DWORD %18, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (load 4 from %ir.uglygep45)
|
2018-02-01 06:04:26 +08:00
|
|
|
%60 = V_BFE_U32 %17, 8, 8, implicit $exec
|
|
|
|
%61 = V_LSHLREV_B32_e32 2, killed %60, implicit $exec
|
|
|
|
%70 = V_ADD_I32_e32 %7.sub0, %61, implicit-def $vcc, implicit $exec
|
2017-05-31 00:49:24 +08:00
|
|
|
%66 = COPY %13
|
2018-02-01 06:04:26 +08:00
|
|
|
%65 = V_ADDC_U32_e32 0, %66, implicit-def $vcc, implicit $vcc, implicit $exec
|
2017-05-31 00:49:24 +08:00
|
|
|
%67 = REG_SEQUENCE %70, 1, killed %65, 2
|
2019-05-01 06:08:23 +08:00
|
|
|
FLAT_STORE_DWORD %67, %30, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into %ir.tmp9)
|
2018-02-01 06:04:26 +08:00
|
|
|
%37 = S_ADD_U32 %14, 4, implicit-def $scc
|
|
|
|
%38 = S_ADDC_U32 %15, 0, implicit-def dead $scc, implicit $scc
|
2017-05-31 00:49:24 +08:00
|
|
|
%71 = COPY killed %37
|
|
|
|
%72 = COPY killed %38
|
|
|
|
%41 = REG_SEQUENCE killed %71, 1, killed %72, 2
|
2019-05-01 06:08:23 +08:00
|
|
|
%40 = FLAT_LOAD_DWORD killed %41, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (load 4 from %ir.scevgep)
|
2018-02-01 06:04:26 +08:00
|
|
|
%73 = V_BFE_U32 %40, 8, 8, implicit $exec
|
|
|
|
%74 = V_LSHLREV_B32_e32 2, killed %73, implicit $exec
|
|
|
|
%83 = V_ADD_I32_e32 %7.sub0, %74, implicit-def $vcc, implicit $exec
|
|
|
|
%78 = V_ADDC_U32_e32 0, %66, implicit-def $vcc, implicit $vcc, implicit $exec
|
2017-05-31 00:49:24 +08:00
|
|
|
%80 = REG_SEQUENCE %83, 1, killed %78, 2
|
2019-05-01 06:08:23 +08:00
|
|
|
FLAT_STORE_DWORD %80, %30, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into %ir.tmp17)
|
2018-02-01 06:04:26 +08:00
|
|
|
%55 = S_ADD_U32 %0.sub0, 8, implicit-def $scc
|
|
|
|
%56 = S_ADDC_U32 %0.sub1, 0, implicit-def dead $scc, implicit $scc
|
2017-05-31 00:49:24 +08:00
|
|
|
%57 = REG_SEQUENCE %55, 1, killed %56, 2
|
|
|
|
%1 = COPY %57
|
2018-02-01 06:04:26 +08:00
|
|
|
S_CMPK_EQ_I32 %55, 4096, implicit-def $scc
|
|
|
|
S_CBRANCH_SCC1 %bb.1.bb1, implicit $scc
|
2017-05-31 00:49:24 +08:00
|
|
|
S_BRANCH %bb.2.bb2
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: sdwa_sgpr_operand
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 1
|
2017-05-31 00:49:24 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: sreg_64 }
|
|
|
|
- { id: 1, class: sreg_64 }
|
|
|
|
- { id: 2, class: vgpr_32 }
|
|
|
|
- { id: 3, class: sgpr_128 }
|
|
|
|
- { id: 4, class: sgpr_64 }
|
|
|
|
- { id: 5, class: sreg_32_xm0 }
|
|
|
|
- { id: 6, class: sgpr_32 }
|
|
|
|
- { id: 7, class: sreg_64 }
|
|
|
|
- { id: 8, class: sreg_64 }
|
|
|
|
- { id: 9, class: sreg_64_xexec }
|
|
|
|
- { id: 10, class: sreg_32_xm0 }
|
|
|
|
- { id: 11, class: sreg_32_xm0 }
|
|
|
|
- { id: 12, class: sreg_32_xm0 }
|
|
|
|
- { id: 13, class: sreg_32_xm0 }
|
|
|
|
- { id: 14, class: sreg_32_xm0 }
|
|
|
|
- { id: 15, class: sreg_32_xm0 }
|
|
|
|
- { id: 16, class: sreg_64 }
|
|
|
|
- { id: 17, class: vgpr_32 }
|
|
|
|
- { id: 18, class: vreg_64 }
|
|
|
|
- { id: 19, class: sreg_32_xm0 }
|
|
|
|
- { id: 20, class: sreg_32 }
|
|
|
|
- { id: 21, class: sreg_32_xm0 }
|
|
|
|
- { id: 22, class: sreg_32_xm0 }
|
|
|
|
- { id: 23, class: sreg_32_xm0 }
|
|
|
|
- { id: 24, class: sreg_64 }
|
|
|
|
- { id: 25, class: sreg_32_xm0 }
|
|
|
|
- { id: 26, class: sreg_32_xm0 }
|
|
|
|
- { id: 27, class: sreg_32_xm0 }
|
|
|
|
- { id: 28, class: sreg_32_xm0 }
|
|
|
|
- { id: 29, class: sreg_64 }
|
|
|
|
- { id: 30, class: vgpr_32 }
|
|
|
|
- { id: 31, class: vreg_64 }
|
|
|
|
- { id: 32, class: sreg_32_xm0 }
|
|
|
|
- { id: 33, class: sreg_32_xm0 }
|
|
|
|
- { id: 34, class: sreg_64 }
|
|
|
|
- { id: 35, class: sreg_32_xm0 }
|
|
|
|
- { id: 36, class: sreg_32_xm0 }
|
|
|
|
- { id: 37, class: sreg_32_xm0 }
|
|
|
|
- { id: 38, class: sreg_32_xm0 }
|
|
|
|
- { id: 39, class: vreg_64 }
|
|
|
|
- { id: 40, class: vgpr_32 }
|
|
|
|
- { id: 41, class: vreg_64 }
|
|
|
|
- { id: 42, class: sreg_32_xm0 }
|
|
|
|
- { id: 43, class: sreg_32 }
|
|
|
|
- { id: 44, class: sreg_32_xm0 }
|
|
|
|
- { id: 45, class: sreg_64 }
|
|
|
|
- { id: 46, class: sreg_32_xm0 }
|
|
|
|
- { id: 47, class: sreg_32_xm0 }
|
|
|
|
- { id: 48, class: sreg_32_xm0 }
|
|
|
|
- { id: 49, class: sreg_32_xm0 }
|
|
|
|
- { id: 50, class: sreg_64 }
|
|
|
|
- { id: 51, class: vreg_64 }
|
|
|
|
- { id: 52, class: sreg_64 }
|
|
|
|
- { id: 53, class: sreg_32_xm0 }
|
|
|
|
- { id: 54, class: sreg_32_xm0 }
|
|
|
|
- { id: 55, class: sreg_32_xm0 }
|
|
|
|
- { id: 56, class: sreg_32_xm0 }
|
|
|
|
- { id: 57, class: sreg_64 }
|
|
|
|
- { id: 58, class: sreg_32_xm0 }
|
|
|
|
- { id: 59, class: sreg_32_xm0 }
|
|
|
|
- { id: 60, class: vgpr_32 }
|
|
|
|
- { id: 61, class: vgpr_32 }
|
|
|
|
- { id: 62, class: vreg_64 }
|
|
|
|
- { id: 63, class: vgpr_32 }
|
|
|
|
- { id: 64, class: vgpr_32 }
|
|
|
|
- { id: 65, class: vgpr_32 }
|
|
|
|
- { id: 66, class: vgpr_32 }
|
|
|
|
- { id: 67, class: vreg_64 }
|
|
|
|
- { id: 68, class: vgpr_32 }
|
|
|
|
- { id: 69, class: vgpr_32 }
|
|
|
|
- { id: 70, class: vgpr_32 }
|
|
|
|
- { id: 71, class: vgpr_32 }
|
|
|
|
- { id: 72, class: vgpr_32 }
|
|
|
|
- { id: 73, class: vgpr_32 }
|
|
|
|
- { id: 74, class: vgpr_32 }
|
|
|
|
- { id: 75, class: vreg_64 }
|
|
|
|
- { id: 76, class: vgpr_32 }
|
|
|
|
- { id: 77, class: vgpr_32 }
|
|
|
|
- { id: 78, class: vgpr_32 }
|
|
|
|
- { id: 79, class: vgpr_32 }
|
|
|
|
- { id: 80, class: vreg_64 }
|
|
|
|
- { id: 81, class: vgpr_32 }
|
|
|
|
- { id: 82, class: vgpr_32 }
|
|
|
|
- { id: 83, class: vgpr_32 }
|
|
|
|
- { id: 84, class: sreg_32_xm0 }
|
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$sgpr4_sgpr5', virtual-reg: '%4' }
|
2017-05-31 00:49:24 +08:00
|
|
|
frameInfo:
|
|
|
|
isFrameAddressTaken: false
|
|
|
|
isReturnAddressTaken: false
|
|
|
|
hasStackMap: false
|
|
|
|
hasPatchPoint: false
|
|
|
|
stackSize: 0
|
|
|
|
offsetAdjustment: 0
|
|
|
|
maxAlignment: 0
|
|
|
|
adjustsStack: false
|
|
|
|
hasCalls: false
|
|
|
|
hasOpaqueSPAdjustment: false
|
|
|
|
hasVAStart: false
|
|
|
|
hasMustTailInVarArgFunc: false
|
|
|
|
body: |
|
|
|
|
bb.0.bb:
|
|
|
|
successors: %bb.2.bb2(0x80000000)
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $sgpr4_sgpr5
|
2017-05-31 00:49:24 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
%4 = COPY $sgpr4_sgpr5
|
2019-05-01 06:08:23 +08:00
|
|
|
%9 = S_LOAD_DWORDX2_IMM %4, 0, 0, 0 :: (non-temporal dereferenceable invariant load 8 from `i64 addrspace(4)* undef`)
|
2017-05-31 00:49:24 +08:00
|
|
|
%8 = S_MOV_B64 0
|
|
|
|
%7 = COPY %9
|
2018-02-01 06:04:26 +08:00
|
|
|
%30 = V_MOV_B32_e32 1, implicit $exec
|
2017-05-31 00:49:24 +08:00
|
|
|
%84 = S_MOV_B32 2
|
|
|
|
S_BRANCH %bb.2.bb2
|
|
|
|
|
|
|
|
bb.1.bb1:
|
[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
|
2017-05-31 00:49:24 +08:00
|
|
|
|
|
|
|
bb.2.bb2:
|
|
|
|
successors: %bb.1.bb1(0x04000000), %bb.2.bb2(0x7c000000)
|
|
|
|
|
|
|
|
%0 = PHI %8, %bb.0.bb, %1, %bb.2.bb2
|
|
|
|
%13 = COPY %7.sub1
|
2018-02-01 06:04:26 +08:00
|
|
|
%14 = S_ADD_U32 %7.sub0, %0.sub0, implicit-def $scc
|
|
|
|
%15 = S_ADDC_U32 %7.sub1, %0.sub1, implicit-def dead $scc, implicit $scc
|
2017-05-31 00:49:24 +08:00
|
|
|
%16 = REG_SEQUENCE %14, 1, %15, 2
|
|
|
|
%18 = COPY %16
|
2019-05-01 06:08:23 +08:00
|
|
|
%17 = FLAT_LOAD_DWORD %18, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (load 4 from %ir.uglygep45)
|
2018-02-01 06:04:26 +08:00
|
|
|
%60 = V_BFE_U32 %17, 8, 8, implicit $exec
|
|
|
|
%61 = V_LSHLREV_B32_e32 %84, killed %60, implicit $exec
|
|
|
|
%70 = V_ADD_I32_e32 %7.sub0, %61, implicit-def $vcc, implicit $exec
|
2017-05-31 00:49:24 +08:00
|
|
|
%66 = COPY %13
|
2018-02-01 06:04:26 +08:00
|
|
|
%65 = V_ADDC_U32_e32 0, %66, implicit-def $vcc, implicit $vcc, implicit $exec
|
2017-05-31 00:49:24 +08:00
|
|
|
%67 = REG_SEQUENCE %70, 1, killed %65, 2
|
2019-05-01 06:08:23 +08:00
|
|
|
FLAT_STORE_DWORD %67, %30, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into %ir.tmp9)
|
2018-02-01 06:04:26 +08:00
|
|
|
%37 = S_ADD_U32 %14, 4, implicit-def $scc
|
|
|
|
%38 = S_ADDC_U32 %15, 0, implicit-def dead $scc, implicit $scc
|
2017-05-31 00:49:24 +08:00
|
|
|
%71 = COPY killed %37
|
|
|
|
%72 = COPY killed %38
|
|
|
|
%41 = REG_SEQUENCE killed %71, 1, killed %72, 2
|
2019-05-01 06:08:23 +08:00
|
|
|
%40 = FLAT_LOAD_DWORD killed %41, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (load 4 from %ir.scevgep)
|
2018-02-01 06:04:26 +08:00
|
|
|
%73 = V_BFE_U32 %40, 8, 8, implicit $exec
|
|
|
|
%74 = V_LSHLREV_B32_e32 %84, killed %73, implicit $exec
|
|
|
|
%83 = V_ADD_I32_e32 %7.sub0, %74, implicit-def $vcc, implicit $exec
|
|
|
|
%78 = V_ADDC_U32_e32 0, %66, implicit-def $vcc, implicit $vcc, implicit $exec
|
2017-05-31 00:49:24 +08:00
|
|
|
%80 = REG_SEQUENCE %83, 1, killed %78, 2
|
2019-05-01 06:08:23 +08:00
|
|
|
FLAT_STORE_DWORD %80, %30, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into %ir.tmp17)
|
2018-02-01 06:04:26 +08:00
|
|
|
%55 = S_ADD_U32 %0.sub0, 8, implicit-def $scc
|
|
|
|
%56 = S_ADDC_U32 %0.sub1, 0, implicit-def dead $scc, implicit $scc
|
2017-05-31 00:49:24 +08:00
|
|
|
%57 = REG_SEQUENCE %55, 1, killed %56, 2
|
|
|
|
%1 = COPY %57
|
2018-02-01 06:04:26 +08:00
|
|
|
S_CMPK_EQ_I32 %55, 4096, implicit-def $scc
|
|
|
|
S_CBRANCH_SCC1 %bb.1.bb1, implicit $scc
|
2017-05-31 00:49:24 +08:00
|
|
|
S_BRANCH %bb.2.bb2
|
|
|
|
|
|
|
|
...
|