mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Lower ARM adds/subs to add/sub after adding optional CPSR operand.
This is still a hack until we can teach tblgen to generate the optional CPSR operand rather than an implicit CPSR def. But the strangeness is now limited to the selection DAG. ADD/SUB MI's no longer have implicit CPSR defs, nor do we allow flag setting variants of these opcodes in machine code. There are several corner cases to consider, and getting one wrong would previously lead to nasty miscompilation. It's not the first time I've debugged one, so this time I added enough verification to ensure it won't happen again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140228 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -179,12 +179,9 @@ TargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||
|
||||
void TargetLowering::AdjustInstrPostInstrSelection(MachineInstr *MI,
|
||||
SDNode *Node) const {
|
||||
#ifndef NDEBUG
|
||||
dbgs() << "If a target marks an instruction with "
|
||||
"'hasPostISelHook', it must implement "
|
||||
"TargetLowering::AdjustInstrPostInstrSelection!";
|
||||
#endif
|
||||
llvm_unreachable(0);
|
||||
assert(!MI->getDesc().hasPostISelHook() &&
|
||||
"If a target marks an instruction with 'hasPostISelHook', "
|
||||
"it must implement TargetLowering::AdjustInstrPostInstrSelection!");
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
Reference in New Issue
Block a user