mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-10 04:33:40 +00:00
Make sure the two arguments of a setcc instruction point to the same node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20462 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
262bb9ae5e
commit
3267265d78
@ -112,7 +112,7 @@ namespace {
|
||||
void visitStoreInst(StoreInst &SI);
|
||||
void visitCallInst(CallInst &CI);
|
||||
void visitInvokeInst(InvokeInst &II);
|
||||
void visitSetCondInst(SetCondInst &SCI) {} // SetEQ & friends are ignored
|
||||
void visitSetCondInst(SetCondInst &SCI);
|
||||
void visitFreeInst(FreeInst &FI);
|
||||
void visitCastInst(CastInst &CI);
|
||||
void visitInstruction(Instruction &I);
|
||||
@ -325,6 +325,13 @@ void GraphBuilder::visitSelectInst(SelectInst &SI) {
|
||||
Dest.mergeWith(getValueDest(*SI.getOperand(2)));
|
||||
}
|
||||
|
||||
void GraphBuilder::visitSetCondInst(SetCondInst &SCI) {
|
||||
if (!isPointerType(SCI.getOperand(0)->getType()) ||
|
||||
isa<ConstantPointerNull>(SCI.getOperand(1))) return; // Only pointers
|
||||
ScalarMap[SCI.getOperand(0)].mergeWith(getValueDest(*SCI.getOperand(1)));
|
||||
}
|
||||
|
||||
|
||||
void GraphBuilder::visitGetElementPtrInst(User &GEP) {
|
||||
DSNodeHandle Value = getValueDest(*GEP.getOperand(0));
|
||||
if (Value.isNull())
|
||||
|
Loading…
x
Reference in New Issue
Block a user