1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -memcpyopt -mldst-motion -gvn -S | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Workerdeclare void @check(i8) 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Workerdeclare void @write(i8* %res) 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Workerdefine void @test1() { 8*9880d681SAndroid Build Coastguard Worker %1 = alloca [10 x i8] 9*9880d681SAndroid Build Coastguard Worker %2 = bitcast [10 x i8]* %1 to i8* 10*9880d681SAndroid Build Coastguard Worker call void @write(i8* %2) 11*9880d681SAndroid Build Coastguard Worker %3 = load i8, i8* %2 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: undef 14*9880d681SAndroid Build Coastguard Worker call void @check(i8 %3) 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard Worker ret void 17*9880d681SAndroid Build Coastguard Worker} 18*9880d681SAndroid Build Coastguard Worker 19