From 683e922d299bdfa9ec609bd58a0eed20568303f1 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 12 Aug 2009 17:23:50 +0000 Subject: [PATCH] Make LLVM Assembly dramatically easier to read by aligning the comments, using formatted_raw_ostream's PadToColumn. Before: bb1: ; preds = %bb %2 = sext i32 %i.01 to i64 ; [#uses=1] %3 = getelementptr double* %p, i64 %2 ; [#uses=1] %4 = load double* %3, align 8 ; [#uses=1] %5 = fmul double %4, 1.100000e+00 ; [#uses=1] %6 = sext i32 %i.01 to i64 ; [#uses=1] %7 = getelementptr double* %p, i64 %6 ; [#uses=1] After: bb1: ; preds = %bb %2 = sext i32 %i.01 to i64 ; [#uses=1] %3 = getelementptr double* %p, i64 %2 ; [#uses=1] %4 = load double* %3, align 8 ; [#uses=1] %5 = fmul double %4, 1.100000e+00 ; [#uses=1] %6 = sext i32 %i.01 to i64 ; [#uses=1] %7 = getelementptr double* %p, i64 %6 ; [#uses=1] Several tests required whitespace adjustments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78816 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/AsmWriter.cpp | 60 +++++++++++-------- test/Analysis/ScalarEvolution/avoid-smax-1.ll | 2 +- test/Integer/a15.ll.out | 38 ++++++------ test/Integer/a17.ll.out | 36 +++++------ test/Integer/a31.ll.out | 36 +++++------ test/Integer/a33.ll.out | 36 +++++------ test/Integer/a63.ll.out | 36 +++++------ test/Integer/a7.ll.out | 46 +++++++------- test/Integer/a9.ll.out | 34 +++++------ .../InstCombine/urem-simplify-bug.ll | 2 +- 10 files changed, 169 insertions(+), 157 deletions(-) diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 8358c5d84c4..08f41ff73a4 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -34,7 +34,7 @@ #include "llvm/Support/CFG.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MathExtras.h" -#include "llvm/Support/raw_ostream.h" +#include "llvm/Support/FormattedStream.h" #include #include #include @@ -66,7 +66,8 @@ static const Module *getModuleFromVal(const Value *V) { // PrintEscapedString - Print each character of the specified string, escaping // it if it is not printable or if it is an escape char. -static void PrintEscapedString(const StringRef &Name, raw_ostream &Out) { +static void PrintEscapedString(const StringRef &Name, + formatted_raw_ostream &Out) { for (unsigned i = 0, e = Name.size(); i != e; ++i) { unsigned char C = Name[i]; if (isprint(C) && C != '\\' && C != '"') @@ -86,7 +87,7 @@ enum PrefixType { /// PrintLLVMName - Turn the specified name into an 'LLVM name', which is either /// prefixed with % (if the string only contains simple characters) or is /// surrounded with ""'s (if it has special chars in it). Print it out. -static void PrintLLVMName(raw_ostream &OS, const StringRef &Name, +static void PrintLLVMName(formatted_raw_ostream &OS, const StringRef &Name, PrefixType Prefix) { assert(Name.data() && "Cannot get empty name!"); switch (Prefix) { @@ -125,7 +126,7 @@ static void PrintLLVMName(raw_ostream &OS, const StringRef &Name, /// PrintLLVMName - Turn the specified name into an 'LLVM name', which is either /// prefixed with % (if the string only contains simple characters) or is /// surrounded with ""'s (if it has special chars in it). Print it out. -static void PrintLLVMName(raw_ostream &OS, const Value *V) { +static void PrintLLVMName(formatted_raw_ostream &OS, const Value *V) { PrintLLVMName(OS, V->getName(), isa(V) ? GlobalPrefix : LocalPrefix); } @@ -425,9 +426,11 @@ static void AddModuleTypesToPrinter(TypePrinting &TP, // Get the name as a string and insert it into TypeNames. std::string NameStr; - raw_string_ostream NameOS(NameStr); + raw_string_ostream NameROS(NameStr); + formatted_raw_ostream NameOS(NameROS); PrintLLVMName(NameOS, TI->first, LocalPrefix); - TP.addTypeName(Ty, NameOS.str()); + NameOS.flush(); + TP.addTypeName(Ty, NameStr); } // Walk the entire module to find references to unnamed structure and opaque @@ -814,7 +817,7 @@ void SlotTracker::CreateMetadataSlot(const MDNode *N) { // AsmWriter Implementation //===----------------------------------------------------------------------===// -static void WriteAsOperandInternal(raw_ostream &Out, const Value *V, +static void WriteAsOperandInternal(formatted_raw_ostream &Out, const Value *V, TypePrinting &TypePrinter, SlotTracker *Machine); @@ -853,7 +856,7 @@ static const char *getPredicateText(unsigned predicate) { return pred; } -static void WriteMDNodes(raw_ostream &Out, TypePrinting &TypePrinter, +static void WriteMDNodes(formatted_raw_ostream &Out, TypePrinting &TypePrinter, SlotTracker &Machine) { SmallVector Nodes; Nodes.resize(Machine.mdnSize()); @@ -886,7 +889,7 @@ static void WriteMDNodes(raw_ostream &Out, TypePrinting &TypePrinter, } } -static void WriteOptimizationInfo(raw_ostream &Out, const User *U) { +static void WriteOptimizationInfo(formatted_raw_ostream &Out, const User *U) { if (const OverflowingBinaryOperator *OBO = dyn_cast(U)) { if (OBO->hasNoUnsignedOverflow()) @@ -902,7 +905,7 @@ static void WriteOptimizationInfo(raw_ostream &Out, const User *U) { } } -static void WriteConstantInt(raw_ostream &Out, const Constant *CV, +static void WriteConstantInt(formatted_raw_ostream &Out, const Constant *CV, TypePrinting &TypePrinter, SlotTracker *Machine) { if (const ConstantInt *CI = dyn_cast(CV)) { if (CI->getType() == Type::Int1Ty) { @@ -1143,7 +1146,7 @@ static void WriteConstantInt(raw_ostream &Out, const Constant *CV, /// ostream. This can be useful when you just want to print int %reg126, not /// the whole instruction that generated it. /// -static void WriteAsOperandInternal(raw_ostream &Out, const Value *V, +static void WriteAsOperandInternal(formatted_raw_ostream &Out, const Value *V, TypePrinting &TypePrinter, SlotTracker *Machine) { if (V->hasName()) { @@ -1233,14 +1236,15 @@ void llvm::WriteAsOperand(raw_ostream &Out, const Value *V, bool PrintType, Out << ' '; } - WriteAsOperandInternal(Out, V, TypePrinter, 0); + formatted_raw_ostream FOut(Out); + WriteAsOperandInternal(FOut, V, TypePrinter, 0); } namespace { class AssemblyWriter { - raw_ostream &Out; + formatted_raw_ostream &Out; SlotTracker &Machine; const Module *TheModule; TypePrinting TypePrinter; @@ -1251,7 +1255,8 @@ class AssemblyWriter { std::map MDNodes; unsigned MetadataIDNo; public: - inline AssemblyWriter(raw_ostream &o, SlotTracker &Mac, const Module *M, + inline AssemblyWriter(formatted_raw_ostream &o, SlotTracker &Mac, + const Module *M, AssemblyAnnotationWriter *AAW) : Out(o), Machine(Mac), TheModule(M), AnnotationWriter(AAW), MetadataIDNo(0) { AddModuleTypesToPrinter(TypePrinter, NumberedTypes, M); @@ -1403,7 +1408,8 @@ void AssemblyWriter::printModule(const Module *M) { WriteMDNodes(Out, TypePrinter, Machine); } -static void PrintLinkage(GlobalValue::LinkageTypes LT, raw_ostream &Out) { +static void PrintLinkage(GlobalValue::LinkageTypes LT, + formatted_raw_ostream &Out) { switch (LT) { case GlobalValue::ExternalLinkage: break; case GlobalValue::PrivateLinkage: Out << "private "; break; @@ -1428,7 +1434,7 @@ static void PrintLinkage(GlobalValue::LinkageTypes LT, raw_ostream &Out) { static void PrintVisibility(GlobalValue::VisibilityTypes Vis, - raw_ostream &Out) { + formatted_raw_ostream &Out) { switch (Vis) { default: llvm_unreachable("Invalid visibility style!"); case GlobalValue::DefaultVisibility: break; @@ -1519,7 +1525,8 @@ void AssemblyWriter::printTypeSymbolTable(const TypeSymbolTable &ST) { // Make sure we print out at least one level of the type structure, so // that we do not get %2 = type %2 TypePrinter.printAtLeastOneLevel(NumberedTypes[i], Out); - Out << "\t\t; type %" << i << '\n'; + Out.PadToColumn(50); + Out << "; type %" << i << '\n'; } // Print the named types. @@ -1668,11 +1675,13 @@ void AssemblyWriter::printBasicBlock(const BasicBlock *BB) { Out << ""; } - if (BB->getParent() == 0) - Out << "\t\t; Error: Block without parent!"; - else if (BB != &BB->getParent()->getEntryBlock()) { // Not the entry block? + if (BB->getParent() == 0) { + Out.PadToColumn(50); + Out << "; Error: Block without parent!"; + } else if (BB != &BB->getParent()->getEntryBlock()) { // Not the entry block? // Output predecessors for the block... - Out << "\t\t;"; + Out.PadToColumn(50); + Out << ";"; pred_const_iterator PI = pred_begin(BB), PE = pred_end(BB); if (PI == PE) { @@ -1706,7 +1715,8 @@ void AssemblyWriter::printBasicBlock(const BasicBlock *BB) { /// void AssemblyWriter::printInfoComment(const Value &V) { if (V.getType() != Type::VoidTy) { - Out << "\t\t; <"; + Out.PadToColumn(50); + Out << "; <"; TypePrinter.print(V.getType(), Out); Out << '>'; @@ -1991,8 +2001,9 @@ void Module::print(std::ostream &o, AssemblyAnnotationWriter *AAW) const { raw_os_ostream OS(o); print(OS, AAW); } -void Module::print(raw_ostream &OS, AssemblyAnnotationWriter *AAW) const { +void Module::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW) const { SlotTracker SlotTable(this); + formatted_raw_ostream OS(ROS); AssemblyWriter W(OS, SlotTable, this, AAW); W.write(this); } @@ -2010,7 +2021,8 @@ void Type::print(raw_ostream &OS) const { TypePrinting().print(this, OS); } -void Value::print(raw_ostream &OS, AssemblyAnnotationWriter *AAW) const { +void Value::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW) const { + formatted_raw_ostream OS(ROS); if (this == 0) { OS << "printing a value\n"; return; diff --git a/test/Analysis/ScalarEvolution/avoid-smax-1.ll b/test/Analysis/ScalarEvolution/avoid-smax-1.ll index 9270b6e6c89..74117cf8f44 100644 --- a/test/Analysis/ScalarEvolution/avoid-smax-1.ll +++ b/test/Analysis/ScalarEvolution/avoid-smax-1.ll @@ -1,6 +1,6 @@ ; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t ; RUN: grep select %t | count 2 -; RUN: grep {icmp ne i32.\* %w } %t +; RUN: grep {icmp ne i32.\* %w } %t ; Indvars should be able to insert a canonical induction variable ; for the bb6 loop without using a maximum calculation (icmp, select) diff --git a/test/Integer/a15.ll.out b/test/Integer/a15.ll.out index e9eb800b0bd..74387ccd6d9 100644 --- a/test/Integer/a15.ll.out +++ b/test/Integer/a15.ll.out @@ -1,20 +1,20 @@ ; ModuleID = '' -@b = constant i15 0 ; [#uses=0] -@c = constant i15 -2 ; [#uses=0] -@d = constant i15 0 ; [#uses=0] -@e = constant i15 -1 ; [#uses=0] -@f = constant i15 1 ; [#uses=0] -@g = constant i15 3 ; [#uses=0] -@h = constant i15 undef ; [#uses=0] -@i = constant i15 -16384 ; [#uses=0] -@j = constant i15 1 ; [#uses=0] -@l = constant i15 -1 ; [#uses=0] -@n = constant i15 -2 ; [#uses=0] -@q = constant i15 16381 ; [#uses=0] -@r = constant i15 0 ; [#uses=0] -@s = constant i15 2 ; [#uses=0] -@t = constant i15 1 ; [#uses=0] -@u = constant i15 0 ; [#uses=0] -@o = constant i15 0 ; [#uses=0] -@p = constant i15 -1 ; [#uses=0] -@v = constant i15 -1 ; [#uses=0] +@b = constant i15 0 ; [#uses=0] +@c = constant i15 -2 ; [#uses=0] +@d = constant i15 0 ; [#uses=0] +@e = constant i15 -1 ; [#uses=0] +@f = constant i15 1 ; [#uses=0] +@g = constant i15 3 ; [#uses=0] +@h = constant i15 undef ; [#uses=0] +@i = constant i15 -16384 ; [#uses=0] +@j = constant i15 1 ; [#uses=0] +@l = constant i15 -1 ; [#uses=0] +@n = constant i15 -2 ; [#uses=0] +@q = constant i15 16381 ; [#uses=0] +@r = constant i15 0 ; [#uses=0] +@s = constant i15 2 ; [#uses=0] +@t = constant i15 1 ; [#uses=0] +@u = constant i15 0 ; [#uses=0] +@o = constant i15 0 ; [#uses=0] +@p = constant i15 -1 ; [#uses=0] +@v = constant i15 -1 ; [#uses=0] diff --git a/test/Integer/a17.ll.out b/test/Integer/a17.ll.out index d24f62b63c3..6ded8452f6d 100644 --- a/test/Integer/a17.ll.out +++ b/test/Integer/a17.ll.out @@ -1,19 +1,19 @@ ; ModuleID = '' -@b = constant i17 0 ; [#uses=0] -@c = constant i17 -2 ; [#uses=0] -@d = constant i17 0 ; [#uses=0] -@e = constant i17 -1 ; [#uses=0] -@f = constant i17 1 ; [#uses=0] -@g = constant i17 3 ; [#uses=0] -@h = constant i17 undef ; [#uses=0] -@i = constant i17 -65536 ; [#uses=0] -@j = constant i17 1 ; [#uses=0] -@l = constant i17 -1 ; [#uses=0] -@n = constant i17 -2 ; [#uses=0] -@q = constant i17 0 ; [#uses=0] -@r = constant i17 2 ; [#uses=0] -@s = constant i17 1 ; [#uses=0] -@t = constant i17 0 ; [#uses=0] -@o = constant i17 0 ; [#uses=0] -@p = constant i17 -1 ; [#uses=0] -@v = constant i17 -1 ; [#uses=0] +@b = constant i17 0 ; [#uses=0] +@c = constant i17 -2 ; [#uses=0] +@d = constant i17 0 ; [#uses=0] +@e = constant i17 -1 ; [#uses=0] +@f = constant i17 1 ; [#uses=0] +@g = constant i17 3 ; [#uses=0] +@h = constant i17 undef ; [#uses=0] +@i = constant i17 -65536 ; [#uses=0] +@j = constant i17 1 ; [#uses=0] +@l = constant i17 -1 ; [#uses=0] +@n = constant i17 -2 ; [#uses=0] +@q = constant i17 0 ; [#uses=0] +@r = constant i17 2 ; [#uses=0] +@s = constant i17 1 ; [#uses=0] +@t = constant i17 0 ; [#uses=0] +@o = constant i17 0 ; [#uses=0] +@p = constant i17 -1 ; [#uses=0] +@v = constant i17 -1 ; [#uses=0] diff --git a/test/Integer/a31.ll.out b/test/Integer/a31.ll.out index fb8d250b436..c7892ea7225 100644 --- a/test/Integer/a31.ll.out +++ b/test/Integer/a31.ll.out @@ -1,19 +1,19 @@ ; ModuleID = '' -@b = constant i31 0 ; [#uses=0] -@c = constant i31 -2 ; [#uses=0] -@d = constant i31 0 ; [#uses=0] -@e = constant i31 -1 ; [#uses=0] -@f = constant i31 1 ; [#uses=0] -@g = constant i31 3 ; [#uses=0] -@h = constant i31 undef ; [#uses=0] -@i = constant i31 -1073741824 ; [#uses=0] -@j = constant i31 1 ; [#uses=0] -@l = constant i31 -1 ; [#uses=0] -@n = constant i31 -2 ; [#uses=0] -@q = constant i31 0 ; [#uses=0] -@r = constant i31 2 ; [#uses=0] -@s = constant i31 1 ; [#uses=0] -@t = constant i31 0 ; [#uses=0] -@o = constant i31 0 ; [#uses=0] -@p = constant i31 -1 ; [#uses=0] -@u = constant i31 -3 ; [#uses=0] +@b = constant i31 0 ; [#uses=0] +@c = constant i31 -2 ; [#uses=0] +@d = constant i31 0 ; [#uses=0] +@e = constant i31 -1 ; [#uses=0] +@f = constant i31 1 ; [#uses=0] +@g = constant i31 3 ; [#uses=0] +@h = constant i31 undef ; [#uses=0] +@i = constant i31 -1073741824 ; [#uses=0] +@j = constant i31 1 ; [#uses=0] +@l = constant i31 -1 ; [#uses=0] +@n = constant i31 -2 ; [#uses=0] +@q = constant i31 0 ; [#uses=0] +@r = constant i31 2 ; [#uses=0] +@s = constant i31 1 ; [#uses=0] +@t = constant i31 0 ; [#uses=0] +@o = constant i31 0 ; [#uses=0] +@p = constant i31 -1 ; [#uses=0] +@u = constant i31 -3 ; [#uses=0] diff --git a/test/Integer/a33.ll.out b/test/Integer/a33.ll.out index f495d0dc976..6f723b45e5c 100644 --- a/test/Integer/a33.ll.out +++ b/test/Integer/a33.ll.out @@ -1,19 +1,19 @@ ; ModuleID = '' -@b = constant i33 0 ; [#uses=0] -@c = constant i33 -2 ; [#uses=0] -@d = constant i33 0 ; [#uses=0] -@e = constant i33 -1 ; [#uses=0] -@f = constant i33 1 ; [#uses=0] -@g = constant i33 3 ; [#uses=0] -@h = constant i33 undef ; [#uses=0] -@i = constant i33 -4294967296 ; [#uses=0] -@j = constant i33 1 ; [#uses=0] -@l = constant i33 -1 ; [#uses=0] -@n = constant i33 -2 ; [#uses=0] -@q = constant i33 0 ; [#uses=0] -@r = constant i33 2 ; [#uses=0] -@s = constant i33 1 ; [#uses=0] -@t = constant i33 0 ; [#uses=0] -@o = constant i33 0 ; [#uses=0] -@p = constant i33 -1 ; [#uses=0] -@u = constant i33 -1 ; [#uses=0] +@b = constant i33 0 ; [#uses=0] +@c = constant i33 -2 ; [#uses=0] +@d = constant i33 0 ; [#uses=0] +@e = constant i33 -1 ; [#uses=0] +@f = constant i33 1 ; [#uses=0] +@g = constant i33 3 ; [#uses=0] +@h = constant i33 undef ; [#uses=0] +@i = constant i33 -4294967296 ; [#uses=0] +@j = constant i33 1 ; [#uses=0] +@l = constant i33 -1 ; [#uses=0] +@n = constant i33 -2 ; [#uses=0] +@q = constant i33 0 ; [#uses=0] +@r = constant i33 2 ; [#uses=0] +@s = constant i33 1 ; [#uses=0] +@t = constant i33 0 ; [#uses=0] +@o = constant i33 0 ; [#uses=0] +@p = constant i33 -1 ; [#uses=0] +@u = constant i33 -1 ; [#uses=0] diff --git a/test/Integer/a63.ll.out b/test/Integer/a63.ll.out index c770608ed1e..21cef72d80e 100644 --- a/test/Integer/a63.ll.out +++ b/test/Integer/a63.ll.out @@ -1,19 +1,19 @@ ; ModuleID = '' -@b = constant i63 0 ; [#uses=0] -@c = constant i63 -2 ; [#uses=0] -@d = constant i63 0 ; [#uses=0] -@e = constant i63 -1 ; [#uses=0] -@f = constant i63 1 ; [#uses=0] -@g = constant i63 3 ; [#uses=0] -@h = constant i63 undef ; [#uses=0] -@i = constant i63 -4611686018427387904 ; [#uses=0] -@j = constant i63 1 ; [#uses=0] -@l = constant i63 -1 ; [#uses=0] -@n = constant i63 -2 ; [#uses=0] -@q = constant i63 0 ; [#uses=0] -@u = constant i63 -1 ; [#uses=0] -@r = constant i63 2 ; [#uses=0] -@s = constant i63 1 ; [#uses=0] -@t = constant i63 0 ; [#uses=0] -@o = constant i63 0 ; [#uses=0] -@p = constant i63 -1 ; [#uses=0] +@b = constant i63 0 ; [#uses=0] +@c = constant i63 -2 ; [#uses=0] +@d = constant i63 0 ; [#uses=0] +@e = constant i63 -1 ; [#uses=0] +@f = constant i63 1 ; [#uses=0] +@g = constant i63 3 ; [#uses=0] +@h = constant i63 undef ; [#uses=0] +@i = constant i63 -4611686018427387904 ; [#uses=0] +@j = constant i63 1 ; [#uses=0] +@l = constant i63 -1 ; [#uses=0] +@n = constant i63 -2 ; [#uses=0] +@q = constant i63 0 ; [#uses=0] +@u = constant i63 -1 ; [#uses=0] +@r = constant i63 2 ; [#uses=0] +@s = constant i63 1 ; [#uses=0] +@t = constant i63 0 ; [#uses=0] +@o = constant i63 0 ; [#uses=0] +@p = constant i63 -1 ; [#uses=0] diff --git a/test/Integer/a7.ll.out b/test/Integer/a7.ll.out index a6ed28816ff..78a114c087d 100644 --- a/test/Integer/a7.ll.out +++ b/test/Integer/a7.ll.out @@ -1,24 +1,24 @@ ; ModuleID = '' -@b = constant i7 0 ; [#uses=0] -@q = constant i7 63 ; [#uses=0] -@c = constant i7 -2 ; [#uses=0] -@d = constant i7 0 ; [#uses=0] -@e = constant i7 -1 ; [#uses=0] -@f = constant i7 1 ; [#uses=0] -@g = constant i7 3 ; [#uses=0] -@r = constant i7 5 ; [#uses=0] -@s = constant i7 5 ; [#uses=0] -@h = constant i7 undef ; [#uses=0] -@i = constant i7 -64 ; [#uses=0] -@j = constant i7 1 ; [#uses=0] -@l = constant i7 -1 ; [#uses=0] -@m2 = constant i7 -1 ; [#uses=0] -@n = constant i7 -2 ; [#uses=0] -@t = constant i7 -2 ; [#uses=0] -@u = constant i7 -64 ; [#uses=0] -@v = constant i7 0 ; [#uses=0] -@w = constant i7 2 ; [#uses=0] -@x = constant i7 1 ; [#uses=0] -@y = constant i7 0 ; [#uses=0] -@o = constant i7 0 ; [#uses=0] -@p = constant i7 -1 ; [#uses=0] +@b = constant i7 0 ; [#uses=0] +@q = constant i7 63 ; [#uses=0] +@c = constant i7 -2 ; [#uses=0] +@d = constant i7 0 ; [#uses=0] +@e = constant i7 -1 ; [#uses=0] +@f = constant i7 1 ; [#uses=0] +@g = constant i7 3 ; [#uses=0] +@r = constant i7 5 ; [#uses=0] +@s = constant i7 5 ; [#uses=0] +@h = constant i7 undef ; [#uses=0] +@i = constant i7 -64 ; [#uses=0] +@j = constant i7 1 ; [#uses=0] +@l = constant i7 -1 ; [#uses=0] +@m2 = constant i7 -1 ; [#uses=0] +@n = constant i7 -2 ; [#uses=0] +@t = constant i7 -2 ; [#uses=0] +@u = constant i7 -64 ; [#uses=0] +@v = constant i7 0 ; [#uses=0] +@w = constant i7 2 ; [#uses=0] +@x = constant i7 1 ; [#uses=0] +@y = constant i7 0 ; [#uses=0] +@o = constant i7 0 ; [#uses=0] +@p = constant i7 -1 ; [#uses=0] diff --git a/test/Integer/a9.ll.out b/test/Integer/a9.ll.out index 6525b9aad57..fd329d48121 100644 --- a/test/Integer/a9.ll.out +++ b/test/Integer/a9.ll.out @@ -1,18 +1,18 @@ ; ModuleID = '' -@b = constant i9 0 ; [#uses=0] -@c = constant i9 -2 ; [#uses=0] -@d = constant i9 0 ; [#uses=0] -@e = constant i9 -1 ; [#uses=0] -@f = constant i9 1 ; [#uses=0] -@g = constant i9 3 ; [#uses=0] -@h = constant i9 undef ; [#uses=0] -@i = constant i9 -256 ; [#uses=0] -@j = constant i9 1 ; [#uses=0] -@l = constant i9 -1 ; [#uses=0] -@n = constant i9 -2 ; [#uses=0] -@q = constant i9 0 ; [#uses=0] -@r = constant i9 255 ; [#uses=0] -@s = constant i9 0 ; [#uses=0] -@t = constant i9 1 ; [#uses=0] -@o = constant i9 0 ; [#uses=0] -@p = constant i9 -1 ; [#uses=0] +@b = constant i9 0 ; [#uses=0] +@c = constant i9 -2 ; [#uses=0] +@d = constant i9 0 ; [#uses=0] +@e = constant i9 -1 ; [#uses=0] +@f = constant i9 1 ; [#uses=0] +@g = constant i9 3 ; [#uses=0] +@h = constant i9 undef ; [#uses=0] +@i = constant i9 -256 ; [#uses=0] +@j = constant i9 1 ; [#uses=0] +@l = constant i9 -1 ; [#uses=0] +@n = constant i9 -2 ; [#uses=0] +@q = constant i9 0 ; [#uses=0] +@r = constant i9 255 ; [#uses=0] +@s = constant i9 0 ; [#uses=0] +@t = constant i9 1 ; [#uses=0] +@o = constant i9 0 ; [#uses=0] +@p = constant i9 -1 ; [#uses=0] diff --git a/test/Transforms/InstCombine/urem-simplify-bug.ll b/test/Transforms/InstCombine/urem-simplify-bug.ll index 15956f26b69..8980e732c6c 100644 --- a/test/Transforms/InstCombine/urem-simplify-bug.ll +++ b/test/Transforms/InstCombine/urem-simplify-bug.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {= or i32 %x, -5 } +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {= or i32 %x, -5 } @.str = internal constant [5 x i8] c"foo\0A\00" ; <[5 x i8]*> [#uses=1] @.str1 = internal constant [5 x i8] c"bar\0A\00" ; <[5 x i8]*> [#uses=1]