Skip to content

Commit facf69e

Browse files
committed
AMDGPU/GlobalISel: Use vcc reg bank for amdgcn.wqm.vote
llvm-svn: 364762
1 parent 9f992c2 commit facf69e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1521,7 +1521,7 @@ AMDGPURegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
15211521
case Intrinsic::amdgcn_wqm_vote: {
15221522
unsigned Size = MRI.getType(MI.getOperand(0).getReg()).getSizeInBits();
15231523
OpdsMapping[0] = OpdsMapping[2]
1524-
= AMDGPU::getValueMapping(AMDGPU::SGPRRegBankID, Size);
1524+
= AMDGPU::getValueMapping(AMDGPU::VCCRegBankID, Size);
15251525
break;
15261526
}
15271527
case Intrinsic::amdgcn_s_buffer_load: {

llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn-wqm-vote.mir renamed to llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.wqm.vote.mir

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ body: |
1313
; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1414
; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1515
; CHECK: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(ne), [[COPY]](s32), [[COPY1]]
16-
; CHECK: [[COPY2:%[0-9]+]]:sgpr(s1) = COPY [[ICMP]](s1)
17-
; CHECK: [[INT:%[0-9]+]]:sgpr(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.wqm.vote), [[COPY2]](s1)
16+
; CHECK: [[COPY2:%[0-9]+]]:vcc(s1) = COPY [[ICMP]](s1)
17+
; CHECK: [[INT:%[0-9]+]]:vcc(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.wqm.vote), [[COPY2]](s1)
1818
%0:_(s32) = COPY $sgpr0
1919
%1:_(s32) = COPY $sgpr1
2020
%2:_(s1) = G_ICMP intpred(ne), %0, %1
@@ -32,8 +32,7 @@ body: |
3232
; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
3333
; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
3434
; CHECK: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY]](s32), [[COPY1]]
35-
; CHECK: [[COPY2:%[0-9]+]]:sgpr(s1) = COPY [[ICMP]](s1)
36-
; CHECK: [[INT:%[0-9]+]]:sgpr(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.wqm.vote), [[COPY2]](s1)
35+
; CHECK: [[INT:%[0-9]+]]:vcc(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.wqm.vote), [[ICMP]](s1)
3736
%0:_(s32) = COPY $vgpr0
3837
%1:_(s32) = COPY $vgpr1
3938
%2:_(s1) = G_ICMP intpred(ne), %0, %1
@@ -50,7 +49,8 @@ body: |
5049
; CHECK-LABEL: name: wqm_vote_sgpr
5150
; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
5251
; CHECK: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
53-
; CHECK: [[INT:%[0-9]+]]:sgpr(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.wqm.vote), [[TRUNC]](s1)
52+
; CHECK: [[COPY1:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
53+
; CHECK: [[INT:%[0-9]+]]:vcc(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.wqm.vote), [[COPY1]](s1)
5454
%0:_(s32) = COPY $sgpr0
5555
%1:_(s1) = G_TRUNC %0
5656
%2:_(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.wqm.vote), %1

0 commit comments

Comments
 (0)