mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +00:00
Fix a bug that caused a crash if a setcc had zero uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@574 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1688,7 +1688,7 @@ GetInstructionsByRule(InstructionNode* subtreeRoot,
|
|||||||
// to follow SSA def-use edges here, not BURG tree edges.
|
// to follow SSA def-use edges here, not BURG tree edges.
|
||||||
//
|
//
|
||||||
Instruction* result = subtreeRoot->getInstruction();
|
Instruction* result = subtreeRoot->getInstruction();
|
||||||
Value* firstUse = (Value*) * result->use_begin();
|
Value* firstUse = result->use_empty() ? 0 : *result->use_begin();
|
||||||
bool discardResult =
|
bool discardResult =
|
||||||
(result->use_size() == 1
|
(result->use_size() == 1
|
||||||
&& firstUse->isInstruction()
|
&& firstUse->isInstruction()
|
||||||
|
Reference in New Issue
Block a user