diff options
Diffstat (limited to 'llvm')
23 files changed, 106 insertions, 111 deletions
diff --git a/llvm/include/llvm/IR/ValueSymbolTable.h b/llvm/include/llvm/IR/ValueSymbolTable.h index edeb31030ed..65bd7fc2fec 100644 --- a/llvm/include/llvm/IR/ValueSymbolTable.h +++ b/llvm/include/llvm/IR/ValueSymbolTable.h @@ -14,6 +14,7 @@ #ifndef LLVM_IR_VALUESYMBOLTABLE_H #define LLVM_IR_VALUESYMBOLTABLE_H +#include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringMap.h" #include "llvm/IR/Value.h" #include "llvm/Support/DataTypes.h" @@ -99,6 +100,8 @@ public: /// @name Mutators /// @{ private: + ValueName *makeUniqueName(Value *V, SmallString<256> &UniqueName); + /// This method adds the provided value \p N to the symbol table. The Value /// must have a name which is used to place the value in the symbol table. /// If the inserted name conflicts, this renames the value. diff --git a/llvm/lib/IR/ValueSymbolTable.cpp b/llvm/lib/IR/ValueSymbolTable.cpp index e10142de823..deb6e7573e7 100644 --- a/llvm/lib/IR/ValueSymbolTable.cpp +++ b/llvm/lib/IR/ValueSymbolTable.cpp @@ -32,6 +32,24 @@ ValueSymbolTable::~ValueSymbolTable() { #endif } +ValueName *ValueSymbolTable::makeUniqueName(Value *V, + SmallString<256> &UniqueName) { + unsigned BaseSize = UniqueName.size(); + while (1) { + // Trim any suffix off and append the next number. + UniqueName.resize(BaseSize); + raw_svector_ostream S(UniqueName); + if (isa<GlobalValue>(V)) + S << "."; + S << ++LastUnique; + + // Try insert the vmap entry with this suffix. + auto IterBool = vmap.insert(std::make_pair(UniqueName, V)); + if (IterBool.second) + return &*IterBool.first; + } +} + // Insert a value into the symbol table with the specified name... // void ValueSymbolTable::reinsertValue(Value* V) { @@ -49,21 +67,8 @@ void ValueSymbolTable::reinsertValue(Value* V) { // The name is too already used, just free it so we can allocate a new name. V->getValueName()->Destroy(); - unsigned BaseSize = UniqueName.size(); - while (1) { - // Trim any suffix off and append the next number. - UniqueName.resize(BaseSize); - raw_svector_ostream(UniqueName) << "." << ++LastUnique; - - // Try insert the vmap entry with this suffix. - auto IterBool = vmap.insert(std::make_pair(UniqueName, V)); - if (IterBool.second) { - // Newly inserted name. Success! - V->setValueName(&*IterBool.first); - //DEBUG(dbgs() << " Inserted value: " << UniqueName << ": " << *V << "\n"); - return; - } - } + ValueName *VN = makeUniqueName(V, UniqueName); + V->setValueName(VN); } void ValueSymbolTable::removeValueName(ValueName *V) { @@ -86,20 +91,7 @@ ValueName *ValueSymbolTable::createValueName(StringRef Name, Value *V) { // Otherwise, there is a naming conflict. Rename this value. SmallString<256> UniqueName(Name.begin(), Name.end()); - - while (1) { - // Trim any suffix off and append the next number. - UniqueName.resize(Name.size()); - raw_svector_ostream(UniqueName) << ++LastUnique; - - // Try insert the vmap entry with this suffix. - auto IterBool = vmap.insert(std::make_pair(UniqueName, V)); - if (IterBool.second) { - // DEBUG(dbgs() << " Inserted value: " << UniqueName << ": " << *V << - // "\n"); - return &*IterBool.first; - } - } + return makeUniqueName(V, UniqueName); } diff --git a/llvm/test/CodeGen/NVPTX/symbol-naming.ll b/llvm/test/CodeGen/NVPTX/symbol-naming.ll index 0f176934ca3..7a3e6310ffd 100644 --- a/llvm/test/CodeGen/NVPTX/symbol-naming.ll +++ b/llvm/test/CodeGen/NVPTX/symbol-naming.ll @@ -7,10 +7,10 @@ ; PTX32-NOT: .str ; PTX64-NOT: .str -; PTX32-DAG: _$_str1 +; PTX32-DAG: _$_str.1 ; PTX32-DAG: _$_str -; PTX64-DAG: _$_str1 +; PTX64-DAG: _$_str.1 ; PTX64-DAG: _$_str target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64" diff --git a/llvm/test/Linker/2003-01-30-LinkerRename.ll b/llvm/test/Linker/2003-01-30-LinkerRename.ll index 1e25d3eef0c..1844e936baf 100644 --- a/llvm/test/Linker/2003-01-30-LinkerRename.ll +++ b/llvm/test/Linker/2003-01-30-LinkerRename.ll @@ -2,9 +2,9 @@ ; RUN: llvm-as %s -o %t.2.bc ; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s -; CHECK: @bar = global i32 ()* @foo2 +; CHECK: @bar = global i32 ()* @foo.2 -; CHECK: define internal i32 @foo2() { +; CHECK: define internal i32 @foo.2() { ; CHECK-NEXT: ret i32 7 ; CHECK-NEXT: } diff --git a/llvm/test/Linker/2003-05-31-LinkerRename.ll b/llvm/test/Linker/2003-05-31-LinkerRename.ll index 0261fe3a920..e10e239071a 100644 --- a/llvm/test/Linker/2003-05-31-LinkerRename.ll +++ b/llvm/test/Linker/2003-05-31-LinkerRename.ll @@ -2,9 +2,9 @@ ; RUN: llvm-as %s -o %t.2.bc ; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s -; CHECK: @bar = global i32 ()* @foo2 +; CHECK: @bar = global i32 ()* @foo.2 -; CHECK: define internal i32 @foo2() { +; CHECK: define internal i32 @foo.2() { ; CHECK-NEXT: ret i32 7 ; CHECK-NEXT: } diff --git a/llvm/test/Linker/override-with-internal-linkage.ll b/llvm/test/Linker/override-with-internal-linkage.ll index d3a79479932..59bd214c204 100644 --- a/llvm/test/Linker/override-with-internal-linkage.ll +++ b/llvm/test/Linker/override-with-internal-linkage.ll @@ -3,14 +3,14 @@ ; CHECK-LABEL: define i32 @main( ; CHECK-NEXT: entry: -; CHECK-NEXT: call i32 @foo2( +; CHECK-NEXT: call i32 @foo.2( define i32 @main(i32 %argc, i8** %argv) { entry: %a = call i32 @foo(i32 2) ret i32 %a } -; CHECK-LABEL: define internal i32 @foo2( +; CHECK-LABEL: define internal i32 @foo.2( ; CHECK-NEXT: entry: ; CHECK-NEXT: %add = add nsw i32 %i, %i ; CHECK-NEXT: ret i32 %add diff --git a/llvm/test/Linker/testlink.ll b/llvm/test/Linker/testlink.ll index 2e9447ddfd3..82a2229f57a 100644 --- a/llvm/test/Linker/testlink.ll +++ b/llvm/test/Linker/testlink.ll @@ -43,7 +43,7 @@ ; This should get renamed since there is a definition that is non-internal in ; the other module. -; CHECK-DAG: @Intern2{{[0-9]+}} = internal constant i32 792 +; CHECK-DAG: @Intern2.{{[0-9]+}} = internal constant i32 792 @Intern2 = internal constant i32 792 @UseIntern2 = global i32* @Intern2 diff --git a/llvm/test/Transforms/BBVectorize/simple3.ll b/llvm/test/Transforms/BBVectorize/simple3.ll index da7f9414941..6edf7f07ac1 100644 --- a/llvm/test/Transforms/BBVectorize/simple3.ll +++ b/llvm/test/Transforms/BBVectorize/simple3.ll @@ -4,12 +4,12 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3 ; Basic depth-3 chain define double @test1(double %A1, double %A2, double %A3, double %B1, double %B2, double %B3) { ; CHECK-LABEL: @test1( -; CHECK: %X1.v.i1.1.1 = insertelement <3 x double> undef, double %B1, i32 0 -; CHECK: %X1.v.i1.2.2 = insertelement <3 x double> %X1.v.i1.1.1, double %B2, i32 1 -; CHECK: %X1.v.i1 = insertelement <3 x double> %X1.v.i1.2.2, double %B3, i32 2 -; CHECK: %X1.v.i0.1.3 = insertelement <3 x double> undef, double %A1, i32 0 -; CHECK: %X1.v.i0.2.4 = insertelement <3 x double> %X1.v.i0.1.3, double %A2, i32 1 -; CHECK: %X1.v.i0 = insertelement <3 x double> %X1.v.i0.2.4, double %A3, i32 2 +; CHECK: %X1.v.i1.11 = insertelement <3 x double> undef, double %B1, i32 0 +; CHECK: %X1.v.i1.22 = insertelement <3 x double> %X1.v.i1.11, double %B2, i32 1 +; CHECK: %X1.v.i1 = insertelement <3 x double> %X1.v.i1.22, double %B3, i32 2 +; CHECK: %X1.v.i0.13 = insertelement <3 x double> undef, double %A1, i32 0 +; CHECK: %X1.v.i0.24 = insertelement <3 x double> %X1.v.i0.13, double %A2, i32 1 +; CHECK: %X1.v.i0 = insertelement <3 x double> %X1.v.i0.24, double %A3, i32 2 %X1 = fsub double %A1, %B1 %X2 = fsub double %A2, %B2 %X3 = fsub double %A3, %B3 @@ -24,11 +24,11 @@ define double @test1(double %A1, double %A2, double %A3, double %B1, double %B2, ; CHECK: %Z1 = fadd <3 x double> %Y1, %X1.v.i1 %R1 = fmul double %Z1, %Z2 %R = fmul double %R1, %Z3 -; CHECK: %Z1.v.r2.10 = extractelement <3 x double> %Z1, i32 2 +; CHECK: %Z1.v.r210 = extractelement <3 x double> %Z1, i32 2 ; CHECK: %Z1.v.r1 = extractelement <3 x double> %Z1, i32 0 ; CHECK: %Z1.v.r2 = extractelement <3 x double> %Z1, i32 1 ; CHECK: %R1 = fmul double %Z1.v.r1, %Z1.v.r2 -; CHECK: %R = fmul double %R1, %Z1.v.r2.10 +; CHECK: %R = fmul double %R1, %Z1.v.r210 ret double %R ; CHECK: ret double %R } diff --git a/llvm/test/Transforms/Inline/noalias-cs.ll b/llvm/test/Transforms/Inline/noalias-cs.ll index 0bff1882e83..8528a391cf9 100644 --- a/llvm/test/Transforms/Inline/noalias-cs.ll +++ b/llvm/test/Transforms/Inline/noalias-cs.ll @@ -34,13 +34,13 @@ entry: ; CHECK: %arrayidx.i = getelementptr inbounds float, float* %a, i64 7 ; CHECK: store float %1, float* %arrayidx.i, align 4, !noalias !16 ; CHECK: %2 = load float, float* %a, align 4, !alias.scope !16, !noalias !17 -; CHECK: %arrayidx.i.i.1 = getelementptr inbounds float, float* %b, i64 5 -; CHECK: store float %2, float* %arrayidx.i.i.1, align 4, !alias.scope !21, !noalias !22 -; CHECK: %arrayidx1.i.i.2 = getelementptr inbounds float, float* %b, i64 8 -; CHECK: store float %2, float* %arrayidx1.i.i.2, align 4, !alias.scope !23, !noalias !24 +; CHECK: %arrayidx.i.i1 = getelementptr inbounds float, float* %b, i64 5 +; CHECK: store float %2, float* %arrayidx.i.i1, align 4, !alias.scope !21, !noalias !22 +; CHECK: %arrayidx1.i.i2 = getelementptr inbounds float, float* %b, i64 8 +; CHECK: store float %2, float* %arrayidx1.i.i2, align 4, !alias.scope !23, !noalias !24 ; CHECK: %3 = load float, float* %a, align 4, !alias.scope !16 -; CHECK: %arrayidx.i.3 = getelementptr inbounds float, float* %b, i64 7 -; CHECK: store float %3, float* %arrayidx.i.3, align 4, !alias.scope !16 +; CHECK: %arrayidx.i3 = getelementptr inbounds float, float* %b, i64 7 +; CHECK: store float %3, float* %arrayidx.i3, align 4, !alias.scope !16 ; CHECK: ret void ; CHECK: } diff --git a/llvm/test/Transforms/Inline/noalias2.ll b/llvm/test/Transforms/Inline/noalias2.ll index df135b0a318..432fccf431c 100644 --- a/llvm/test/Transforms/Inline/noalias2.ll +++ b/llvm/test/Transforms/Inline/noalias2.ll @@ -61,8 +61,8 @@ entry: ; CHECK: %arrayidx.i = getelementptr inbounds float, float* %a, i64 7 ; CHECK: store float %1, float* %arrayidx.i, align 4, !alias.scope !14, !noalias !13 ; CHECK: %2 = load float, float* %c, align 4, !noalias !15 -; CHECK: %arrayidx.i.1 = getelementptr inbounds float, float* %a, i64 6 -; CHECK: store float %2, float* %arrayidx.i.1, align 4, !alias.scope !19, !noalias !20 +; CHECK: %arrayidx.i1 = getelementptr inbounds float, float* %a, i64 6 +; CHECK: store float %2, float* %arrayidx.i1, align 4, !alias.scope !19, !noalias !20 ; CHECK: %arrayidx1.i = getelementptr inbounds float, float* %b, i64 8 ; CHECK: store float %2, float* %arrayidx1.i, align 4, !alias.scope !20, !noalias !19 ; CHECK: %3 = load float, float* %c, align 4 diff --git a/llvm/test/Transforms/InstCombine/cast.ll b/llvm/test/Transforms/InstCombine/cast.ll index ba426c4a1ca..f8a94edfb7f 100644 --- a/llvm/test/Transforms/InstCombine/cast.ll +++ b/llvm/test/Transforms/InstCombine/cast.ll @@ -187,8 +187,8 @@ define i32 @test21(i32 %X) { %c2 = sext i8 %c1 to i32 ; <i32> [#uses=1] %RV = and i32 %c2, 255 ; <i32> [#uses=1] ret i32 %RV -; CHECK: %c2.1 = and i32 %X, 255 -; CHECK: ret i32 %c2.1 +; CHECK: %c21 = and i32 %X, 255 +; CHECK: ret i32 %c21 } define i32 @test22(i32 %X) { diff --git a/llvm/test/Transforms/InstCombine/shift.ll b/llvm/test/Transforms/InstCombine/shift.ll index 79c2ae28105..0b5b5deb68c 100644 --- a/llvm/test/Transforms/InstCombine/shift.ll +++ b/llvm/test/Transforms/InstCombine/shift.ll @@ -575,7 +575,7 @@ entry: ; CHECK: %0 = shl i8 %tmp4, 2 ; CHECK: %tmp54 = and i8 %0, 16 %tmp55 = xor i8 %tmp54, %tmp51 -; CHECK: ret i8 %tmp55.1 +; CHECK: ret i8 %tmp551 ret i8 %tmp55 } @@ -743,7 +743,7 @@ define i32 @test57(i32 %x) { %or = or i32 %shl, 7 ret i32 %or ; CHECK-LABEL: @test57( -; CHECK: %shl = shl i32 %shr.1, 4 +; CHECK: %shl = shl i32 %shr1, 4 } diff --git a/llvm/test/Transforms/InstCombine/xor.ll b/llvm/test/Transforms/InstCombine/xor.ll index 33d5a2a9fda..c8debcbac22 100644 --- a/llvm/test/Transforms/InstCombine/xor.ll +++ b/llvm/test/Transforms/InstCombine/xor.ll @@ -63,8 +63,8 @@ define i32 @test7(i32 %A, i32 %B) { ; CHECK-LABEL: @test7( ; CHECK-NEXT: %A1 = and i32 %A, 7 ; CHECK-NEXT: %B1 = and i32 %B, 128 -; CHECK-NEXT: %C1.1 = or i32 %A1, %B1 -; CHECK-NEXT: ret i32 %C1.1 +; CHECK-NEXT: %C11 = or i32 %A1, %B1 +; CHECK-NEXT: ret i32 %C11 %A1 = and i32 %A, 7 ; <i32> [#uses=1] %B1 = and i32 %B, 128 ; <i32> [#uses=1] %C1 = xor i32 %A1, %B1 ; <i32> [#uses=1] @@ -96,8 +96,8 @@ define i1 @test9(i8 %A) { define i8 @test10(i8 %A) { ; CHECK-LABEL: @test10( ; CHECK-NEXT: %B = and i8 %A, 3 -; CHECK-NEXT: %C.1 = or i8 %B, 4 -; CHECK-NEXT: ret i8 %C.1 +; CHECK-NEXT: %C1 = or i8 %B, 4 +; CHECK-NEXT: ret i8 %C1 %B = and i8 %A, 3 ; <i8> [#uses=1] %C = xor i8 %B, 4 ; <i8> [#uses=1] ret i8 %C diff --git a/llvm/test/Transforms/LoopUnswitch/2011-11-18-SimpleSwitch.ll b/llvm/test/Transforms/LoopUnswitch/2011-11-18-SimpleSwitch.ll index abeea209f63..a35596aff11 100644 --- a/llvm/test/Transforms/LoopUnswitch/2011-11-18-SimpleSwitch.ll +++ b/llvm/test/Transforms/LoopUnswitch/2011-11-18-SimpleSwitch.ll @@ -34,7 +34,7 @@ ; CHECK-NEXT: br label %loop_begin.us1 ; CHECK: loop_begin.us1: ; preds = %loop_begin.backedge.us5, %.split.split.us -; CHECK-NEXT: %var_val.us.2 = load i32, i32* %var +; CHECK-NEXT: %var_val.us2 = load i32, i32* %var ; CHECK-NEXT: switch i32 2, label %default.us-lcssa.us-lcssa.us [ ; CHECK-NEXT: i32 1, label %inc.us4 ; CHECK-NEXT: i32 2, label %dec.us3 diff --git a/llvm/test/Transforms/LoopUnswitch/2011-11-18-TwoSwitches.ll b/llvm/test/Transforms/LoopUnswitch/2011-11-18-TwoSwitches.ll index 02552ea5cc4..20f03c987eb 100644 --- a/llvm/test/Transforms/LoopUnswitch/2011-11-18-TwoSwitches.ll +++ b/llvm/test/Transforms/LoopUnswitch/2011-11-18-TwoSwitches.ll @@ -65,7 +65,7 @@ ; CHECK-NEXT: br label %loop_begin.us1 ; CHECK: loop_begin.us1: ; preds = %loop_begin.backedge.us6, %.split.split.us -; CHECK-NEXT: %var_val.us.2 = load i32, i32* %var +; CHECK-NEXT: %var_val.us2 = load i32, i32* %var ; CHECK-NEXT: switch i32 %c, label %second_switch.us3 [ ; CHECK-NEXT: i32 1, label %loop_begin.inc_crit_edge.us ; CHECK-NEXT: ] diff --git a/llvm/test/Transforms/LowerSwitch/feature.ll b/llvm/test/Transforms/LowerSwitch/feature.ll index b82d9345543..09d25f0b06d 100644 --- a/llvm/test/Transforms/LowerSwitch/feature.ll +++ b/llvm/test/Transforms/LowerSwitch/feature.ll @@ -4,49 +4,49 @@ ; On output we should got binary comparison tree. Check that all is fine. ;CHECK: entry: -;CHECK-NEXT: br label %NodeBlock.19 +;CHECK-NEXT: br label %NodeBlock19 -;CHECK: NodeBlock.19: ; preds = %entry -;CHECK-NEXT: %Pivot.20 = icmp slt i32 %tmp158, 10 -;CHECK-NEXT: br i1 %Pivot.20, label %NodeBlock.5, label %NodeBlock.17 +;CHECK: NodeBlock19: ; preds = %entry +;CHECK-NEXT: %Pivot20 = icmp slt i32 %tmp158, 10 +;CHECK-NEXT: br i1 %Pivot20, label %NodeBlock5, label %NodeBlock17 -;CHECK: NodeBlock.17: ; preds = %NodeBlock.19 -;CHECK-NEXT: %Pivot.18 = icmp slt i32 %tmp158, 13 -;CHECK-NEXT: br i1 %Pivot.18, label %NodeBlock.9, label %NodeBlock.15 +;CHECK: NodeBlock17: ; preds = %NodeBlock19 +;CHECK-NEXT: %Pivot18 = icmp slt i32 %tmp158, 13 +;CHECK-NEXT: br i1 %Pivot18, label %NodeBlock9, label %NodeBlock15 -;CHECK: NodeBlock.15: ; preds = %NodeBlock.17 -;CHECK-NEXT: %Pivot.16 = icmp slt i32 %tmp158, 14 -;CHECK-NEXT: br i1 %Pivot.16, label %bb330, label %NodeBlock.13 +;CHECK: NodeBlock15: ; preds = %NodeBlock17 +;CHECK-NEXT: %Pivot16 = icmp slt i32 %tmp158, 14 +;CHECK-NEXT: br i1 %Pivot16, label %bb330, label %NodeBlock13 -;CHECK: NodeBlock.13: ; preds = %NodeBlock.15 -;CHECK-NEXT: %Pivot.14 = icmp slt i32 %tmp158, 15 -;CHECK-NEXT: br i1 %Pivot.14, label %bb332, label %LeafBlock.11 +;CHECK: NodeBlock13: ; preds = %NodeBlock15 +;CHECK-NEXT: %Pivot14 = icmp slt i32 %tmp158, 15 +;CHECK-NEXT: br i1 %Pivot14, label %bb332, label %LeafBlock11 -;CHECK: LeafBlock.11: ; preds = %NodeBlock.13 +;CHECK: LeafBlock11: ; preds = %NodeBlock13 ;CHECK-NEXT: %SwitchLeaf12 = icmp eq i32 %tmp158, 15 ;CHECK-NEXT: br i1 %SwitchLeaf12, label %bb334, label %NewDefault -;CHECK: NodeBlock.9: ; preds = %NodeBlock.17 -;CHECK-NEXT: %Pivot.10 = icmp slt i32 %tmp158, 11 -;CHECK-NEXT: br i1 %Pivot.10, label %bb324, label %NodeBlock.7 +;CHECK: NodeBlock9: ; preds = %NodeBlock17 +;CHECK-NEXT: %Pivot10 = icmp slt i32 %tmp158, 11 +;CHECK-NEXT: br i1 %Pivot10, label %bb324, label %NodeBlock7 -;CHECK: NodeBlock.7: ; preds = %NodeBlock.9 -;CHECK-NEXT: %Pivot.8 = icmp slt i32 %tmp158, 12 -;CHECK-NEXT: br i1 %Pivot.8, label %bb326, label %bb328 +;CHECK: NodeBlock7: ; preds = %NodeBlock9 +;CHECK-NEXT: %Pivot8 = icmp slt i32 %tmp158, 12 +;CHECK-NEXT: br i1 %Pivot8, label %bb326, label %bb328 -;CHECK: NodeBlock.5: ; preds = %NodeBlock.19 -;CHECK-NEXT: %Pivot.6 = icmp slt i32 %tmp158, 7 -;CHECK-NEXT: br i1 %Pivot.6, label %NodeBlock, label %NodeBlock.3 +;CHECK: NodeBlock5: ; preds = %NodeBlock19 +;CHECK-NEXT: %Pivot6 = icmp slt i32 %tmp158, 7 +;CHECK-NEXT: br i1 %Pivot6, label %NodeBlock, label %NodeBlock3 -;CHECK: NodeBlock.3: ; preds = %NodeBlock.5 -;CHECK-NEXT: %Pivot.4 = icmp slt i32 %tmp158, 8 -;CHECK-NEXT: br i1 %Pivot.4, label %bb, label %NodeBlock.1 +;CHECK: NodeBlock3: ; preds = %NodeBlock5 +;CHECK-NEXT: %Pivot4 = icmp slt i32 %tmp158, 8 +;CHECK-NEXT: br i1 %Pivot4, label %bb, label %NodeBlock1 -;CHECK: NodeBlock.1: ; preds = %NodeBlock.3 -;CHECK-NEXT: %Pivot.2 = icmp slt i32 %tmp158, 9 -;CHECK-NEXT: br i1 %Pivot.2, label %bb338, label %bb322 +;CHECK: NodeBlock1: ; preds = %NodeBlock3 +;CHECK-NEXT: %Pivot2 = icmp slt i32 %tmp158, 9 +;CHECK-NEXT: br i1 %Pivot2, label %bb338, label %bb322 -;CHECK: NodeBlock: ; preds = %NodeBlock.5 +;CHECK: NodeBlock: ; preds = %NodeBlock5 ;CHECK-NEXT: %Pivot = icmp slt i32 %tmp158, 0 ;CHECK-NEXT: br i1 %Pivot, label %LeafBlock, label %bb338 diff --git a/llvm/test/Transforms/PlaceSafepoints/basic.ll b/llvm/test/Transforms/PlaceSafepoints/basic.ll index 32aa4da68f2..8cdbc217b84 100644 --- a/llvm/test/Transforms/PlaceSafepoints/basic.ll +++ b/llvm/test/Transforms/PlaceSafepoints/basic.ll @@ -74,7 +74,7 @@ define i1 @test_call_with_result() gc "statepoint-example" { ; CHECK: gc.statepoint.p0f_isVoidf ; CHECK: gc.statepoint.p0f_i1i1f ; CHECK: (i64 2882400000, i32 0, i1 (i1)* @i1_return_i1, i32 1, i32 0, i1 false, i32 0, i32 0) -; CHECK: %call1.2 = call i1 @llvm.experimental.gc.result.i1 +; CHECK: %call12 = call i1 @llvm.experimental.gc.result.i1 entry: %call1 = tail call i1 (i1) @i1_return_i1(i1 false) ret i1 %call1 diff --git a/llvm/test/Transforms/PlaceSafepoints/call_gc_result.ll b/llvm/test/Transforms/PlaceSafepoints/call_gc_result.ll index d78a0989c3b..46146e738f6 100644 --- a/llvm/test/Transforms/PlaceSafepoints/call_gc_result.ll +++ b/llvm/test/Transforms/PlaceSafepoints/call_gc_result.ll @@ -21,8 +21,8 @@ branch2: merge: ;; CHECK: %phi = phi i32 [ %a, %branch2 ], [ %b, %branch1 ] -;; CHECK-NEXT: %safepoint_token.1 = call i32 (i64, i32, i32 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i32f(i64 2882400000, i32 0, i32 ()* @foo, i32 0, i32 0, i32 0, i32 0) -;; CHECK-NEXT: %ret.2 = call i32 @llvm.experimental.gc.result.i32(i32 %safepoint_token.1) +;; CHECK-NEXT: %safepoint_token1 = call i32 (i64, i32, i32 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i32f(i64 2882400000, i32 0, i32 ()* @foo, i32 0, i32 0, i32 0, i32 0) +;; CHECK-NEXT: %ret2 = call i32 @llvm.experimental.gc.result.i32(i32 %safepoint_token1) %phi = phi i32 [ %a, %branch2 ], [ %b, %branch1 ] %ret = call i32 @foo() ret i32 %ret diff --git a/llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/rewrite-invoke.ll b/llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/rewrite-invoke.ll index 6c70c01c011..140fbdfefc7 100644 --- a/llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/rewrite-invoke.ll +++ b/llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/rewrite-invoke.ll @@ -26,7 +26,7 @@ unwind_dest: normal_dest: ; CHECK: normal_dest: -; CHECK-NEXT: %merge = phi i8 addrspace(1)* [ null, %entry ], [ %obj.2, %normal_dest1 ] +; CHECK-NEXT: %merge = phi i8 addrspace(1)* [ null, %entry ], [ %obj2, %normal_dest1 ] %merge = phi i8 addrspace(1)* [ null, %entry ], [ %obj, %gc_invoke ] ret i8 addrspace(1)* %merge } diff --git a/llvm/test/Transforms/RewriteStatepointsForGC/relocation.ll b/llvm/test/Transforms/RewriteStatepointsForGC/relocation.ll index 54833b36dc8..10ee08c25a4 100644 --- a/llvm/test/Transforms/RewriteStatepointsForGC/relocation.ll +++ b/llvm/test/Transforms/RewriteStatepointsForGC/relocation.ll @@ -94,7 +94,7 @@ join: ; CHECK-LABEL: join: ; CHECK: phi i8 addrspace(1)* ; CHECK-DAG: [ %arg.relocated, %if_branch ] -; CHECK-DAG: [ %arg.relocated3, %else_branch ] +; CHECK-DAG: [ %arg.relocated4, %else_branch ] ; CHECK-NOT: phi call void (i8 addrspace(1)*) @some_call(i8 addrspace(1)* %arg) ret void diff --git a/llvm/test/Transforms/Util/lowerswitch.ll b/llvm/test/Transforms/Util/lowerswitch.ll index 6e21f916c03..1eddb43c1a0 100644 --- a/llvm/test/Transforms/Util/lowerswitch.ll +++ b/llvm/test/Transforms/Util/lowerswitch.ll @@ -3,7 +3,7 @@ ; Test that we don't crash and have a different basic block for each incoming edge. define void @test0() { ; CHECK-LABEL: @test0 -; CHECK: %merge = phi i64 [ 1, %BB3 ], [ 0, %NewDefault ], [ 0, %NodeBlock.5 ], [ 0, %LeafBlock.1 ] +; CHECK: %merge = phi i64 [ 1, %BB3 ], [ 0, %NewDefault ], [ 0, %NodeBlock5 ], [ 0, %LeafBlock1 ] BB1: switch i32 undef, label %BB2 [ i32 3, label %BB2 @@ -43,9 +43,9 @@ bb2: bb3: ; CHECK-LABEL: bb3 -; CHECK: %tmp = phi i32 [ 1, %NodeBlock ], [ 0, %bb2 ], [ 1, %LeafBlock.3 ] +; CHECK: %tmp = phi i32 [ 1, %NodeBlock ], [ 0, %bb2 ], [ 1, %LeafBlock3 ] %tmp = phi i32 [ 1, %bb1 ], [ 0, %bb2 ], [ 1, %bb1 ], [ 1, %bb1 ] -; CHECK-NEXT: %tmp2 = phi i32 [ 2, %NodeBlock ], [ 5, %bb2 ], [ 2, %LeafBlock.3 ] +; CHECK-NEXT: %tmp2 = phi i32 [ 2, %NodeBlock ], [ 5, %bb2 ], [ 2, %LeafBlock3 ] %tmp2 = phi i32 [ 2, %bb1 ], [ 2, %bb1 ], [ 5, %bb2 ], [ 2, %bb1 ] br label %exit diff --git a/llvm/test/tools/gold/X86/comdat.ll b/llvm/test/tools/gold/X86/comdat.ll index fb132fd4451..ccfb80cd5ec 100644 --- a/llvm/test/tools/gold/X86/comdat.ll +++ b/llvm/test/tools/gold/X86/comdat.ll @@ -35,7 +35,7 @@ bb11: ; CHECK: @r21 = global i32* @v1{{$}} ; CHECK: @r22 = global i32 (i8*)* @f1{{$}} -; CHECK: @v11 = internal global i32 41, comdat($c2) +; CHECK: @v1.1 = internal global i32 41, comdat($c2) ; CHECK: @a11 = alias i32, i32* @v1{{$}} ; CHECK: @a12 = alias i16, bitcast (i32* @v1 to i16*) @@ -43,11 +43,11 @@ bb11: ; CHECK: @a13 = alias i32 (i8*), i32 (i8*)* @f1{{$}} ; CHECK: @a14 = alias i16, bitcast (i32 (i8*)* @f1 to i16*) -; CHECK: @a21 = alias i32, i32* @v11{{$}} -; CHECK: @a22 = alias i16, bitcast (i32* @v11 to i16*) +; CHECK: @a21 = alias i32, i32* @v1.1{{$}} +; CHECK: @a22 = alias i16, bitcast (i32* @v1.1 to i16*) -; CHECK: @a23 = alias i32 (i8*), i32 (i8*)* @f12{{$}} -; CHECK: @a24 = alias i16, bitcast (i32 (i8*)* @f12 to i16*) +; CHECK: @a23 = alias i32 (i8*), i32 (i8*)* @f1.2{{$}} +; CHECK: @a24 = alias i16, bitcast (i32 (i8*)* @f1.2 to i16*) ; CHECK: define weak_odr protected i32 @f1(i8*) comdat($c1) { ; CHECK-NEXT: bb10: @@ -56,7 +56,7 @@ bb11: ; CHECK-NEXT: ret i32 42 ; CHECK-NEXT: } -; CHECK: define internal i32 @f12(i8* %this) comdat($c2) { +; CHECK: define internal i32 @f1.2(i8* %this) comdat($c2) { ; CHECK-NEXT: bb20: ; CHECK-NEXT: store i8* %this, i8** null ; CHECK-NEXT: br label %bb21 diff --git a/llvm/test/tools/llvm-split/unnamed.ll b/llvm/test/tools/llvm-split/unnamed.ll index 96a7fe4e1b7..fd24b4ca92b 100644 --- a/llvm/test/tools/llvm-split/unnamed.ll +++ b/llvm/test/tools/llvm-split/unnamed.ll @@ -10,8 +10,8 @@ define internal void @0() { ret void } -; CHECK0: declare hidden void @__llvmsplit_unnamed1() -; CHECK1: define hidden void @__llvmsplit_unnamed1() +; CHECK0: declare hidden void @__llvmsplit_unnamed.1() +; CHECK1: define hidden void @__llvmsplit_unnamed.1() define internal void @1() { ; CHECK1: call void @foo() ; CHECK1: call void @foo() @@ -23,7 +23,7 @@ define internal void @1() { ; CHECK0: define void @foo() ; CHECK1: declare void @foo() define void @foo() { - ; CHECK0: call void @__llvmsplit_unnamed1() + ; CHECK0: call void @__llvmsplit_unnamed.1() ; CHECK0: call void @__llvmsplit_unnamed() call void @1() call void @0() |