diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-03-27 15:54:45 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-03-27 15:54:45 +0000 |
| commit | e9ad7e9a714d148ae670c2b29b2dfc87ba651263 (patch) | |
| tree | bf2ffa65ac36d00d34700cdf10bd1f87c303e086 | |
| parent | 9f1a7e559ceac80fc2a2956a3e005bc1d81fcd68 (diff) | |
| download | bcm5719-llvm-e9ad7e9a714d148ae670c2b29b2dfc87ba651263.tar.gz bcm5719-llvm-e9ad7e9a714d148ae670c2b29b2dfc87ba651263.zip | |
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.
llvm-svn: 357081
| -rw-r--r-- | llvm/lib/Target/AMDGPU/SIInstructions.td | 1 | ||||
| -rw-r--r-- | llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wave.barrier.ll | 12 |
2 files changed, 12 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIInstructions.td b/llvm/lib/Target/AMDGPU/SIInstructions.td index b0ab7032d97..c3fa1bb41ef 100644 --- a/llvm/lib/Target/AMDGPU/SIInstructions.td +++ b/llvm/lib/Target/AMDGPU/SIInstructions.td @@ -197,7 +197,6 @@ def WAVE_BARRIER : SPseudoInstSI<(outs), (ins), let hasSideEffects = 1; let mayLoad = 1; let mayStore = 1; - let isBarrier = 1; let isConvergent = 1; let FixedSize = 1; let Size = 0; diff --git a/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wave.barrier.ll b/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wave.barrier.ll index e305f8eff58..be144b441a1 100644 --- a/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wave.barrier.ll +++ b/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wave.barrier.ll @@ -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 } |

