From: Dan Gohman Date: Fri, 26 Jun 2009 22:54:11 +0000 (+0000) Subject: Add some testcases for some of the recent ScalarEvolution bug fixes. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=16bdfdb1784767e82f235183b1b5f6338df4bf9e;p=oota-llvm.git Add some testcases for some of the recent ScalarEvolution bug fixes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74353 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/X86/scev-interchange.ll b/test/CodeGen/X86/scev-interchange.ll new file mode 100644 index 00000000000..b253dd975ff --- /dev/null +++ b/test/CodeGen/X86/scev-interchange.ll @@ -0,0 +1,386 @@ +; RUN: llvm-as < %s | llc -march=x86-64 + +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" + %struct..0__pthread_mutex_s = type { i32, i32, i32, i32, i32, i32, %struct.__pthread_list_t } + %"struct.DataOutBase::GmvFlags" = type { i32 } + %"struct.FE_DGPNonparametric<3>" = type { [1156 x i8], i32, %"struct.PolynomialSpace<1>" } + %"struct.FE_Q<3>" = type { %"struct.FE_DGPNonparametric<3>", %"struct.std::vector >" } + %"struct.FiniteElementData<1>" = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } + %struct.Line = type { [2 x i32] } + %"struct.PolynomialSpace<1>" = type { %"struct.std::vector,std::allocator > >", i32, %"struct.std::vector >", %"struct.std::vector >" } + %"struct.Polynomials::Polynomial" = type { %struct.Subscriptor, %"struct.std::vector >" } + %struct.Subscriptor = type { i32 (...)**, i32, %"struct.std::type_info"* } + %"struct.TableBase<2,double>" = type { %struct.Subscriptor, double*, i32, %"struct.TableIndices<2>" } + %"struct.TableIndices<2>" = type { %struct.Line } + %struct.__pthread_list_t = type { %struct.__pthread_list_t*, %struct.__pthread_list_t* } + %struct.pthread_attr_t = type { i64, [48 x i8] } + %struct.pthread_mutex_t = type { %struct..0__pthread_mutex_s } + %"struct.std::_Bit_const_iterator" = type { %"struct.std::_Bit_iterator_base" } + %"struct.std::_Bit_iterator_base" = type { i64*, i32 } + %"struct.std::_Bvector_base >" = type { %"struct.std::_Bvector_base >::_Bvector_impl" } + %"struct.std::_Bvector_base >::_Bvector_impl" = type { %"struct.std::_Bit_const_iterator", %"struct.std::_Bit_const_iterator", i64* } + %"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.Polynomials::Polynomial"*, %"struct.Polynomials::Polynomial"*, %"struct.Polynomials::Polynomial"* } + %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } + %"struct.std::_Vector_base >::_Vector_impl" = type { double*, double*, double* } + %"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 >,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::type_info" = type { i32 (...)**, i8* } + %"struct.std::vector,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >" } + %"struct.std::vector >" = type { %"struct.std::_Bvector_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 > > >" } + +@_ZL20__gthrw_pthread_oncePiPFvvE = alias weak i32 (i32*, void ()*)* @pthread_once ; [#uses=0] +@_ZL27__gthrw_pthread_getspecificj = alias weak i8* (i32)* @pthread_getspecific ; [#uses=0] +@_ZL27__gthrw_pthread_setspecificjPKv = alias weak i32 (i32, i8*)* @pthread_setspecific ; [#uses=0] +@_ZL22__gthrw_pthread_createPmPK14pthread_attr_tPFPvS3_ES3_ = alias weak i32 (i64*, %struct.pthread_attr_t*, i8* (i8*)*, i8*)* @pthread_create ; [#uses=0] +@_ZL22__gthrw_pthread_cancelm = alias weak i32 (i64)* @pthread_cancel ; [#uses=0] +@_ZL26__gthrw_pthread_mutex_lockP15pthread_mutex_t = alias weak i32 (%struct.pthread_mutex_t*)* @pthread_mutex_lock ; [#uses=0] +@_ZL29__gthrw_pthread_mutex_trylockP15pthread_mutex_t = alias weak i32 (%struct.pthread_mutex_t*)* @pthread_mutex_trylock ; [#uses=0] +@_ZL28__gthrw_pthread_mutex_unlockP15pthread_mutex_t = alias weak i32 (%struct.pthread_mutex_t*)* @pthread_mutex_unlock ; [#uses=0] +@_ZL26__gthrw_pthread_mutex_initP15pthread_mutex_tPK19pthread_mutexattr_t = alias weak i32 (%struct.pthread_mutex_t*, %"struct.DataOutBase::GmvFlags"*)* @pthread_mutex_init ; [#uses=0] +@_ZL26__gthrw_pthread_key_createPjPFvPvE = alias weak i32 (i32*, void (i8*)*)* @pthread_key_create ; [#uses=0] +@_ZL26__gthrw_pthread_key_deletej = alias weak i32 (i32)* @pthread_key_delete ; [#uses=0] +@_ZL30__gthrw_pthread_mutexattr_initP19pthread_mutexattr_t = alias weak i32 (%"struct.DataOutBase::GmvFlags"*)* @pthread_mutexattr_init ; [#uses=0] +@_ZL33__gthrw_pthread_mutexattr_settypeP19pthread_mutexattr_ti = alias weak i32 (%"struct.DataOutBase::GmvFlags"*, i32)* @pthread_mutexattr_settype ; [#uses=0] +@_ZL33__gthrw_pthread_mutexattr_destroyP19pthread_mutexattr_t = alias weak i32 (%"struct.DataOutBase::GmvFlags"*)* @pthread_mutexattr_destroy ; [#uses=0] + +declare void @_Unwind_Resume(i8*) + +declare i8* @_Znwm(i64) + +declare fastcc void @_ZNSt6vectorIjSaIjEEaSERKS1_(%"struct.std::vector >"*, %"struct.std::vector >"*) + +declare fastcc void @_ZN9TableBaseILi2EdE6reinitERK12TableIndicesILi2EE(%"struct.TableBase<2,double>"* nocapture, i32, i32) + +declare fastcc void @_ZNSt6vectorIbSaIbEEC1EmRKbRKS0_(%"struct.std::vector >"* nocapture, i64, i8* nocapture) + +declare fastcc void @_ZNSt6vectorIS_IbSaIbEESaIS1_EEC2EmRKS1_RKS2_(%"struct.std::vector >,std::allocator > > >"* nocapture, i64, %"struct.std::vector >"* nocapture) + +declare fastcc void @_ZNSt6vectorIN11Polynomials10PolynomialIdEESaIS2_EED1Ev(%"struct.std::vector,std::allocator > >"* nocapture) + +declare fastcc void @_ZN24TensorProductPolynomialsILi3EEC2IN11Polynomials10PolynomialIdEEEERKSt6vectorIT_SaIS6_EE(%"struct.PolynomialSpace<1>"* nocapture, %"struct.std::vector,std::allocator > >"* nocapture) + +declare fastcc void @_ZN7FE_PolyI24TensorProductPolynomialsILi3EELi3EEC2EjRKS1_RK17FiniteElementDataILi3EERKSt6vectorIbSaIbEERKS9_ISB_SaISB_EE(%"struct.FE_DGPNonparametric<3>"*, i32, %"struct.PolynomialSpace<1>"* nocapture, %"struct.FiniteElementData<1>"* nocapture, %"struct.std::vector >"* nocapture, %"struct.std::vector >,std::allocator > > >"* nocapture) + +declare fastcc void @_ZN11FE_Q_Helper12_GLOBAL__N_116invert_numberingERKSt6vectorIjSaIjEE(%"struct.std::vector >"* noalias nocapture sret, %"struct.std::vector >"* nocapture) + +declare fastcc void @_ZN4FE_QILi3EE14get_dpo_vectorEj(%"struct.std::vector >"* noalias nocapture sret, i32) + +define fastcc void @_ZN4FE_QILi3EEC1Ej(%"struct.FE_Q<3>"* %this, i32 %degree) { +entry: + invoke fastcc void @_ZNSt6vectorIbSaIbEEC1EmRKbRKS0_(%"struct.std::vector >"* undef, i64 1, i8* undef) + to label %invcont.i unwind label %lpad.i + +invcont.i: ; preds = %entry + invoke fastcc void @_ZN4FE_QILi3EE14get_dpo_vectorEj(%"struct.std::vector >"* noalias sret undef, i32 %degree) + to label %invcont1.i unwind label %lpad120.i + +invcont1.i: ; preds = %invcont.i + invoke fastcc void @_ZNSt6vectorIS_IbSaIbEESaIS1_EEC2EmRKS1_RKS2_(%"struct.std::vector >,std::allocator > > >"* undef, i64 undef, %"struct.std::vector >"* undef) + to label %invcont3.i unwind label %lpad124.i + +invcont3.i: ; preds = %invcont1.i + invoke fastcc void @_ZN4FE_QILi3EE14get_dpo_vectorEj(%"struct.std::vector >"* noalias sret undef, i32 %degree) + to label %invcont4.i unwind label %lpad128.i + +invcont4.i: ; preds = %invcont3.i + invoke fastcc void @_ZNSt6vectorIbSaIbEEC1EmRKbRKS0_(%"struct.std::vector >"* undef, i64 undef, i8* undef) + to label %invcont6.i unwind label %lpad132.i + +invcont6.i: ; preds = %invcont4.i + invoke fastcc void @_ZN4FE_QILi3EE14get_dpo_vectorEj(%"struct.std::vector >"* noalias sret undef, i32 %degree) + to label %invcont7.i unwind label %lpad136.i + +invcont7.i: ; preds = %invcont6.i + invoke fastcc void @_ZN11Polynomials19LagrangeEquidistant23generate_complete_basisEj(%"struct.std::vector,std::allocator > >"* noalias sret undef, i32 %degree) + to label %invcont9.i unwind label %lpad140.i + +invcont9.i: ; preds = %invcont7.i + invoke fastcc void @_ZN24TensorProductPolynomialsILi3EEC2IN11Polynomials10PolynomialIdEEEERKSt6vectorIT_SaIS6_EE(%"struct.PolynomialSpace<1>"* undef, %"struct.std::vector,std::allocator > >"* undef) + to label %invcont10.i unwind label %lpad144.i + +invcont10.i: ; preds = %invcont9.i + invoke fastcc void @_ZN7FE_PolyI24TensorProductPolynomialsILi3EELi3EEC2EjRKS1_RK17FiniteElementDataILi3EERKSt6vectorIbSaIbEERKS9_ISB_SaISB_EE(%"struct.FE_DGPNonparametric<3>"* undef, i32 %degree, %"struct.PolynomialSpace<1>"* undef, %"struct.FiniteElementData<1>"* undef, %"struct.std::vector >"* undef, %"struct.std::vector >,std::allocator > > >"* undef) + to label %bb14.i unwind label %lpad148.i + +bb14.i: ; preds = %invcont10.i + br i1 false, label %bb3.i164.i, label %bb.i.i.i.i160.i + +bb.i.i.i.i160.i: ; preds = %bb14.i + unreachable + +bb3.i164.i: ; preds = %bb14.i + br i1 undef, label %bb10.i168.i, label %bb.i.i.i20.i166.i + +bb.i.i.i20.i166.i: ; preds = %bb3.i164.i + unreachable + +bb10.i168.i: ; preds = %bb3.i164.i + invoke fastcc void @_ZNSt6vectorIN11Polynomials10PolynomialIdEESaIS2_EED1Ev(%"struct.std::vector,std::allocator > >"* undef) + to label %bb21.i unwind label %lpad144.i + +bb21.i: ; preds = %bb10.i168.i + invoke fastcc void @_ZNSt6vectorIN11Polynomials10PolynomialIdEESaIS2_EED1Ev(%"struct.std::vector,std::allocator > >"* undef) + to label %bb28.i unwind label %lpad140.i + +bb28.i: ; preds = %bb21.i + br i1 undef, label %bb35.i, label %bb.i.i.i175.i + +bb.i.i.i175.i: ; preds = %bb28.i + br label %bb35.i + +bb35.i: ; preds = %bb.i.i.i175.i, %bb28.i + br i1 undef, label %bb42.i, label %bb.i.i.i205.i + +bb.i.i.i205.i: ; preds = %bb35.i + unreachable + +bb42.i: ; preds = %bb35.i + br i1 undef, label %bb47.i, label %bb.i.i.i213.i + +bb.i.i.i213.i: ; preds = %bb42.i + unreachable + +bb47.i: ; preds = %bb42.i + br i1 undef, label %bb59.i, label %bb.i.i.i247.i + +bb.i.i.i247.i: ; preds = %bb47.i + unreachable + +bb59.i: ; preds = %bb47.i + br i1 undef, label %bb66.i, label %bb.i.i.i255.i + +bb.i.i.i255.i: ; preds = %bb59.i + unreachable + +bb66.i: ; preds = %bb59.i + br i1 undef, label %bb71.i, label %bb.i.i.i262.i + +bb.i.i.i262.i: ; preds = %bb66.i + br label %bb71.i + +bb71.i: ; preds = %bb.i.i.i262.i, %bb66.i + %tmp11.i.i29.i.i.i.i.i.i = invoke i8* @_Znwm(i64 12) + to label %_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i.i.i unwind label %lpad.i.i.i.i.i.i ; [#uses=0] + +lpad.i.i.i.i.i.i: ; preds = %bb71.i + unreachable + +_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i.i.i: ; preds = %bb71.i + br i1 undef, label %_ZNSt6vectorIjSaIjEED1Ev.exit.i.i, label %bb.i.i.i.i94.i + +bb.i.i.i.i94.i: ; preds = %_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i.i.i + unreachable + +_ZNSt6vectorIjSaIjEED1Ev.exit.i.i: ; preds = %_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i.i.i + %tmp11.i.i29.i.i.i.i5.i.i = invoke i8* @_Znwm(i64 undef) + to label %_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i12.i.i unwind label %lpad.i.i.i.i8.i.i ; [#uses=0] + +lpad.i.i.i.i8.i.i: ; preds = %_ZNSt6vectorIjSaIjEED1Ev.exit.i.i + invoke void @_Unwind_Resume(i8* undef) + to label %.noexc.i9.i.i unwind label %lpad.i19.i.i + +.noexc.i9.i.i: ; preds = %lpad.i.i.i.i8.i.i + unreachable + +_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i12.i.i: ; preds = %_ZNSt6vectorIjSaIjEED1Ev.exit.i.i + br i1 undef, label %bb50.i.i.i, label %bb.i.i.i.i.i.i.i.i.i.i + +bb.i.i.i.i.i.i.i.i.i.i: ; preds = %bb.i.i.i.i.i.i.i.i.i.i, %_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i12.i.i + br i1 undef, label %bb50.i.i.i, label %bb.i.i.i.i.i.i.i.i.i.i + +bb50.i.i.i: ; preds = %bb.i.i.i.i.i.i.i.i.i.i, %_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i12.i.i + invoke fastcc void @_ZN11FE_Q_Helper12_GLOBAL__N_116invert_numberingERKSt6vectorIjSaIjEE(%"struct.std::vector >"* noalias sret undef, %"struct.std::vector >"* undef) + to label %bb83.i unwind label %lpad188.i + +lpad.i19.i.i: ; preds = %lpad.i.i.i.i8.i.i + unreachable + +bb83.i: ; preds = %bb50.i.i.i + br i1 undef, label %invcont84.i, label %bb.i.i.i221.i + +bb.i.i.i221.i: ; preds = %bb83.i + unreachable + +invcont84.i: ; preds = %bb83.i + %tmp11.i.i29.i.i.i.i.i = invoke i8* @_Znwm(i64 undef) + to label %_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i.i unwind label %lpad.i.i.i.i315.i ; [#uses=0] + +lpad.i.i.i.i315.i: ; preds = %invcont84.i + invoke void @_Unwind_Resume(i8* undef) + to label %.noexc.i316.i unwind label %lpad.i352.i + +.noexc.i316.i: ; preds = %lpad.i.i.i.i315.i + unreachable + +_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i.i: ; preds = %invcont84.i + br i1 undef, label %bb50.i.i, label %bb.i.i.i.i.i.i.i.i320.i + +bb.i.i.i.i.i.i.i.i320.i: ; preds = %bb.i.i.i.i.i.i.i.i320.i, %_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i.i + br i1 undef, label %bb50.i.i, label %bb.i.i.i.i.i.i.i.i320.i + +bb50.i.i: ; preds = %bb.i.i.i.i.i.i.i.i320.i, %_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i.i + invoke fastcc void @_ZN11FE_Q_Helper12_GLOBAL__N_116invert_numberingERKSt6vectorIjSaIjEE(%"struct.std::vector >"* noalias sret undef, %"struct.std::vector >"* undef) + to label %invcont86.i unwind label %lpad200.i + +lpad.i352.i: ; preds = %lpad.i.i.i.i315.i + unreachable + +invcont86.i: ; preds = %bb50.i.i + invoke fastcc void @_ZNSt6vectorIjSaIjEEaSERKS1_(%"struct.std::vector >"* undef, %"struct.std::vector >"* undef) + to label %.noexc380.i unwind label %lpad204.i + +.noexc380.i: ; preds = %invcont86.i + br i1 undef, label %bb100.i, label %bb.i.i.i198.i + +bb.i.i.i198.i: ; preds = %.noexc380.i + unreachable + +bb100.i: ; preds = %.noexc380.i + br i1 undef, label %invcont101.i, label %bb.i.i.i190.i + +bb.i.i.i190.i: ; preds = %bb100.i + unreachable + +invcont101.i: ; preds = %bb100.i + invoke fastcc void @_ZN9TableBaseILi2EdE6reinitERK12TableIndicesILi2EE(%"struct.TableBase<2,double>"* undef, i32 undef, i32 undef) + to label %_ZN10FullMatrixIdEC1Ejj.exit.i.i unwind label %lpad.i.i.i.i.i + +lpad.i.i.i.i.i: ; preds = %invcont101.i + unreachable + +_ZN10FullMatrixIdEC1Ejj.exit.i.i: ; preds = %invcont101.i + invoke fastcc void @_ZN9TableBaseILi2EdE6reinitERK12TableIndicesILi2EE(%"struct.TableBase<2,double>"* undef, i32 undef, i32 undef) + to label %_ZN10FullMatrixIdEC1Ejj.exit28.i.i unwind label %lpad.i.i.i27.i.i + +lpad.i.i.i27.i.i: ; preds = %_ZN10FullMatrixIdEC1Ejj.exit.i.i + invoke void @_Unwind_Resume(i8* undef) + to label %.noexc.i.i unwind label %lpad.i.i + +.noexc.i.i: ; preds = %lpad.i.i.i27.i.i + unreachable + +_ZN10FullMatrixIdEC1Ejj.exit28.i.i: ; preds = %_ZN10FullMatrixIdEC1Ejj.exit.i.i + br i1 undef, label %bb58.i.i, label %bb.i.i.i304.i.i + +bb.i.i.i304.i.i: ; preds = %_ZN10FullMatrixIdEC1Ejj.exit28.i.i + unreachable + +bb58.i.i: ; preds = %_ZN10FullMatrixIdEC1Ejj.exit28.i.i + br i1 false, label %bb.i191.i, label %bb.i.i.i297.i.i + +bb.i.i.i297.i.i: ; preds = %bb58.i.i + unreachable + +lpad.i.i: ; preds = %lpad.i.i.i27.i.i + unreachable + +bb.i191.i: ; preds = %.noexc232.i, %bb58.i.i + invoke fastcc void @_ZN9TableBaseILi2EdE6reinitERK12TableIndicesILi2EE(%"struct.TableBase<2,double>"* undef, i32 undef, i32 undef) + to label %.noexc232.i unwind label %lpad196.i + +.noexc232.i: ; preds = %bb.i191.i + br i1 undef, label %bb29.loopexit.i.i, label %bb.i191.i + +bb7.i215.i: ; preds = %bb9.i216.i + br i1 undef, label %bb16.preheader.i.i, label %bb8.i.i + +bb8.i.i: ; preds = %bb7.i215.i + %tmp60.i.i = add i32 %0, 1 ; [#uses=1] + br label %bb9.i216.i + +bb9.i216.i: ; preds = %bb29.loopexit.i.i, %bb8.i.i + %0 = phi i32 [ 0, %bb29.loopexit.i.i ], [ %tmp60.i.i, %bb8.i.i ] ; [#uses=2] + br i1 undef, label %bb7.i215.i, label %bb16.preheader.i.i + +bb15.i.i: ; preds = %bb16.preheader.i.i, %bb15.i.i + %j1.0212.i.i = phi i32 [ %1, %bb15.i.i ], [ 0, %bb16.preheader.i.i ] ; [#uses=2] + %tmp6.i.i195.i.i = load i32* undef, align 4 ; [#uses=1] + %tmp231.i.i = mul i32 %0, %tmp6.i.i195.i.i ; [#uses=1] + %tmp13.i197.i.i = add i32 %j1.0212.i.i, %tmp231.i.i ; [#uses=0] + %1 = add i32 %j1.0212.i.i, 1 ; [#uses=1] + br i1 undef, label %bb15.i.i, label %bb17.i.i + +bb17.i.i: ; preds = %bb16.preheader.i.i, %bb15.i.i + br label %bb16.preheader.i.i + +bb16.preheader.i.i: ; preds = %bb17.i.i, %bb9.i216.i, %bb7.i215.i + br i1 undef, label %bb17.i.i, label %bb15.i.i + +bb29.loopexit.i.i: ; preds = %.noexc232.i + br label %bb9.i216.i + +lpad.i: ; preds = %entry + unreachable + +lpad120.i: ; preds = %invcont.i + unreachable + +lpad124.i: ; preds = %invcont1.i + unreachable + +lpad128.i: ; preds = %invcont3.i + unreachable + +lpad132.i: ; preds = %invcont4.i + unreachable + +lpad136.i: ; preds = %invcont6.i + unreachable + +lpad140.i: ; preds = %bb21.i, %invcont7.i + unreachable + +lpad144.i: ; preds = %bb10.i168.i, %invcont9.i + unreachable + +lpad148.i: ; preds = %invcont10.i + unreachable + +lpad188.i: ; preds = %bb50.i.i.i + unreachable + +lpad196.i: ; preds = %bb.i191.i + unreachable + +lpad200.i: ; preds = %bb50.i.i + unreachable + +lpad204.i: ; preds = %invcont86.i + unreachable +} + +declare fastcc void @_ZN11Polynomials19LagrangeEquidistant23generate_complete_basisEj(%"struct.std::vector,std::allocator > >"* noalias nocapture sret, i32) + +declare i32 @pthread_once(i32*, void ()*) + +declare i8* @pthread_getspecific(i32) + +declare i32 @pthread_setspecific(i32, i8*) + +declare i32 @pthread_create(i64*, %struct.pthread_attr_t*, i8* (i8*)*, i8*) + +declare i32 @pthread_cancel(i64) + +declare i32 @pthread_mutex_lock(%struct.pthread_mutex_t*) + +declare i32 @pthread_mutex_trylock(%struct.pthread_mutex_t*) + +declare i32 @pthread_mutex_unlock(%struct.pthread_mutex_t*) + +declare i32 @pthread_mutex_init(%struct.pthread_mutex_t*, %"struct.DataOutBase::GmvFlags"*) + +declare i32 @pthread_key_create(i32*, void (i8*)*) + +declare i32 @pthread_key_delete(i32) + +declare i32 @pthread_mutexattr_init(%"struct.DataOutBase::GmvFlags"*) + +declare i32 @pthread_mutexattr_settype(%"struct.DataOutBase::GmvFlags"*, i32) + +declare i32 @pthread_mutexattr_destroy(%"struct.DataOutBase::GmvFlags"*) diff --git a/test/Transforms/IndVarSimplify/loop-invariant-step.ll b/test/Transforms/IndVarSimplify/loop-invariant-step.ll new file mode 100644 index 00000000000..40156eaab59 --- /dev/null +++ b/test/Transforms/IndVarSimplify/loop-invariant-step.ll @@ -0,0 +1,33 @@ +; RUN: llvm-as < %s | opt -loop-index-split -instcombine -indvars -disable-output +; PR4455 + +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" + +declare i8* @fast_memcpy(i8*, i8*, i64) + +define void @dvdsub_decode() nounwind { +entry: ; preds = %bb1 + br label %LoopA + +LoopA: ; preds = %LoopA, %entry + %x1.0.i17 = phi i32 [ %t0, %LoopA ], [ 0, %entry ] ; [#uses=2] + %t0 = add i32 %x1.0.i17, 1 ; [#uses=1] + br i1 undef, label %LoopA, label %middle + +middle: ; preds = %LoopA + %t1 = sub i32 0, %x1.0.i17 ; [#uses=1] + %t2 = add i32 %t1, 1 ; [#uses=1] + br label %LoopB + +LoopB: ; preds = %LoopB, %bb.nph.i27 + %y.029.i = phi i32 [ 0, %middle ], [ %t7, %LoopB ] ; [#uses=2] + %t3 = mul i32 %y.029.i, %t2 ; [#uses=1] + %t4 = sext i32 %t3 to i64 ; [#uses=1] + %t5 = getelementptr i8* null, i64 %t4 ; [#uses=1] + %t6 = call i8* @fast_memcpy(i8* %t5, i8* undef, i64 undef) nounwind ; [#uses=0] + %t7 = add i32 %y.029.i, 1 ; [#uses=1] + br i1 undef, label %LoopB, label %exit + +exit: + ret void +}