bool PrintAllTypes = false;
Type *TheType = Operand->getType();
- // Select, Store, ShuffleVector and CmpXchg always print all types.
+ // Select, Store, ShuffleVector, CmpXchg and AtomicRMW always print all
+ // types.
if (isa<SelectInst>(I) || isa<StoreInst>(I) || isa<ShuffleVectorInst>(I) ||
- isa<ReturnInst>(I) || isa<AtomicCmpXchgInst>(I)) {
+ isa<ReturnInst>(I) || isa<AtomicCmpXchgInst>(I) ||
+ isa<AtomicRMWInst>(I)) {
PrintAllTypes = true;
} else {
for (unsigned i = 1, E = I.getNumOperands(); i != E; ++i) {
ret void
}
+; CHECK: define void @atomicrmw_ptr(ptr %a, ptr %b)
+; CHECK: %c = atomicrmw xchg ptr %a, ptr %b acquire
+; CHECK: ret void
+define void @atomicrmw_ptr(ptr %a, ptr %b) {
+ %c = atomicrmw xchg ptr %a, ptr %b acquire
+ ret void
+}
+
; CHECK: define void @call(ptr %p)
; CHECK: call void %p()
; CHECK: ret void