diff options
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Transforms/SROA/pr26972.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/Transforms/SROA/pr26972.ll b/llvm/test/Transforms/SROA/pr26972.ll new file mode 100644 index 00000000000..a71058c05b9 --- /dev/null +++ b/llvm/test/Transforms/SROA/pr26972.ll @@ -0,0 +1,17 @@ +; 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) |

