brintos

brintos / llvm-project-archived public Read only

0
0
Text · 649 B · 77b26b2 Raw
21 lines · plain
1; RUN: opt < %s -passes=licm -S | FileCheck %s2 3target datalayout = "e-p:32:32-p1:64:64-p4:64:64"4 5; Make sure isDereferenceableAndAlignePointer() doesn't crash when looking6; walking pointer defs with an addrspacecast that changes pointer size.7; CHECK-LABEL: @addrspacecast_crash8define void @addrspacecast_crash() {9bb:10  %tmp = alloca [256 x i32]11  br label %bb112 13bb1:14  %tmp2 = getelementptr inbounds [256 x i32], ptr %tmp, i32 0, i32 3615  %tmp4 = addrspacecast ptr %tmp2 to ptr addrspace(4)16  %tmp5 = load <4 x i32>, ptr addrspace(4) %tmp417  %tmp6 = xor <4 x i32> %tmp5, undef18  store <4 x i32> %tmp6, ptr addrspace(1) undef19  br label %bb120}21