1; RUN: opt -S -codegenprepare %s -o - | FileCheck %s 2; 3; Ensure that we don't {crash,return a bad value} when given an alloca larger 4; than what a pointer can represent. 5 6target datalayout = "p:16:16" 7 8; CHECK-LABEL: @alloca_overflow_is_unknown( 9define i16 @alloca_overflow_is_unknown() { 10 %i = alloca i8, i32 65537 11 %j = call i16 @llvm.objectsize.i16.p0i8(i8* %i, i1 false, i1 false, i1 false) 12 ; CHECK: ret i16 -1 13 ret i16 %j 14} 15 16declare i16 @llvm.objectsize.i16.p0i8(i8*, i1, i1, i1) 17