1*9880d681SAndroid Build Coastguard Worker; RUN: llc <%s | FileCheck %s 2*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-m:e-i64:64-n32:64" 3*9880d681SAndroid Build Coastguard Workertarget triple = "powerpc64le-unknown-linux-gnu" 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker; PR27390 crasher 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Worker%typ = type { i32, i32 } 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Worker; On release builds, it doesn't crash, spewing nonsense instead. 10*9880d681SAndroid Build Coastguard Worker; To make sure it works, check that and is still alive. 11*9880d681SAndroid Build Coastguard Worker; CHECK: and 12*9880d681SAndroid Build Coastguard Worker; Also, in release, it emits a COPY from a 32-bit register to 13*9880d681SAndroid Build Coastguard Worker; a 64-bit register, which happens to be emitted as cror [!] 14*9880d681SAndroid Build Coastguard Worker; by the confused CodeGen. Just to be sure, check there isn't one. 15*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: cror 16*9880d681SAndroid Build Coastguard Worker; Function Attrs: uwtable 17*9880d681SAndroid Build Coastguard Workerdefine signext i32 @_Z8access_pP1Tc(%typ* %p, i8 zeroext %type) { 18*9880d681SAndroid Build Coastguard Worker %b = getelementptr inbounds %typ, %typ* %p, i64 0, i32 1 19*9880d681SAndroid Build Coastguard Worker %1 = load i32, i32* %b, align 4 20*9880d681SAndroid Build Coastguard Worker %2 = ptrtoint i32* %b to i64 21*9880d681SAndroid Build Coastguard Worker %3 = and i64 %2, -35184372088833 22*9880d681SAndroid Build Coastguard Worker %4 = inttoptr i64 %3 to i32* 23*9880d681SAndroid Build Coastguard Worker %_msld = load i32, i32* %4, align 4 24*9880d681SAndroid Build Coastguard Worker %zzz = add i32 %1, %_msld 25*9880d681SAndroid Build Coastguard Worker ret i32 %zzz 26*9880d681SAndroid Build Coastguard Worker} 27