Add support for select constant expressions to the CBE, fixing SIOD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12589 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index 54b8bd3..807f8ab 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -388,6 +388,15 @@
gep_type_end(CPV));
Out << "))";
return;
+ case Instruction::Select:
+ Out << "(";
+ printConstant(CE->getOperand(0));
+ Out << "?";
+ printConstant(CE->getOperand(1));
+ Out << ":";
+ printConstant(CE->getOperand(2));
+ Out << ")";
+ return;
case Instruction::Add:
case Instruction::Sub:
case Instruction::Mul: