brintos

brintos / llvm-project-archived public Read only

0
0
Text · 504 B · 171eb3e Raw
17 lines · plain
1; RUN: opt -S -passes=lower-constant-intrinsics %s -o - | FileCheck %s2;3; Ensure that we don't {crash,return a bad value} when given an alloca larger4; 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 6553711  %j = call i16 @llvm.objectsize.i16.p0(ptr %i, i1 false, i1 false, i1 false)12  ; CHECK: ret i16 -113  ret i16 %j14}15 16declare i16 @llvm.objectsize.i16.p0(ptr, i1, i1, i1)17