aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-12 05:53:14 +0000
committerChris Lattner <sabre@nondot.org>2004-03-12 05:53:14 +0000
commitcfdd148972c049291ee6f24f3201a573d9ac5809 (patch)
tree0ab89d279b4a6e8c9f56d3194c76c3519dac3246
parent17fd273512037da9838240b522619f4a6d2792b7 (diff)
Print select instructions correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12320 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/AsmWriter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index fd3cda6148..b90a5b2857 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -915,8 +915,9 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
bool PrintAllTypes = false;
const Type *TheType = Operand->getType();
- // Shift Left & Right print both types even for Ubyte LHS
- if (isa<ShiftInst>(I)) {
+ // Shift Left & Right print both types even for Ubyte LHS, and select prints
+ // types even if all operands are bools.
+ if (isa<ShiftInst>(I) || isa<SelectInst>(I)) {
PrintAllTypes = true;
} else {
for (unsigned i = 1, E = I.getNumOperands(); i != E; ++i) {