From b28dd11e3395e4b4a1bac7040f21e40ac0ee3922 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 1 Apr 2004 05:28:26 +0000 Subject: Add support for select constant expressions to the CBE, fixing SIOD llvm-svn: 12589 --- llvm/lib/Target/CBackend/Writer.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'llvm/lib') diff --git a/llvm/lib/Target/CBackend/Writer.cpp b/llvm/lib/Target/CBackend/Writer.cpp index 54b8bd3c19c..807f8ab92f1 100644 --- a/llvm/lib/Target/CBackend/Writer.cpp +++ b/llvm/lib/Target/CBackend/Writer.cpp @@ -388,6 +388,15 @@ void CWriter::printConstant(Constant *CPV) { 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: -- cgit v1.2.3