summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineVerifier.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-09-21 02:20:46 +0000
committerAndrew Trick <atrick@apple.com>2011-09-21 02:20:46 +0000
commit924123acb3902ebbb00848382d5a16ce704990a1 (patch)
tree0756e88bcb8b6b5c9be22b5f792129943209eade /llvm/lib/CodeGen/MachineVerifier.cpp
parent3f1fdf1b31123be736416c8a44b3c31d6fce77e0 (diff)
downloadbcm5719-llvm-924123acb3902ebbb00848382d5a16ce704990a1.tar.gz
bcm5719-llvm-924123acb3902ebbb00848382d5a16ce704990a1.zip
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. llvm-svn: 140228
Diffstat (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineVerifier.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index 34359143754..7463d0f564d 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -570,6 +570,9 @@ void MachineVerifier::visitMachineInstrBefore(const MachineInstr *MI) {
}
}
+ StringRef ErrorInfo;
+ if (!TII->verifyInstruction(MI, ErrorInfo))
+ report(ErrorInfo.data(), MI);
}
void
OpenPOWER on IntegriCloud