From f15f5487f2d72b1bd0a5803cbf107e9bb6130ffa Mon Sep 17 00:00:00 2001 From: Konstantin Zhuravlyov Date: Fri, 21 Jul 2017 21:05:45 +0000 Subject: [PATCH] AMDGPU: Introduce maybeAtomic instruction flag Testing is in the follow up change git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308779 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AMDGPU/BUFInstructions.td | 3 +++ lib/Target/AMDGPU/FLATInstructions.td | 6 +++++- lib/Target/AMDGPU/SIDefines.h | 3 ++- lib/Target/AMDGPU/SIInstrFormats.td | 7 ++++++- lib/Target/AMDGPU/SIInstructions.td | 1 + 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/Target/AMDGPU/BUFInstructions.td b/lib/Target/AMDGPU/BUFInstructions.td index 0354a609f4e..89caa65cdaf 100644 --- a/lib/Target/AMDGPU/BUFInstructions.td +++ b/lib/Target/AMDGPU/BUFInstructions.td @@ -437,6 +437,7 @@ class MUBUF_Load_Pseudo .ret; let mayLoad = 1; let mayStore = 0; + let maybeAtomic = 1; } // FIXME: tfe can't be an operand because it requires a separate @@ -483,6 +484,7 @@ class MUBUF_Store_Pseudo .ret; let mayLoad = 0; let mayStore = 1; + let maybeAtomic = 1; } multiclass MUBUF_Pseudo_Stores { @@ -187,6 +189,7 @@ class FLAT_Scratch_Load_Pseudo : FLAT_Pseudo< @@ -202,8 +205,8 @@ class FLAT_Scratch_Store_Pseudo { @@ -228,6 +231,7 @@ class FLAT_AtomicNoRet_Pseudo DisableSIDecoder = 0; diff --git a/lib/Target/AMDGPU/SIInstructions.td b/lib/Target/AMDGPU/SIInstructions.td index 5826874d3c4..f6b723d3474 100644 --- a/lib/Target/AMDGPU/SIInstructions.td +++ b/lib/Target/AMDGPU/SIInstructions.td @@ -99,6 +99,7 @@ def ATOMIC_FENCE : SPseudoInstSI< [(atomic_fence (i32 imm:$ordering), (i32 imm:$scope))], "ATOMIC_FENCE $ordering, $scope"> { let hasSideEffects = 1; + let maybeAtomic = 1; } let hasSideEffects = 0, mayLoad = 0, mayStore = 0, Uses = [EXEC] in { -- 2.40.0