; REQUIRES: arm-registered-target ; RUN: opt -S -loop-reduce %s -o - | FileCheck %s target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" target triple = "armv8-unknown-hurd-eabihf" %"class.std::__1::vector.182" = type { %"class.std::__1::__vector_base.183" } %"class.std::__1::__vector_base.183" = type { i8*, i8*, %"class.std::__1::__compressed_pair.184" } %"class.std::__1::__compressed_pair.184" = type { %"struct.std::__1::__compressed_pair_elem.185" } %"struct.std::__1::__compressed_pair_elem.185" = type { i8* } %"class.std::__1::__vector_base_common" = type { i8 } $vector_insert = comdat any declare i8* @Allocate(i32) local_unnamed_addr declare void @Free(i8*) local_unnamed_addr declare void @_ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv(%"class.std::__1::__vector_base_common"*) local_unnamed_addr declare i8* @memmove(i8*, i8*, i32) local_unnamed_addr ; Function Attrs: noimplicitfloat nounwind uwtable define linkonce_odr i32 @vector_insert(%"class.std::__1::vector.182"*, [1 x i32], i8*, i8*) local_unnamed_addr #1 comdat align 2 { ; CHECK-LABEL: vector_insert %5 = extractvalue [1 x i32] %1, 0 %6 = getelementptr inbounds %"class.std::__1::vector.182", %"class.std::__1::vector.182"* %0, i32 0, i32 0, i32 0 %7 = load i8*, i8** %6, align 4 ; CHECK: [[LOAD:%[0-9]+]] = load i8*, i8** %8 = bitcast %"class.std::__1::vector.182"* %0 to i32* %9 = ptrtoint i8* %7 to i32 ; CHECK: [[NEW_CAST:%[0-9]+]] = ptrtoint i8* [[LOAD]] to i32 ; CHECK: [[OLD_CAST:%[0-9]+]] = ptrtoint i8* [[LOAD]] to i32 %10 = sub i32 %5, %9 %11 = getelementptr inbounds i8, i8* %7, i32 %10 %12 = ptrtoint i8* %3 to i32 %13 = ptrtoint i8* %2 to i32 %14 = sub i32 %12, %13 %15 = icmp sgt i32 %14, 0 br i1 %15, label %18, label %16 ;