summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2009-12-14 18:31:20 +0000
committerJim Grosbach <grosbach@apple.com>2009-12-14 18:31:20 +0000
commit5e0d2a2df66107200b1c3211499494d49a042f5b (patch)
treed2b282400f54a4e8bd520027b30ae6266a93cf33 /llvm
parentdf9f4c6655ec647490a702c92350dd027aff1aa6 (diff)
downloadbcm5719-llvm-5e0d2a2df66107200b1c3211499494d49a042f5b.tar.gz
bcm5719-llvm-5e0d2a2df66107200b1c3211499494d49a042f5b.zip
ARM memory barrier instructions are not predicable
llvm-svn: 91305
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/ARM/ARMInstrFormats.td17
-rw-r--r--llvm/lib/Target/ARM/ARMInstrInfo.td6
2 files changed, 20 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstrFormats.td b/llvm/lib/Target/ARM/ARMInstrFormats.td
index 9ce93d196a2..cf0edff31bb 100644
--- a/llvm/lib/Target/ARM/ARMInstrFormats.td
+++ b/llvm/lib/Target/ARM/ARMInstrFormats.td
@@ -201,6 +201,19 @@ class I<dag oops, dag iops, AddrMode am, SizeFlagVal sz,
let Pattern = pattern;
list<Predicate> Predicates = [IsARM];
}
+// A few are not predicable
+class InoP<dag oops, dag iops, AddrMode am, SizeFlagVal sz,
+ IndexMode im, Format f, InstrItinClass itin,
+ string opc, string asm, string cstr,
+ list<dag> pattern>
+ : InstARM<am, sz, im, f, GenericDomain, cstr, itin> {
+ let OutOperandList = oops;
+ let InOperandList = iops;
+ let AsmString = !strconcat(opc, asm);
+ let Pattern = pattern;
+ let isPredicable = 0;
+ list<Predicate> 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<dag oops, dag iops, Format f, InstrItinClass itin,
string asm, list<dag> pattern>
: XI<oops, iops, AddrModeNone, Size4Bytes, IndexModeNone, f, itin,
asm, "", pattern>;
+class AInoP<dag oops, dag iops, Format f, InstrItinClass itin,
+ string opc, string asm, list<dag> pattern>
+ : InoP<oops, iops, AddrModeNone, Size4Bytes, IndexModeNone, f, itin,
+ opc, asm, "", pattern>;
// Ctrl flow instructions
class ABI<bits<4> opcod, dag oops, dag iops, InstrItinClass itin,
diff --git a/llvm/lib/Target/ARM/ARMInstrInfo.td b/llvm/lib/Target/ARM/ARMInstrInfo.td
index 39522ae5cc0..470bd53675f 100644
--- a/llvm/lib/Target/ARM/ARMInstrInfo.td
+++ b/llvm/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)]>,
OpenPOWER on IntegriCloud