blob: 2dc9277460716a8ec44a48ceb24f2558aeb13055 [file] [log] [blame]
Matt Arsenault36b4b0b2017-08-07 18:30:35 +00001; RUN: llc -march=amdgcn -mcpu=tahiti -mattr=-promote-alloca -verify-machineinstrs < %s
Marek Olsak75170772015-01-27 17:27:15 +00002; RUN: llc -march=amdgcn -mcpu=tonga -mattr=-promote-alloca -verify-machineinstrs < %s
Tom Stellard8dd392e2014-10-09 18:09:15 +00003
4; Test that INSERT_SUBREG instructions don't have non-register operands after
5; instruction selection.
6
7; Make sure this doesn't crash
8; CHECK-LABEL: test:
Matt Arsenault3dbeefa2017-03-21 21:39:51 +00009define amdgpu_kernel void @test(i64 addrspace(1)* %out) {
Tom Stellard8dd392e2014-10-09 18:09:15 +000010entry:
Yaxun Liu2a22c5d2018-02-02 16:07:16 +000011 %tmp0 = alloca [16 x i32], addrspace(5)
12 %tmp1 = ptrtoint [16 x i32] addrspace(5)* %tmp0 to i32
Tom Stellard8dd392e2014-10-09 18:09:15 +000013 %tmp2 = sext i32 %tmp1 to i64
14 store i64 %tmp2, i64 addrspace(1)* %out
15 ret void
16}