[llvm] r336236 - [lanai] Handle atomic load of i8 like regular load.
Jacques Pienaar via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 3 15:57:51 PDT 2018
Author: jpienaar
Date: Tue Jul 3 15:57:51 2018
New Revision: 336236
URL: http://llvm.org/viewvc/llvm-project?rev=336236&view=rev
Log:
[lanai] Handle atomic load of i8 like regular load.
Loads and stores less than 64-bits are already atomic, this adds support for a special case thereof. This needs to be expanded.
Modified:
llvm/trunk/lib/Target/Lanai/LanaiInstrInfo.td
Modified: llvm/trunk/lib/Target/Lanai/LanaiInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Lanai/LanaiInstrInfo.td?rev=336236&r1=336235&r2=336236&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Lanai/LanaiInstrInfo.td (original)
+++ llvm/trunk/lib/Target/Lanai/LanaiInstrInfo.td Tue Jul 3 15:57:51 2018
@@ -842,6 +842,10 @@ def : Pat<(Call texternalsym:$dst), (CAL
// Loads
def : Pat<(extloadi8 ADDRspls:$src), (i32 (LDBz_RI ADDRspls:$src))>;
def : Pat<(extloadi16 ADDRspls:$src), (i32 (LDHz_RI ADDRspls:$src))>;
+// Loads up to 32-bits are already atomic.
+// TODO: This is a workaround for a particular failing case and should be
+// handled more generally.
+def : Pat<(atomic_load_8 ADDRspls:$src), (i32 (LDBz_RI ADDRspls:$src))>;
// GlobalAddress, ExternalSymbol, Jumptable, ConstantPool
def : Pat<(LanaiHi tglobaladdr:$dst), (MOVHI tglobaladdr:$dst)>;
More information about the llvm-commits
mailing list