mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-28 23:43:25 +00:00
03a784fdb1
While not strictly necessary, since we don't support large integer types, this avoids bugs due to silent truncation from uint64_t to a 32-bit unsigned (e.g. DL.isLegalInteger(DL.getTypeSizeInBits(Ty) ) This fixes PR26972. Differential Revision: http://reviews.llvm.org/D18258 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263850 91177308-0d34-0410-b5e6-96231b3b80d8
18 lines
593 B
LLVM
18 lines
593 B
LLVM
; RUN: opt < %s -sroa -S | FileCheck %s
|
|
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-pc-linux"
|
|
|
|
; Make sure we properly handle allocas where the allocated
|
|
; size overflows a uint32_t. This specific constant results in
|
|
; the size in bits being 32 after truncation to a 32-bit int.
|
|
; CHECK-LABEL: fn1
|
|
; CHECK-NEXT: ret void
|
|
define void @fn1() {
|
|
%a = alloca [1073741825 x i32], align 16
|
|
%t0 = bitcast [1073741825 x i32]* %a to i8*
|
|
call void @llvm.lifetime.end(i64 4294967300, i8* %t0)
|
|
ret void
|
|
}
|
|
|
|
declare void @llvm.lifetime.end(i64, i8* nocapture)
|