; Check that the unexpanded accumulator functions and the dummy variables are deleted. ; There doesn't seem to be any way to compute the basename of %s, hence the unfortunate ; explicit uses of "test_reduce_general_cleanup" below. ; There doesn't seem to be a way to write a CHECK-NOT pattern that matches only at the ; end of a line (llvm-objdump dumps symbol name at end of line), so sed is employed ; to add a '<' at the end of each line (symbol name). This allows us to use (e.g.) ; "aiAccum<" to match the symbol "aiAccum" but not the symbol "aiAccum.expand". ; RUN: llvm-rs-as %s -o %t ; RUN: bcc -o test_reduce_general_cleanup -output_path %T -bclib libclcore.bc -mtriple armv7-none-linux-gnueabi %t ; RUN: llvm-objdump -t %T/test_reduce_general_cleanup.o | sed -e 's!$!*, %struct.MinAndMax*)* @fMMOutConverter to i8*), align 4 @.rs.reduce_fn.fzInit = global i8* bitcast (void (i32*)* @fzInit to i8*), align 4 @.rs.reduce_fn.fzAccum = global i8* bitcast (void (i32*, i32, i32)* @fzAccum to i8*), align 4 @.rs.reduce_fn.fzCombine = global i8* bitcast (void (i32*, i32*)* @fzCombine to i8*), align 4 @.rs.reduce_fn.fz2Init = global i8* bitcast (void (<2 x i32>*)* @fz2Init to i8*), align 4 @.rs.reduce_fn.fz2Accum = global i8* bitcast (void (<2 x i32>*, i32, i32, i32)* @fz2Accum to i8*), align 4 @.rs.reduce_fn.fz2Combine = global i8* bitcast (void (<2 x i32>*, <2 x i32>*)* @fz2Combine to i8*), align 4 @.rs.reduce_fn.fz3Init = global i8* bitcast (void (<3 x i32>*)* @fz3Init to i8*), align 4 @.rs.reduce_fn.fz3Accum = global i8* bitcast (void (<3 x i32>*, i32, i32, i32, i32)* @fz3Accum to i8*), align 4 @.rs.reduce_fn.fz3Combine = global i8* bitcast (void (<3 x i32>*, <3 x i32>*)* @fz3Combine to i8*), align 4 @.rs.reduce_fn.hsgAccum = global i8* bitcast (void ([256 x i32]*, i8)* @hsgAccum to i8*), align 4 @.rs.reduce_fn.hsgCombine = global i8* bitcast (void ([256 x i32]*, [256 x i32]*)* @hsgCombine to i8*), align 4 @.rs.reduce_fn.modeOutConvert = global i8* bitcast (void (<2 x i32>*, [256 x i32]*)* @modeOutConvert to i8*), align 4 @negInf = common global float 0.000000e+00, align 4 @posInf = common global float 0.000000e+00, align 4 ; Function Attrs: nounwind define internal void @aiAccum(i32* nocapture %accum, i32 %val) #0 { %1 = load i32, i32* %accum, align 4, !tbaa !22 %2 = add nsw i32 %1, %val store i32 %2, i32* %accum, align 4, !tbaa !22 ret void } ; Function Attrs: nounwind define internal void @dpAccum(float* nocapture %accum, float %in1, float %in2) #0 { %1 = fmul float %in1, %in2 %2 = load float, float* %accum, align 4, !tbaa !26 %3 = fadd float %1, %2 store float %3, float* %accum, align 4, !tbaa !26 ret void } ; Function Attrs: nounwind define internal void @dpSum(float* nocapture %accum, float* nocapture %val) #0 { %1 = load float, float* %val, align 4, !tbaa !26 %2 = load float, float* %accum, align 4, !tbaa !26 %3 = fadd float %1, %2 store float %3, float* %accum, align 4, !tbaa !26 ret void } ; Function Attrs: nounwind define internal void @fMMInit(%struct.MinAndMax* nocapture %accum) #0 { %1 = load i32, i32* bitcast (float* @posInf to i32*), align 4, !tbaa !26 %2 = bitcast %struct.MinAndMax* %accum to i32* store i32 %1, i32* %2, align 4, !tbaa !26 %3 = getelementptr inbounds %struct.MinAndMax, %struct.MinAndMax* %accum, i32 0, i32 0, i32 1 store i32 -1, i32* %3, align 4, !tbaa !22 %4 = load i32, i32* bitcast (float* @negInf to i32*), align 4, !tbaa !26 %5 = getelementptr inbounds %struct.MinAndMax, %struct.MinAndMax* %accum, i32 0, i32 1 %6 = bitcast %struct.IndexedVal* %5 to i32* store i32 %4, i32* %6, align 4, !tbaa !26 %7 = getelementptr inbounds %struct.MinAndMax, %struct.MinAndMax* %accum, i32 0, i32 1, i32 1 store i32 -1, i32* %7, align 4, !tbaa !22 ret void } ; Function Attrs: nounwind define internal void @fMMAccumulator(%struct.MinAndMax* nocapture %accum, float %in, i32 %x) #0 { %1 = getelementptr inbounds %struct.MinAndMax, %struct.MinAndMax* %accum, i32 0, i32 0, i32 0 %2 = load float, float* %1, align 4, !tbaa !26 %3 = fcmp ogt float %2, %in br i1 %3, label %4, label %6 ;