Skip to content

Commit

Permalink
[AMDGPU][GlobalISel] Fix subregister index for EXEC register in selec…
Browse files Browse the repository at this point in the history
…tBallot.

Temporarily remove subregister for EXEC in selectBallot added in
https://reviews.llvm.org/D83214 to fix failures on expensive checks buildbot.
  • Loading branch information
mbrkusanin committed Jul 13, 2020
1 parent 84a1701 commit 38998cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 1 addition & 3 deletions llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
Expand Up @@ -1061,9 +1061,7 @@ bool AMDGPUInstructionSelector::selectBallot(MachineInstr &I) const {
BuildMI(*BB, &I, DL, TII.get(Opcode), DstReg).addImm(0);
} else if (Value == -1) { // all ones
Register SrcReg = Is64 ? AMDGPU::EXEC : AMDGPU::EXEC_LO;
const unsigned SubReg = Is64 ? AMDGPU::sub0_sub1 : AMDGPU::sub0;
BuildMI(*BB, &I, DL, TII.get(AMDGPU::COPY), DstReg)
.addReg(SrcReg, 0, SubReg);
BuildMI(*BB, &I, DL, TII.get(AMDGPU::COPY), DstReg).addReg(SrcReg);
} else
return false;
} else {
Expand Down
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -march=amdgcn -mcpu=gfx1010 -mattr=+wavefrontsize32,-wavefrontsize64 -global-isel < %s | FileCheck %s
; RUN: llc -march=amdgcn -mcpu=gfx1010 -mattr=+wavefrontsize32,-wavefrontsize64 -global-isel -verify-machineinstrs < %s | FileCheck %s

declare i32 @llvm.amdgcn.ballot.i32(i1)

Expand Down
5 changes: 3 additions & 2 deletions llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.ballot.i64.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -march=amdgcn -mcpu=gfx900 -global-isel < %s | FileCheck %s
; RUN: llc -march=amdgcn -mcpu=gfx900 -global-isel -verify-machineinstrs < %s | FileCheck %s

declare i64 @llvm.amdgcn.ballot.i64(i1)

Expand All @@ -20,7 +20,8 @@ define amdgpu_cs i64 @constant_false() {
define amdgpu_cs i64 @constant_true() {
; CHECK-LABEL: constant_true:
; CHECK: ; %bb.0:
; CHECK-NEXT: s_mov_b64 s[0:1], exec
; CHECK-NEXT: s_mov_b32 s0, exec_lo
; CHECK-NEXT: s_mov_b32 s1, exec_hi
; CHECK-NEXT: ; return to shader part epilog
%ballot = call i64 @llvm.amdgcn.ballot.i64(i1 1)
ret i64 %ballot
Expand Down

0 comments on commit 38998cf

Please sign in to comment.