1*9880d681SAndroid Build Coastguard Worker; RUN: opt -S -basicaa -gvn < %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128" 4*9880d681SAndroid Build Coastguard Workertarget triple = "i386-apple-macosx10.6.0" 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Worker; We incorrectly returned noalias in the example below for "tmp5" and 7*9880d681SAndroid Build Coastguard Worker; "tmp12" returning i32 32, since basicaa converted the offsets to 64b 8*9880d681SAndroid Build Coastguard Worker; and missed the wrap-around 9*9880d681SAndroid Build Coastguard Worker 10*9880d681SAndroid Build Coastguard Workerdefine i32 @foo(i8* %buffer) { 11*9880d681SAndroid Build Coastguard Workerentry: 12*9880d681SAndroid Build Coastguard Worker %tmp2 = getelementptr i8, i8* %buffer, i32 -2071408432 13*9880d681SAndroid Build Coastguard Worker %tmp3 = bitcast i8* %tmp2 to i32* 14*9880d681SAndroid Build Coastguard Worker %tmp4 = getelementptr i8, i8* %buffer, i32 128 15*9880d681SAndroid Build Coastguard Worker %tmp5 = bitcast i8* %tmp4 to i32* 16*9880d681SAndroid Build Coastguard Worker store i32 32, i32* %tmp5, align 4 17*9880d681SAndroid Build Coastguard Worker %tmp12 = getelementptr i32, i32* %tmp3, i32 -1629631508 18*9880d681SAndroid Build Coastguard Worker store i32 28, i32* %tmp12, align 4 19*9880d681SAndroid Build Coastguard Worker %tmp13 = getelementptr i8, i8* %buffer, i32 128 20*9880d681SAndroid Build Coastguard Worker %tmp14 = bitcast i8* %tmp13 to i32* 21*9880d681SAndroid Build Coastguard Worker %tmp2083 = load i32, i32* %tmp14, align 4 22*9880d681SAndroid Build Coastguard Worker; CHECK: ret i32 28 23*9880d681SAndroid Build Coastguard Worker ret i32 %tmp2083 24*9880d681SAndroid Build Coastguard Worker} 25