1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -basicaa -gvn -S | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker; PR15967 4*9880d681SAndroid Build Coastguard Worker; BasicAA claims no alias when there is (due to a problem when the MaxLookup 5*9880d681SAndroid Build Coastguard Worker; limit was reached). 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Workertarget datalayout = "e" 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Worker%struct.foo = type { i32, i32 } 10*9880d681SAndroid Build Coastguard Worker 11*9880d681SAndroid Build Coastguard Workerdefine i32 @main() { 12*9880d681SAndroid Build Coastguard Worker %t = alloca %struct.foo, align 4 13*9880d681SAndroid Build Coastguard Worker %1 = getelementptr inbounds %struct.foo, %struct.foo* %t, i32 0, i32 0 14*9880d681SAndroid Build Coastguard Worker store i32 1, i32* %1, align 4 15*9880d681SAndroid Build Coastguard Worker %2 = getelementptr inbounds %struct.foo, %struct.foo* %t, i64 1 16*9880d681SAndroid Build Coastguard Worker %3 = bitcast %struct.foo* %2 to i8* 17*9880d681SAndroid Build Coastguard Worker %4 = getelementptr inbounds i8, i8* %3, i32 -1 18*9880d681SAndroid Build Coastguard Worker store i8 0, i8* %4 19*9880d681SAndroid Build Coastguard Worker %5 = getelementptr inbounds i8, i8* %4, i32 -1 20*9880d681SAndroid Build Coastguard Worker store i8 0, i8* %5 21*9880d681SAndroid Build Coastguard Worker %6 = getelementptr inbounds i8, i8* %5, i32 -1 22*9880d681SAndroid Build Coastguard Worker store i8 0, i8* %6 23*9880d681SAndroid Build Coastguard Worker %7 = getelementptr inbounds i8, i8* %6, i32 -1 24*9880d681SAndroid Build Coastguard Worker store i8 0, i8* %7 25*9880d681SAndroid Build Coastguard Worker %8 = getelementptr inbounds i8, i8* %7, i32 -1 26*9880d681SAndroid Build Coastguard Worker store i8 0, i8* %8 27*9880d681SAndroid Build Coastguard Worker %9 = getelementptr inbounds i8, i8* %8, i32 -1 28*9880d681SAndroid Build Coastguard Worker store i8 0, i8* %9 29*9880d681SAndroid Build Coastguard Worker %10 = getelementptr inbounds i8, i8* %9, i32 -1 30*9880d681SAndroid Build Coastguard Worker store i8 0, i8* %10 31*9880d681SAndroid Build Coastguard Worker %11 = getelementptr inbounds i8, i8* %10, i32 -1 32*9880d681SAndroid Build Coastguard Worker store i8 0, i8* %11 33*9880d681SAndroid Build Coastguard Worker %12 = load i32, i32* %1, align 4 34*9880d681SAndroid Build Coastguard Worker ret i32 %12 35*9880d681SAndroid Build Coastguard Worker; CHECK: ret i32 %12 36*9880d681SAndroid Build Coastguard Worker} 37