diff options
author | Chris Lattner <sabre@nondot.org> | 2004-04-01 05:28:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-04-01 05:28:26 +0000 |
commit | 6683dbf32e705614e1e8474f9dd6c3244305535d (patch) | |
tree | 124619093f862d0e3fa7cd7a283a033d84108788 /lib/Target/CBackend/Writer.cpp | |
parent | 0526f01fec0945eca49ccd91f22a93af6bb71c17 (diff) |
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
Diffstat (limited to 'lib/Target/CBackend/Writer.cpp')
-rw-r--r-- | lib/Target/CBackend/Writer.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index 54b8bd3c19..807f8ab92f 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/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: |