brintos

brintos / llvm-project-archived public Read only

0
0
Text · 997 B · a801a81 Raw
32 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: llc < %s | FileCheck %s3 4target triple = "amdgcn--"5 6; We need to compile this for a target where we have different address spaces,7; and where pointers in those address spaces have different size.8; E.g. for amdgcn-- pointers in address space 0 are 32 bits and pointers in9; address space 1 are 64 bits.10 11; We shouldn't crash. Check that we get a loop with the two stores.12;CHECK-LABEL: foo:13;CHECK: [[LOOP_LABEL:.LBB[0-9]+_[0-9]+]]:14;CHECK: buffer_store_dword15;CHECK: buffer_store_dword16;CHECK: s_cbranch_vccnz [[LOOP_LABEL]]17 18define amdgpu_kernel void @foo() {19entry:20  br label %loop21 22loop:23  %idx0 = phi i32 [ %next_idx0, %loop ], [ 0, %entry ]24  %0 = getelementptr inbounds i32, ptr addrspace(5) null, i32 %idx025  %1 = getelementptr inbounds i32, ptr addrspace(1) null, i32 %idx026  store i32 1, ptr addrspace(5) %027  store i32 7, ptr addrspace(1) %128  %next_idx0 = add nuw nsw i32 %idx0, 129  br label %loop30}31 32