if (AllocationInst *AI = dyn_cast<AllocationInst>(&*II))
ObjectNodes[AI] = NumObjects++;
}
+
+ // Calls to inline asm need to be added as well because the callee isn't
+ // referenced anywhere else.
+ if (CallInst *CI = dyn_cast<CallInst>(&*II)) {
+ Value *Callee = CI->getCalledValue();
+ if (isa<InlineAsm>(Callee))
+ ValueNodes[Callee] = NumObjects++;
+ }
}
}
--- /dev/null
+; RUN: llvm-as < %s | opt -anders-aa -disable-output
+
+define void @x(i16 %Y) {
+entry:
+ %tmp = call i16 asm "bswap $0", "=r,r"(i16 %Y)
+ ret void
+}
+