mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
Create nodes for inline asm so that we don't crash looking for the node later.
llvm-svn: 44267
This commit is contained in:
parent
644434c904
commit
e34dd3a90f
@ -668,6 +668,14 @@ void Andersens::IdentifyObjects(Module &M) {
|
||||
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++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
8
test/Analysis/Andersens/2007-11-19-InlineAsm.ll
Normal file
8
test/Analysis/Andersens/2007-11-19-InlineAsm.ll
Normal file
@ -0,0 +1,8 @@
|
||||
; 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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user