[llvm] r357081 - AMDGPU: wave_barrier is not isBarrier
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 27 08:54:45 PDT 2019
Author: arsenm
Date: Wed Mar 27 08:54:45 2019
New Revision: 357081
URL: http://llvm.org/viewvc/llvm-project?rev=357081&view=rev
Log:
AMDGPU: wave_barrier is not isBarrier
This is not a control flow instruction, so should not be marked as
isBarrier. This fixes a verifier error if followed by unreachable.
Modified:
llvm/trunk/lib/Target/AMDGPU/SIInstructions.td
llvm/trunk/test/CodeGen/AMDGPU/llvm.amdgcn.wave.barrier.ll
Modified: llvm/trunk/lib/Target/AMDGPU/SIInstructions.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIInstructions.td?rev=357081&r1=357080&r2=357081&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIInstructions.td (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIInstructions.td Wed Mar 27 08:54:45 2019
@@ -197,7 +197,6 @@ def WAVE_BARRIER : SPseudoInstSI<(outs),
let hasSideEffects = 1;
let mayLoad = 1;
let mayStore = 1;
- let isBarrier = 1;
let isConvergent = 1;
let FixedSize = 1;
let Size = 0;
Modified: llvm/trunk/test/CodeGen/AMDGPU/llvm.amdgcn.wave.barrier.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/llvm.amdgcn.wave.barrier.ll?rev=357081&r1=357080&r2=357081&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/llvm.amdgcn.wave.barrier.ll (original)
+++ llvm/trunk/test/CodeGen/AMDGPU/llvm.amdgcn.wave.barrier.ll Wed Mar 27 08:54:45 2019
@@ -10,6 +10,18 @@ entry:
ret void
}
+; Check for verifier error from interpreting wave_barrier as a control
+; flow barrier.
+
+; GCN-LABEL: {{^}}test_wave_barrier_is_not_isBarrier:
+; GCN-DAG: ; wave barrier
+; GCN-NOT: s_barrier
+define amdgpu_kernel void @test_wave_barrier_is_not_isBarrier() #0 {
+entry:
+ call void @llvm.amdgcn.wave.barrier() #1
+ unreachable
+}
+
declare void @llvm.amdgcn.wave.barrier() #1
attributes #0 = { nounwind }
More information about the llvm-commits
mailing list