Fix PR490
authorChris Lattner <sabre@nondot.org>
Wed, 29 Dec 2004 04:00:09 +0000 (04:00 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 29 Dec 2004 04:00:09 +0000 (04:00 +0000)
Fix testcase CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19176 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp

index fdbf8bc1293cf3250a996a1f759e85af3e136e46..9ff6f5c94b28b1ba5fd833df2419c1688ecc5880 100644 (file)
@@ -493,6 +493,9 @@ void CWriter::printConstant(Constant *CPV) {
     case Instruction::Mul:
     case Instruction::Div:
     case Instruction::Rem:
+    case Instruction::And:
+    case Instruction::Or:
+    case Instruction::Xor:
     case Instruction::SetEQ:
     case Instruction::SetNE:
     case Instruction::SetLT:
@@ -509,6 +512,9 @@ void CWriter::printConstant(Constant *CPV) {
       case Instruction::Mul: Out << " * "; break;
       case Instruction::Div: Out << " / "; break;
       case Instruction::Rem: Out << " % "; break;
+      case Instruction::And: Out << " & "; break;
+      case Instruction::Or:  Out << " | "; break;
+      case Instruction::Xor: Out << " ^ "; break;
       case Instruction::SetEQ: Out << " == "; break;
       case Instruction::SetNE: Out << " != "; break;
       case Instruction::SetLT: Out << " < "; break;
index fdbf8bc1293cf3250a996a1f759e85af3e136e46..9ff6f5c94b28b1ba5fd833df2419c1688ecc5880 100644 (file)
@@ -493,6 +493,9 @@ void CWriter::printConstant(Constant *CPV) {
     case Instruction::Mul:
     case Instruction::Div:
     case Instruction::Rem:
+    case Instruction::And:
+    case Instruction::Or:
+    case Instruction::Xor:
     case Instruction::SetEQ:
     case Instruction::SetNE:
     case Instruction::SetLT:
@@ -509,6 +512,9 @@ void CWriter::printConstant(Constant *CPV) {
       case Instruction::Mul: Out << " * "; break;
       case Instruction::Div: Out << " / "; break;
       case Instruction::Rem: Out << " % "; break;
+      case Instruction::And: Out << " & "; break;
+      case Instruction::Or:  Out << " | "; break;
+      case Instruction::Xor: Out << " ^ "; break;
       case Instruction::SetEQ: Out << " == "; break;
       case Instruction::SetNE: Out << " != "; break;
       case Instruction::SetLT: Out << " < "; break;