From f6b2862e813cd75e337238bb3321d3a512b54f06 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Mon, 14 Dec 2009 18:31:20 +0000 Subject: [PATCH] ARM memory barrier instructions are not predicable git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91305 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMInstrFormats.td | 17 +++++++++++++++++ lib/Target/ARM/ARMInstrInfo.td | 6 +++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/lib/Target/ARM/ARMInstrFormats.td b/lib/Target/ARM/ARMInstrFormats.td index 9ce93d196a2..cf0edff31bb 100644 --- a/lib/Target/ARM/ARMInstrFormats.td +++ b/lib/Target/ARM/ARMInstrFormats.td @@ -201,6 +201,19 @@ class I Predicates = [IsARM]; } +// A few are not predicable +class InoP pattern> + : InstARM { + let OutOperandList = oops; + let InOperandList = iops; + let AsmString = !strconcat(opc, asm); + let Pattern = pattern; + let isPredicable = 0; + list Predicates = [IsARM]; +} // Same as I except it can optionally modify CPSR. Note it's modeled as // an input operand since by default it's a zero register. It will @@ -241,6 +254,10 @@ class AXI pattern> : XI; +class AInoP pattern> + : InoP; // Ctrl flow instructions class ABI opcod, dag oops, dag iops, InstrItinClass itin, diff --git a/lib/Target/ARM/ARMInstrInfo.td b/lib/Target/ARM/ARMInstrInfo.td index 39522ae5cc0..470bd53675f 100644 --- a/lib/Target/ARM/ARMInstrInfo.td +++ b/lib/Target/ARM/ARMInstrInfo.td @@ -1574,8 +1574,8 @@ def MOVCCi : AI1<0b1101, (outs GPR:$dst), // // memory barriers protect the atomic sequences -let isPredicable = 0, hasSideEffects = 1 in { -def Int_MemBarrierV7 : AI<(outs), (ins), +let hasSideEffects = 1 in { +def Int_MemBarrierV7 : AInoP<(outs), (ins), Pseudo, NoItinerary, "dmb", "", [(ARMMemBarrier)]>, @@ -1585,7 +1585,7 @@ def Int_MemBarrierV7 : AI<(outs), (ins), let Inst{3-0} = 0b1111; } -def Int_SyncBarrierV7 : AI<(outs), (ins), +def Int_SyncBarrierV7 : AInoP<(outs), (ins), Pseudo, NoItinerary, "dsb", "", [(ARMSyncBarrier)]>,