1 ; RUN: opt -S -aa-pipeline=basic-aa -passes=gvn < %s | FileCheck %s
3 target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128"
4 target triple = "i386-apple-macosx10.6.0"
6 ; We incorrectly returned noalias in the example below for "tmp5" and
7 ; "tmp12" returning i32 32, since basicaa converted the offsets to 64b
8 ; and missed the wrap-around
10 define i32 @foo(ptr %buffer) {
12 %tmp2 = getelementptr i8, ptr %buffer, i32 -2071408432
13 %tmp4 = getelementptr i8, ptr %buffer, i32 128
14 store i32 32, ptr %tmp4, align 4
15 %tmp12 = getelementptr i32, ptr %tmp2, i32 -1629631508
16 store i32 28, ptr %tmp12, align 4
17 %tmp13 = getelementptr i8, ptr %buffer, i32 128
18 %tmp2083 = load i32, ptr %tmp13, align 4