From f182b23f8fed014c26da48d94890080c7d916a0c Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 20 May 2010 19:26:52 +0000 Subject: [PATCH] When canonicalizing icmp operand order to put the loop invariant operand on the left, the interesting operand is on the right. This fixes a bug where LSR was failing to recognize ICmpZero uses, which led it to be unable to reverse the induction variable in the attached testcase. Delete test/CodeGen/X86/stack-color-with-reg-2.ll, because its test is extremely fragile and hard to meaningfully update. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104262 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/LoopStrengthReduce.cpp | 1 + test/CodeGen/ARM/lsr-on-unrolled-loops.ll | 256 +++++++++++++++++++ test/CodeGen/X86/stack-color-with-reg-2.ll | 230 ----------------- 3 files changed, 257 insertions(+), 230 deletions(-) delete mode 100644 test/CodeGen/X86/stack-color-with-reg-2.ll diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index f5e9d9fb33e..6645ee625cb 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -1997,6 +1997,7 @@ void LSRInstance::CollectFixupsAndInitialFormulae() { if (NV == LF.OperandValToReplace) { CI->setOperand(1, CI->getOperand(0)); CI->setOperand(0, NV); + NV = CI->getOperand(1); Changed = true; } diff --git a/test/CodeGen/ARM/lsr-on-unrolled-loops.ll b/test/CodeGen/ARM/lsr-on-unrolled-loops.ll index a206c3e0ad0..2ac408449ad 100644 --- a/test/CodeGen/ARM/lsr-on-unrolled-loops.ll +++ b/test/CodeGen/ARM/lsr-on-unrolled-loops.ll @@ -384,3 +384,259 @@ bb167: bb295: ret void } + +%struct.ct_data_s = type { %union.anon, %union.anon } +%struct.gz_header = type { i32, i32, i32, i32, i8*, i32, i32, i8*, i32, i8*, i32, i32, i32 } +%struct.internal_state = type { %struct.z_stream*, i32, i8*, i32, i8*, i32, i32, %struct.gz_header*, i32, i8, i32, i32, i32, i32, i8*, i32, i16*, i16*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [573 x %struct.ct_data_s], [61 x %struct.ct_data_s], [39 x %struct.ct_data_s], %struct.tree_desc_s, %struct.tree_desc_s, %struct.tree_desc_s, [16 x i16], [573 x i32], i32, i32, [573 x i8], i8*, i32, i32, i16*, i32, i32, i32, i32, i16, i32 } +%struct.static_tree_desc = type { i32 } +%struct.tree_desc_s = type { %struct.ct_data_s*, i32, %struct.static_tree_desc* } +%struct.z_stream = type { i8*, i32, i32, i8*, i32, i32, i8*, %struct.internal_state*, i8* (i8*, i32, i32)*, void (i8*, i8*)*, i8*, i32, i32, i32 } +%union.anon = type { i16 } + +define arm_apcscc i32 @longest_match(%struct.internal_state* %s, i32 %cur_match) nounwind optsize { +entry: + %0 = getelementptr inbounds %struct.internal_state* %s, i32 0, i32 31 ; [#uses=1] + %1 = load i32* %0, align 4 ; [#uses=2] + %2 = getelementptr inbounds %struct.internal_state* %s, i32 0, i32 14 ; [#uses=1] + %3 = load i8** %2, align 4 ; [#uses=27] + %4 = getelementptr inbounds %struct.internal_state* %s, i32 0, i32 27 ; [#uses=1] + %5 = load i32* %4, align 4 ; [#uses=17] + %6 = getelementptr inbounds i8* %3, i32 %5 ; [#uses=1] + %7 = getelementptr inbounds %struct.internal_state* %s, i32 0, i32 30 ; [#uses=1] + %8 = load i32* %7, align 4 ; [#uses=4] + %9 = getelementptr inbounds %struct.internal_state* %s, i32 0, i32 36 ; [#uses=1] + %10 = load i32* %9, align 4 ; [#uses=2] + %11 = getelementptr inbounds %struct.internal_state* %s, i32 0, i32 11 ; [#uses=1] + %12 = load i32* %11, align 4 ; [#uses=2] + %13 = add i32 %12, -262 ; [#uses=1] + %14 = icmp ugt i32 %5, %13 ; [#uses=1] + br i1 %14, label %bb, label %bb2 + +bb: ; preds = %entry + %15 = add i32 %5, 262 ; [#uses=1] + %16 = sub i32 %15, %12 ; [#uses=1] + br label %bb2 + +bb2: ; preds = %bb, %entry + %iftmp.48.0 = phi i32 [ %16, %bb ], [ 0, %entry ] ; [#uses=1] + %17 = getelementptr inbounds %struct.internal_state* %s, i32 0, i32 16 ; [#uses=1] + %18 = load i16** %17, align 4 ; [#uses=1] + %19 = getelementptr inbounds %struct.internal_state* %s, i32 0, i32 13 ; [#uses=1] + %20 = load i32* %19, align 4 ; [#uses=1] + %.sum = add i32 %5, 258 ; [#uses=2] + %21 = getelementptr inbounds i8* %3, i32 %.sum ; [#uses=1] + %22 = add nsw i32 %5, -1 ; [#uses=1] + %.sum30 = add i32 %22, %8 ; [#uses=1] + %23 = getelementptr inbounds i8* %3, i32 %.sum30 ; [#uses=1] + %24 = load i8* %23, align 1 ; [#uses=1] + %.sum31 = add i32 %8, %5 ; [#uses=1] + %25 = getelementptr inbounds i8* %3, i32 %.sum31 ; [#uses=1] + %26 = load i8* %25, align 1 ; [#uses=1] + %27 = getelementptr inbounds %struct.internal_state* %s, i32 0, i32 35 ; [#uses=1] + %28 = load i32* %27, align 4 ; [#uses=1] + %29 = lshr i32 %1, 2 ; [#uses=1] + %30 = icmp ult i32 %8, %28 ; [#uses=1] + %. = select i1 %30, i32 %1, i32 %29 ; [#uses=1] + %31 = getelementptr inbounds %struct.internal_state* %s, i32 0, i32 29 ; [#uses=1] + %32 = load i32* %31, align 4 ; [#uses=4] + %33 = icmp ugt i32 %10, %32 ; [#uses=1] + %nice_match.0.ph = select i1 %33, i32 %32, i32 %10 ; [#uses=1] + %34 = getelementptr inbounds %struct.internal_state* %s, i32 0, i32 28 ; [#uses=1] + %35 = ptrtoint i8* %21 to i32 ; [#uses=1] + %36 = add nsw i32 %5, 257 ; [#uses=1] + %tmp81 = add i32 %., -1 ; [#uses=1] + br label %bb6 + +bb6: ; preds = %bb24, %bb2 + %indvar78 = phi i32 [ 0, %bb2 ], [ %indvar.next79, %bb24 ] ; [#uses=2] + %best_len.2 = phi i32 [ %8, %bb2 ], [ %best_len.0, %bb24 ] ; [#uses=8] + %scan_end1.1 = phi i8 [ %24, %bb2 ], [ %scan_end1.0, %bb24 ] ; [#uses=6] + %cur_match_addr.0 = phi i32 [ %cur_match, %bb2 ], [ %90, %bb24 ] ; [#uses=14] + %scan_end.1 = phi i8 [ %26, %bb2 ], [ %scan_end.0, %bb24 ] ; [#uses=6] + %37 = getelementptr inbounds i8* %3, i32 %cur_match_addr.0 ; [#uses=1] + %.sum32 = add i32 %cur_match_addr.0, %best_len.2 ; [#uses=1] + %38 = getelementptr inbounds i8* %3, i32 %.sum32 ; [#uses=1] + %39 = load i8* %38, align 1 ; [#uses=1] + %40 = icmp eq i8 %39, %scan_end.1 ; [#uses=1] + br i1 %40, label %bb7, label %bb23 + +bb7: ; preds = %bb6 + %41 = add nsw i32 %best_len.2, -1 ; [#uses=1] + %.sum33 = add i32 %41, %cur_match_addr.0 ; [#uses=1] + %42 = getelementptr inbounds i8* %3, i32 %.sum33 ; [#uses=1] + %43 = load i8* %42, align 1 ; [#uses=1] + %44 = icmp eq i8 %43, %scan_end1.1 ; [#uses=1] + br i1 %44, label %bb8, label %bb23 + +bb8: ; preds = %bb7 + %45 = load i8* %37, align 1 ; [#uses=1] + %46 = load i8* %6, align 1 ; [#uses=1] + %47 = icmp eq i8 %45, %46 ; [#uses=1] + br i1 %47, label %bb9, label %bb23 + +bb9: ; preds = %bb8 + %.sum34 = add i32 %cur_match_addr.0, 1 ; [#uses=1] + %48 = getelementptr inbounds i8* %3, i32 %.sum34 ; [#uses=1] + %49 = load i8* %48, align 1 ; [#uses=1] + %.sum88 = add i32 %5, 1 ; [#uses=1] + %50 = getelementptr inbounds i8* %3, i32 %.sum88 ; [#uses=1] + %51 = load i8* %50, align 1 ; [#uses=1] + %52 = icmp eq i8 %49, %51 ; [#uses=1] + br i1 %52, label %bb10, label %bb23 + +bb10: ; preds = %bb9 + %tmp39 = add i32 %cur_match_addr.0, 10 ; [#uses=1] + %tmp41 = add i32 %cur_match_addr.0, 9 ; [#uses=1] + %tmp44 = add i32 %cur_match_addr.0, 8 ; [#uses=1] + %tmp47 = add i32 %cur_match_addr.0, 7 ; [#uses=1] + %tmp50 = add i32 %cur_match_addr.0, 6 ; [#uses=1] + %tmp53 = add i32 %cur_match_addr.0, 5 ; [#uses=1] + %tmp56 = add i32 %cur_match_addr.0, 4 ; [#uses=1] + %tmp59 = add i32 %cur_match_addr.0, 3 ; [#uses=1] + br label %bb11 + +bb11: ; preds = %bb18, %bb10 + %indvar = phi i32 [ %indvar.next, %bb18 ], [ 0, %bb10 ] ; [#uses=2] + %tmp = shl i32 %indvar, 3 ; [#uses=16] + %tmp40 = add i32 %tmp39, %tmp ; [#uses=1] + %scevgep = getelementptr i8* %3, i32 %tmp40 ; [#uses=1] + %tmp42 = add i32 %tmp41, %tmp ; [#uses=1] + %scevgep43 = getelementptr i8* %3, i32 %tmp42 ; [#uses=1] + %tmp45 = add i32 %tmp44, %tmp ; [#uses=1] + %scevgep46 = getelementptr i8* %3, i32 %tmp45 ; [#uses=1] + %tmp48 = add i32 %tmp47, %tmp ; [#uses=1] + %scevgep49 = getelementptr i8* %3, i32 %tmp48 ; [#uses=1] + %tmp51 = add i32 %tmp50, %tmp ; [#uses=1] + %scevgep52 = getelementptr i8* %3, i32 %tmp51 ; [#uses=1] + %tmp54 = add i32 %tmp53, %tmp ; [#uses=1] + %scevgep55 = getelementptr i8* %3, i32 %tmp54 ; [#uses=1] + %tmp60 = add i32 %tmp59, %tmp ; [#uses=1] + %scevgep61 = getelementptr i8* %3, i32 %tmp60 ; [#uses=1] + %tmp62 = add i32 %tmp, 10 ; [#uses=1] + %.sum89 = add i32 %5, %tmp62 ; [#uses=2] + %scevgep63 = getelementptr i8* %3, i32 %.sum89 ; [#uses=2] + %tmp64 = add i32 %tmp, 9 ; [#uses=1] + %.sum90 = add i32 %5, %tmp64 ; [#uses=1] + %scevgep65 = getelementptr i8* %3, i32 %.sum90 ; [#uses=2] + %tmp66 = add i32 %tmp, 8 ; [#uses=1] + %.sum91 = add i32 %5, %tmp66 ; [#uses=1] + %scevgep67 = getelementptr i8* %3, i32 %.sum91 ; [#uses=2] + %tmp6883 = or i32 %tmp, 7 ; [#uses=1] + %.sum92 = add i32 %5, %tmp6883 ; [#uses=1] + %scevgep69 = getelementptr i8* %3, i32 %.sum92 ; [#uses=2] + %tmp7084 = or i32 %tmp, 6 ; [#uses=1] + %.sum93 = add i32 %5, %tmp7084 ; [#uses=1] + %scevgep71 = getelementptr i8* %3, i32 %.sum93 ; [#uses=2] + %tmp7285 = or i32 %tmp, 5 ; [#uses=1] + %.sum94 = add i32 %5, %tmp7285 ; [#uses=1] + %scevgep73 = getelementptr i8* %3, i32 %.sum94 ; [#uses=2] + %tmp7486 = or i32 %tmp, 4 ; [#uses=1] + %.sum95 = add i32 %5, %tmp7486 ; [#uses=1] + %scevgep75 = getelementptr i8* %3, i32 %.sum95 ; [#uses=2] + %tmp7687 = or i32 %tmp, 3 ; [#uses=1] + %.sum96 = add i32 %5, %tmp7687 ; [#uses=1] + %scevgep77 = getelementptr i8* %3, i32 %.sum96 ; [#uses=2] + %53 = load i8* %scevgep77, align 1 ; [#uses=1] + %54 = load i8* %scevgep61, align 1 ; [#uses=1] + %55 = icmp eq i8 %53, %54 ; [#uses=1] + br i1 %55, label %bb12, label %bb20 + +bb12: ; preds = %bb11 + %tmp57 = add i32 %tmp56, %tmp ; [#uses=1] + %scevgep58 = getelementptr i8* %3, i32 %tmp57 ; [#uses=1] + %56 = load i8* %scevgep75, align 1 ; [#uses=1] + %57 = load i8* %scevgep58, align 1 ; [#uses=1] + %58 = icmp eq i8 %56, %57 ; [#uses=1] + br i1 %58, label %bb13, label %bb20 + +bb13: ; preds = %bb12 + %59 = load i8* %scevgep73, align 1 ; [#uses=1] + %60 = load i8* %scevgep55, align 1 ; [#uses=1] + %61 = icmp eq i8 %59, %60 ; [#uses=1] + br i1 %61, label %bb14, label %bb20 + +bb14: ; preds = %bb13 + %62 = load i8* %scevgep71, align 1 ; [#uses=1] + %63 = load i8* %scevgep52, align 1 ; [#uses=1] + %64 = icmp eq i8 %62, %63 ; [#uses=1] + br i1 %64, label %bb15, label %bb20 + +bb15: ; preds = %bb14 + %65 = load i8* %scevgep69, align 1 ; [#uses=1] + %66 = load i8* %scevgep49, align 1 ; [#uses=1] + %67 = icmp eq i8 %65, %66 ; [#uses=1] + br i1 %67, label %bb16, label %bb20 + +bb16: ; preds = %bb15 + %68 = load i8* %scevgep67, align 1 ; [#uses=1] + %69 = load i8* %scevgep46, align 1 ; [#uses=1] + %70 = icmp eq i8 %68, %69 ; [#uses=1] + br i1 %70, label %bb17, label %bb20 + +bb17: ; preds = %bb16 + %71 = load i8* %scevgep65, align 1 ; [#uses=1] + %72 = load i8* %scevgep43, align 1 ; [#uses=1] + %73 = icmp eq i8 %71, %72 ; [#uses=1] + br i1 %73, label %bb18, label %bb20 + +bb18: ; preds = %bb17 + %74 = load i8* %scevgep63, align 1 ; [#uses=1] + %75 = load i8* %scevgep, align 1 ; [#uses=1] + %76 = icmp eq i8 %74, %75 ; [#uses=1] + %77 = icmp slt i32 %.sum89, %.sum ; [#uses=1] + %or.cond = and i1 %76, %77 ; [#uses=1] + %indvar.next = add i32 %indvar, 1 ; [#uses=1] + br i1 %or.cond, label %bb11, label %bb20 + +bb20: ; preds = %bb18, %bb17, %bb16, %bb15, %bb14, %bb13, %bb12, %bb11 + %scan.3 = phi i8* [ %scevgep77, %bb11 ], [ %scevgep75, %bb12 ], [ %scevgep73, %bb13 ], [ %scevgep71, %bb14 ], [ %scevgep69, %bb15 ], [ %scevgep67, %bb16 ], [ %scevgep65, %bb17 ], [ %scevgep63, %bb18 ] ; [#uses=1] + %78 = ptrtoint i8* %scan.3 to i32 ; [#uses=1] + %79 = sub nsw i32 %78, %35 ; [#uses=2] + %80 = add i32 %79, 258 ; [#uses=5] + %81 = icmp sgt i32 %80, %best_len.2 ; [#uses=1] + br i1 %81, label %bb21, label %bb23 + +bb21: ; preds = %bb20 + store i32 %cur_match_addr.0, i32* %34, align 4 + %82 = icmp slt i32 %80, %nice_match.0.ph ; [#uses=1] + br i1 %82, label %bb22, label %bb25 + +bb22: ; preds = %bb21 + %.sum37 = add i32 %36, %79 ; [#uses=1] + %83 = getelementptr inbounds i8* %3, i32 %.sum37 ; [#uses=1] + %84 = load i8* %83, align 1 ; [#uses=1] + %.sum38 = add i32 %80, %5 ; [#uses=1] + %85 = getelementptr inbounds i8* %3, i32 %.sum38 ; [#uses=1] + %86 = load i8* %85, align 1 ; [#uses=1] + br label %bb23 + +bb23: ; preds = %bb22, %bb20, %bb9, %bb8, %bb7, %bb6 + %best_len.0 = phi i32 [ %best_len.2, %bb6 ], [ %best_len.2, %bb7 ], [ %best_len.2, %bb8 ], [ %best_len.2, %bb9 ], [ %80, %bb22 ], [ %best_len.2, %bb20 ] ; [#uses=3] + %scan_end1.0 = phi i8 [ %scan_end1.1, %bb6 ], [ %scan_end1.1, %bb7 ], [ %scan_end1.1, %bb8 ], [ %scan_end1.1, %bb9 ], [ %84, %bb22 ], [ %scan_end1.1, %bb20 ] ; [#uses=1] + %scan_end.0 = phi i8 [ %scan_end.1, %bb6 ], [ %scan_end.1, %bb7 ], [ %scan_end.1, %bb8 ], [ %scan_end.1, %bb9 ], [ %86, %bb22 ], [ %scan_end.1, %bb20 ] ; [#uses=1] + %87 = and i32 %cur_match_addr.0, %20 ; [#uses=1] + %88 = getelementptr inbounds i16* %18, i32 %87 ; [#uses=1] + %89 = load i16* %88, align 2 ; [#uses=1] + %90 = zext i16 %89 to i32 ; [#uses=2] + %91 = icmp ugt i32 %90, %iftmp.48.0 ; [#uses=1] + br i1 %91, label %bb24, label %bb25 + +bb24: ; preds = %bb23 + +; LSR should use count-down iteration to avoid requiring the trip count +; in a register, and it shouldn't require any reloads here. + +; CHECK: sub.w r9, r9, #1 +; CHECK-NEXT: cmp.w r9, #0 +; CHECK-NEXT: bne.w + + %92 = icmp eq i32 %tmp81, %indvar78 ; [#uses=1] + %indvar.next79 = add i32 %indvar78, 1 ; [#uses=1] + br i1 %92, label %bb25, label %bb6 + +bb25: ; preds = %bb24, %bb23, %bb21 + %best_len.1 = phi i32 [ %best_len.0, %bb23 ], [ %best_len.0, %bb24 ], [ %80, %bb21 ] ; [#uses=2] + %93 = icmp ugt i32 %best_len.1, %32 ; [#uses=1] + %merge = select i1 %93, i32 %32, i32 %best_len.1 ; [#uses=1] + ret i32 %merge +} diff --git a/test/CodeGen/X86/stack-color-with-reg-2.ll b/test/CodeGen/X86/stack-color-with-reg-2.ll deleted file mode 100644 index c1f26722935..00000000000 --- a/test/CodeGen/X86/stack-color-with-reg-2.ll +++ /dev/null @@ -1,230 +0,0 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin10 -relocation-model=pic -disable-fp-elim -color-ss-with-regs | grep {movl\[\[:space:\]\]%eax, %ebx} - - %"struct..0$_67" = type { i32, %"struct.llvm::MachineOperand"**, %"struct.llvm::MachineOperand"* } - %"struct..1$_69" = type { i32 } - %"struct.llvm::AbstractTypeUser" = type { i32 (...)** } - %"struct.llvm::AliasAnalysis" = type opaque - %"struct.llvm::AnalysisResolver" = type { %"struct.std::vector,std::allocator > >", %"struct.llvm::PMDataManager"* } - %"struct.llvm::Annotable" = type { %"struct.llvm::Annotation"* } - %"struct.llvm::Annotation" = type { i32 (...)**, %"struct..1$_69", %"struct.llvm::Annotation"* } - %"struct.llvm::Argument" = type { %"struct.llvm::Value", %"struct.llvm::ilist_node", %"struct.llvm::Function"* } - %"struct.llvm::AttrListPtr" = type { %"struct.llvm::AttributeListImpl"* } - %"struct.llvm::AttributeListImpl" = type opaque - %"struct.llvm::BasicBlock" = type { %"struct.llvm::Value", %"struct.llvm::ilist_node", %"struct.llvm::iplist >", %"struct.llvm::Function"* } - %"struct.llvm::BitVector" = type { i32*, i32, i32 } - %"struct.llvm::BumpPtrAllocator" = type { i8* } - %"struct.llvm::CalleeSavedInfo" = type { i32, %"struct.llvm::TargetRegisterClass"*, i32 } - %"struct.llvm::Constant" = type { %"struct.llvm::User" } - %"struct.llvm::DebugLocTracker" = type { %"struct.std::vector >", %"struct.llvm::DenseMap,llvm::DenseMapInfo >" } - %"struct.llvm::DebugLocTuple" = type { %"struct.llvm::GlobalVariable"*, i32, i32 } - %"struct.llvm::DenseMap,llvm::DenseMapInfo >" = type { i32, %"struct.std::pair"*, i32, i32 } - %"struct.llvm::DenseMap,llvm::DenseMapInfo >" = type { i32, %"struct.std::pair"*, i32, i32 } - %"struct.llvm::DenseMap,llvm::DenseMapInfo >" = type { i32, %"struct.std::pair"*, i32, i32 } - %"struct.llvm::DenseMap,llvm::DenseMapInfo >" = type { i32, %"struct.std::pair"*, i32, i32 } - %"struct.llvm::DenseSet >" = type { %"struct.llvm::DenseMap,llvm::DenseMapInfo >" } - %"struct.llvm::Function" = type { %"struct.llvm::GlobalValue", %"struct.llvm::Annotable", %"struct.llvm::ilist_node", %"struct.llvm::iplist >", %"struct.llvm::iplist >", %"struct.llvm::ValueSymbolTable"*, %"struct.llvm::AttrListPtr" } - %"struct.llvm::FunctionPass" = type { %"struct.llvm::Pass" } - %"struct.llvm::GlobalValue" = type { %"struct.llvm::Constant", %"struct.llvm::Module"*, i32, %"struct.std::string" } - %"struct.llvm::GlobalVariable" = type opaque - %"struct.llvm::Instruction" = type { %"struct.llvm::User", %"struct.llvm::ilist_node", %"struct.llvm::BasicBlock"* } - %"struct.llvm::LiveInterval" = type <{ i32, float, i16, [6 x i8], %"struct.llvm::SmallVector", %"struct.llvm::SmallVector" }> - %"struct.llvm::LiveIntervals" = type { %"struct.llvm::MachineFunctionPass", %"struct.llvm::MachineFunction"*, %"struct.llvm::MachineRegisterInfo"*, %"struct.llvm::TargetMachine"*, %"struct.llvm::TargetRegisterInfo"*, %"struct.llvm::TargetInstrInfo"*, %"struct.llvm::AliasAnalysis"*, %"struct.llvm::LiveVariables"*, %"struct.llvm::BumpPtrAllocator", %"struct.std::vector,std::allocator > >", %"struct.std::vector,std::allocator > >", i64, %"struct.llvm::DenseMap,llvm::DenseMapInfo >", %"struct.std::vector >", %"struct.llvm::DenseMap,llvm::DenseMapInfo >", %"struct.llvm::BitVector", %"struct.std::vector >" } - %"struct.llvm::LiveVariables" = type opaque - %"struct.llvm::MVT" = type { %"struct..1$_69" } - %"struct.llvm::MachineBasicBlock" = type { %"struct.llvm::ilist_node", %"struct.llvm::ilist", %"struct.llvm::BasicBlock"*, i32, %"struct.llvm::MachineFunction"*, %"struct.std::vector >", %"struct.std::vector >", %"struct.std::vector >", i32, i8 } - %"struct.llvm::MachineConstantPool" = type opaque - %"struct.llvm::MachineFrameInfo" = type { %"struct.std::vector >", i32, i8, i8, i64, i32, i32, i8, i32, i32, %"struct.std::vector >", %"struct.llvm::MachineModuleInfo"*, %"struct.llvm::TargetFrameInfo"* } - %"struct.llvm::MachineFrameInfo::StackObject" = type { i64, i32, i8, i64 } - %"struct.llvm::MachineFunction" = type { %"struct.llvm::Annotation", %"struct.llvm::Function"*, %"struct.llvm::TargetMachine"*, %"struct.llvm::MachineRegisterInfo"*, %"struct.llvm::AbstractTypeUser"*, %"struct.llvm::MachineFrameInfo"*, %"struct.llvm::MachineConstantPool"*, %"struct.llvm::MachineJumpTableInfo"*, %"struct.std::vector >", %"struct.llvm::BumpPtrAllocator", %"struct.llvm::Recycler", %"struct.llvm::Recycler", %"struct.llvm::ilist", %"struct..1$_69", %"struct.llvm::DebugLocTracker" } - %"struct.llvm::MachineFunctionPass" = type { %"struct.llvm::FunctionPass" } - %"struct.llvm::MachineInstr" = type { %"struct.llvm::ilist_node", %"struct.llvm::TargetInstrDesc"*, i16, %"struct.std::vector >", %"struct.std::list >", %"struct.llvm::MachineBasicBlock"*, %"struct..1$_69" } - %"struct.llvm::MachineJumpTableInfo" = type opaque - %"struct.llvm::MachineModuleInfo" = type opaque - %"struct.llvm::MachineOperand" = type { i8, i8, i8, %"struct.llvm::MachineInstr"*, %"struct.llvm::MachineOperand::$_66" } - %"struct.llvm::MachineOperand::$_66" = type { %"struct..0$_67" } - %"struct.llvm::MachineRegisterInfo" = type { %"struct.std::vector,std::allocator > >", %"struct.std::vector >,std::allocator > > >", %"struct.llvm::MachineOperand"**, %"struct.llvm::BitVector", %"struct.std::vector,std::allocator > >", %"struct.std::vector >" } - %"struct.llvm::Module" = type opaque - %"struct.llvm::PATypeHandle" = type { %"struct.llvm::Type"*, %"struct.llvm::AbstractTypeUser"* } - %"struct.llvm::PATypeHolder" = type { %"struct.llvm::Type"* } - %"struct.llvm::PMDataManager" = type opaque - %"struct.llvm::Pass" = type { i32 (...)**, %"struct.llvm::AnalysisResolver"*, i32 } - %"struct.llvm::PassInfo" = type { i8*, i8*, i32, i8, i8, i8, %"struct.std::vector >", %"struct.llvm::Pass"* ()* } - %"struct.llvm::Recycler" = type { %"struct.llvm::iplist >" } - %"struct.llvm::RecyclerStruct" = type { %"struct.llvm::RecyclerStruct"*, %"struct.llvm::RecyclerStruct"* } - %"struct.llvm::SmallVector" = type <{ [17 x i8], [47 x i8] }> - %"struct.llvm::SmallVector" = type <{ [17 x i8], [15 x i8] }> - %"struct.llvm::TargetAsmInfo" = type opaque - %"struct.llvm::TargetFrameInfo" = type opaque - %"struct.llvm::TargetInstrDesc" = type { i16, i16, i16, i16, i8*, i32, i32, i32*, i32*, %"struct.llvm::TargetRegisterClass"**, %"struct.llvm::TargetOperandInfo"* } - %"struct.llvm::TargetInstrInfo" = type { i32 (...)**, %"struct.llvm::TargetInstrDesc"*, i32 } - %"struct.llvm::TargetMachine" = type { i32 (...)**, %"struct.llvm::TargetAsmInfo"* } - %"struct.llvm::TargetOperandInfo" = type { i16, i16, i32 } - %"struct.llvm::TargetRegisterClass" = type { i32 (...)**, i32, i8*, %"struct.llvm::MVT"*, %"struct.llvm::TargetRegisterClass"**, %"struct.llvm::TargetRegisterClass"**, %"struct.llvm::TargetRegisterClass"**, %"struct.llvm::TargetRegisterClass"**, i32, i32, i32, i32*, i32*, %"struct.llvm::DenseSet >" } - %"struct.llvm::TargetRegisterDesc" = type { i8*, i8*, i32*, i32*, i32* } - %"struct.llvm::TargetRegisterInfo" = type { i32 (...)**, i32*, i32, i32*, i32, i32*, i32, %"struct.llvm::TargetRegisterDesc"*, i32, %"struct.llvm::TargetRegisterClass"**, %"struct.llvm::TargetRegisterClass"**, i32, i32 } - %"struct.llvm::Type" = type { %"struct.llvm::AbstractTypeUser", i8, [3 x i8], i32, %"struct.llvm::Type"*, %"struct.std::vector >", i32, %"struct.llvm::PATypeHandle"* } - %"struct.llvm::Use" = type { %"struct.llvm::Value"*, %"struct.llvm::Use"*, %"struct..1$_69" } - %"struct.llvm::User" = type { %"struct.llvm::Value", %"struct.llvm::Use"*, i32 } - %"struct.llvm::Value" = type { i32 (...)**, i8, i8, i16, %"struct.llvm::PATypeHolder", %"struct.llvm::Use"*, %"struct.llvm::ValueName"* } - %"struct.llvm::ValueName" = type opaque - %"struct.llvm::ValueSymbolTable" = type opaque - %"struct.llvm::ilist" = type { %"struct.llvm::iplist >" } - %"struct.llvm::ilist" = type { %"struct.llvm::iplist >" } - %"struct.llvm::ilist_node" = type { %"struct.llvm::Argument"*, %"struct.llvm::Argument"* } - %"struct.llvm::ilist_node" = type { %"struct.llvm::BasicBlock"*, %"struct.llvm::BasicBlock"* } - %"struct.llvm::ilist_node" = type { %"struct.llvm::Function"*, %"struct.llvm::Function"* } - %"struct.llvm::ilist_node" = type { %"struct.llvm::Instruction"*, %"struct.llvm::Instruction"* } - %"struct.llvm::ilist_node" = type { %"struct.llvm::MachineBasicBlock"*, %"struct.llvm::MachineBasicBlock"* } - %"struct.llvm::ilist_node" = type { %"struct.llvm::MachineInstr"*, %"struct.llvm::MachineInstr"* } - %"struct.llvm::ilist_traits" = type { %"struct.llvm::ilist_node" } - %"struct.llvm::ilist_traits" = type { %"struct.llvm::ilist_node" } - %"struct.llvm::ilist_traits" = type { %"struct.llvm::ilist_node" } - %"struct.llvm::ilist_traits" = type { %"struct.llvm::ilist_node" } - %"struct.llvm::ilist_traits" = type { %"struct.llvm::ilist_node", %"struct.llvm::MachineBasicBlock"* } - %"struct.llvm::ilist_traits" = type { %"struct.llvm::RecyclerStruct" } - %"struct.llvm::iplist >" = type { %"struct.llvm::ilist_traits", %"struct.llvm::Argument"* } - %"struct.llvm::iplist >" = type { %"struct.llvm::ilist_traits", %"struct.llvm::BasicBlock"* } - %"struct.llvm::iplist >" = type { %"struct.llvm::ilist_traits", %"struct.llvm::Instruction"* } - %"struct.llvm::iplist >" = type { %"struct.llvm::ilist_traits", %"struct.llvm::MachineBasicBlock"* } - %"struct.llvm::iplist >" = type { %"struct.llvm::ilist_traits", %"struct.llvm::MachineInstr"* } - %"struct.llvm::iplist >" = type { %"struct.llvm::ilist_traits", %"struct.llvm::RecyclerStruct"* } - %"struct.std::IdxMBBPair" = type { i32, %"struct.llvm::MachineBasicBlock"* } - %"struct.std::_List_base >" = type { %"struct.llvm::ilist_traits" } - %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } - %"struct.std::_Vector_base >::_Vector_impl" = type { %"struct.llvm::PassInfo"**, %"struct.llvm::PassInfo"**, %"struct.llvm::PassInfo"** } - %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } - %"struct.std::_Vector_base >::_Vector_impl" = type { i32*, i32*, i32* } - %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } - %"struct.std::_Vector_base >::_Vector_impl" = type { %"struct.llvm::AbstractTypeUser"**, %"struct.llvm::AbstractTypeUser"**, %"struct.llvm::AbstractTypeUser"** } - %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } - %"struct.std::_Vector_base >::_Vector_impl" = type { %"struct.llvm::CalleeSavedInfo"*, %"struct.llvm::CalleeSavedInfo"*, %"struct.llvm::CalleeSavedInfo"* } - %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } - %"struct.std::_Vector_base >::_Vector_impl" = type { %"struct.llvm::DebugLocTuple"*, %"struct.llvm::DebugLocTuple"*, %"struct.llvm::DebugLocTuple"* } - %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } - %"struct.std::_Vector_base >::_Vector_impl" = type { %"struct.llvm::MachineBasicBlock"**, %"struct.llvm::MachineBasicBlock"**, %"struct.llvm::MachineBasicBlock"** } - %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } - %"struct.std::_Vector_base >::_Vector_impl" = type { %"struct.llvm::MachineFrameInfo::StackObject"*, %"struct.llvm::MachineFrameInfo::StackObject"*, %"struct.llvm::MachineFrameInfo::StackObject"* } - %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } - %"struct.std::_Vector_base >::_Vector_impl" = type { %"struct.llvm::MachineInstr"**, %"struct.llvm::MachineInstr"**, %"struct.llvm::MachineInstr"** } - %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } - %"struct.std::_Vector_base >::_Vector_impl" = type { %"struct.llvm::MachineOperand"*, %"struct.llvm::MachineOperand"*, %"struct.llvm::MachineOperand"* } - %"struct.std::_Vector_base,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" } - %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" = type { %"struct.std::pair"*, %"struct.std::pair"*, %"struct.std::pair"* } - %"struct.std::_Vector_base,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" } - %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" = type { %"struct.std::pair"*, %"struct.std::pair"*, %"struct.std::pair"* } - %"struct.std::_Vector_base,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" } - %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" = type { %"struct.std::IdxMBBPair"*, %"struct.std::IdxMBBPair"*, %"struct.std::IdxMBBPair"* } - %"struct.std::_Vector_base,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" } - %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" = type { %"struct.std::pair"*, %"struct.std::pair"*, %"struct.std::pair"* } - %"struct.std::_Vector_base >,std::allocator > > >" = type { %"struct.std::_Vector_base >,std::allocator > > >::_Vector_impl" } - %"struct.std::_Vector_base >,std::allocator > > >::_Vector_impl" = type { %"struct.std::vector >"*, %"struct.std::vector >"*, %"struct.std::vector >"* } - %"struct.std::list >" = type { %"struct.std::_List_base >" } - %"struct.std::pair" = type { %"struct.llvm::PassInfo"*, %"struct.llvm::Pass"* } - %"struct.std::pair" = type { %"struct.llvm::TargetRegisterClass"*, %"struct.llvm::MachineOperand"* } - %"struct.std::pair" = type { %"struct.llvm::DebugLocTuple", i32 } - %"struct.std::pair" = type { %"struct.llvm::MachineInstr"*, i32 } - %"struct.std::pair" = type { i32, i8 } - %"struct.std::pair" = type { i32, i32 } - %"struct.std::pair" = type { i32, %"struct.llvm::LiveInterval"* } - %"struct.std::string" = type { %"struct.llvm::BumpPtrAllocator" } - %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } - %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } - %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } - %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } - %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } - %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } - %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } - %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } - %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } - %"struct.std::vector,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >" } - %"struct.std::vector,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >" } - %"struct.std::vector,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >" } - %"struct.std::vector,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >" } - %"struct.std::vector >,std::allocator > > >" = type { %"struct.std::_Vector_base >,std::allocator > > >" } -@_ZZNK4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE15LookupBucketForERKS2_RPSt4pairIS2_jEE8__func__ = external constant [16 x i8] ; <[16 x i8]*> [#uses=1] -@"\01LC6" = external constant [56 x i8] ; <[56 x i8]*> [#uses=1] -@"\01LC7" = external constant [134 x i8] ; <[134 x i8]*> [#uses=1] -@"\01LC8" = external constant [72 x i8] ; <[72 x i8]*> [#uses=1] -@_ZZN4llvm13LiveIntervals24InsertMachineInstrInMapsEPNS_12MachineInstrEjE8__func__ = external constant [25 x i8] ; <[25 x i8]*> [#uses=1] -@"\01LC51" = external constant [42 x i8] ; <[42 x i8]*> [#uses=1] - -define void @_ZN4llvm13LiveIntervals24InsertMachineInstrInMapsEPNS_12MachineInstrEj(%"struct.llvm::LiveIntervals"* nocapture %this, %"struct.llvm::MachineInstr"* %MI, i32 %Index) nounwind ssp { -entry: - %0 = call i64 @_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE4findERKS2_(%"struct.llvm::DenseMap,llvm::DenseMapInfo >"* null, %"struct.llvm::MachineInstr"** null) nounwind ssp ; [#uses=1] - %1 = trunc i64 %0 to i32 ; [#uses=1] - %tmp11 = inttoptr i32 %1 to %"struct.std::pair"* ; <%"struct.std::pair"*> [#uses=1] - %2 = load %"struct.std::pair"** null, align 4 ; <%"struct.std::pair"*> [#uses=3] - %3 = getelementptr %"struct.llvm::LiveIntervals"* %this, i32 0, i32 12, i32 0 ; [#uses=1] - %4 = load i32* %3, align 4 ; [#uses=2] - %5 = getelementptr %"struct.std::pair"* %2, i32 %4 ; <%"struct.std::pair"*> [#uses=1] - br label %bb1.i.i.i - -bb.i.i.i: ; preds = %bb2.i.i.i - %indvar.next = add i32 %indvar, 1 ; [#uses=1] - br label %bb1.i.i.i - -bb1.i.i.i: ; preds = %bb.i.i.i, %entry - %indvar = phi i32 [ 0, %entry ], [ %indvar.next, %bb.i.i.i ] ; [#uses=2] - %tmp32 = shl i32 %indvar, 3 ; [#uses=1] - %ctg2.sum = add i32 0, %tmp32 ; [#uses=1] - %ctg237 = getelementptr i8* null, i32 %ctg2.sum ; [#uses=1] - %.0.0.i = bitcast i8* %ctg237 to %"struct.std::pair"* ; <%"struct.std::pair"*> [#uses=2] - %6 = icmp eq %"struct.std::pair"* %.0.0.i, %5 ; [#uses=1] - br i1 %6, label %_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE3endEv.exit, label %bb2.i.i.i - -bb2.i.i.i: ; preds = %bb1.i.i.i - %7 = load %"struct.llvm::MachineInstr"** null, align 4 ; <%"struct.llvm::MachineInstr"*> [#uses=1] - %8 = icmp eq %"struct.llvm::MachineInstr"* %7, inttoptr (i32 -8 to %"struct.llvm::MachineInstr"*) ; [#uses=1] - %or.cond.i.i.i21 = or i1 false, %8 ; [#uses=1] - br i1 %or.cond.i.i.i21, label %bb.i.i.i, label %_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE3endEv.exit - -_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE3endEv.exit: ; preds = %bb2.i.i.i, %bb1.i.i.i - %9 = icmp eq %"struct.std::pair"* %tmp11, %.0.0.i ; [#uses=1] - br i1 %9, label %bb7, label %bb6 - -bb6: ; preds = %_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE3endEv.exit - call void @__assert_rtn(i8* getelementptr ([25 x i8]* @_ZZN4llvm13LiveIntervals24InsertMachineInstrInMapsEPNS_12MachineInstrEjE8__func__, i32 0, i32 0), i8* getelementptr ([72 x i8]* @"\01LC8", i32 0, i32 0), i32 251, i8* getelementptr ([42 x i8]* @"\01LC51", i32 0, i32 0)) noreturn nounwind - unreachable - -bb7: ; preds = %_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE3endEv.exit - %10 = load %"struct.llvm::MachineInstr"** null, align 4 ; <%"struct.llvm::MachineInstr"*> [#uses=2] - %11 = icmp eq %"struct.llvm::MachineInstr"* %10, inttoptr (i32 -8 to %"struct.llvm::MachineInstr"*) ; [#uses=1] - %or.cond40.i.i.i = or i1 false, %11 ; [#uses=1] - br i1 %or.cond40.i.i.i, label %bb5.i.i.i, label %bb6.preheader.i.i.i - -bb6.preheader.i.i.i: ; preds = %bb7 - %12 = add i32 %4, -1 ; [#uses=1] - br label %bb6.i.i.i - -bb5.i.i.i: ; preds = %bb7 - call void @__assert_rtn(i8* getelementptr ([16 x i8]* @_ZZNK4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE15LookupBucketForERKS2_RPSt4pairIS2_jEE8__func__, i32 0, i32 0), i8* getelementptr ([56 x i8]* @"\01LC6", i32 0, i32 0), i32 390, i8* getelementptr ([134 x i8]* @"\01LC7", i32 0, i32 0)) noreturn nounwind - unreachable - -bb6.i.i.i: ; preds = %bb17.i.i.i, %bb6.preheader.i.i.i - %FoundTombstone.1.i.i.i = phi %"struct.std::pair"* [ %FoundTombstone.0.i.i.i, %bb17.i.i.i ], [ null, %bb6.preheader.i.i.i ] ; <%"struct.std::pair"*> [#uses=2] - %ProbeAmt.0.i.i.i = phi i32 [ 0, %bb17.i.i.i ], [ 1, %bb6.preheader.i.i.i ] ; [#uses=1] - %BucketNo.0.i.i.i = phi i32 [ %20, %bb17.i.i.i ], [ 0, %bb6.preheader.i.i.i ] ; [#uses=2] - %13 = and i32 %BucketNo.0.i.i.i, %12 ; [#uses=2] - %14 = getelementptr %"struct.std::pair"* %2, i32 %13 ; <%"struct.std::pair"*> [#uses=2] - %15 = getelementptr %"struct.std::pair"* %2, i32 %13, i32 0 ; <%"struct.llvm::MachineInstr"**> [#uses=1] - %16 = load %"struct.llvm::MachineInstr"** %15, align 4 ; <%"struct.llvm::MachineInstr"*> [#uses=2] - %17 = icmp eq %"struct.llvm::MachineInstr"* %16, %10 ; [#uses=1] - br i1 %17, label %_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEEixERKS2_.exit, label %bb17.i.i.i - -bb17.i.i.i: ; preds = %bb6.i.i.i - %18 = icmp eq %"struct.llvm::MachineInstr"* %16, inttoptr (i32 -8 to %"struct.llvm::MachineInstr"*) ; [#uses=1] - %19 = icmp eq %"struct.std::pair"* %FoundTombstone.1.i.i.i, null ; [#uses=1] - %or.cond.i.i.i = and i1 %18, %19 ; [#uses=1] - %FoundTombstone.0.i.i.i = select i1 %or.cond.i.i.i, %"struct.std::pair"* %14, %"struct.std::pair"* %FoundTombstone.1.i.i.i ; <%"struct.std::pair"*> [#uses=1] - %20 = add i32 %BucketNo.0.i.i.i, %ProbeAmt.0.i.i.i ; [#uses=1] - br label %bb6.i.i.i - -_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEEixERKS2_.exit: ; preds = %bb6.i.i.i - %21 = getelementptr %"struct.std::pair"* %14, i32 0, i32 1 ; [#uses=1] - store i32 %Index, i32* %21, align 4 - ret void -} - -declare void @__assert_rtn(i8*, i8*, i32, i8*) noreturn - -declare i64 @_ZN4llvm8DenseMapIPNS_12MachineInstrEjNS_12DenseMapInfoIS2_EENS3_IjEEE4findERKS2_(%"struct.llvm::DenseMap,llvm::DenseMapInfo >"* nocapture, %"struct.llvm::MachineInstr"** nocapture) nounwind ssp -- 2.34.1