2019-06-19 08:25:39 +08:00
|
|
|
; RUN: llc -o - %s -march=amdgcn -mcpu=verde -verify-machineinstrs -stop-after finalize-isel | FileCheck %s
|
2015-08-01 07:30:09 +08:00
|
|
|
; This test verifies that the instruction selection will add the implicit
|
|
|
|
; register operands in the correct order when modifying the opcode of an
|
2020-07-14 21:18:36 +08:00
|
|
|
; instruction to V_ADD_CO_U32_e32.
|
2015-08-01 07:30:09 +08:00
|
|
|
|
2020-07-14 21:18:36 +08:00
|
|
|
; CHECK: %{{[0-9]+}}:vgpr_32 = V_ADD_CO_U32_e32 %{{[0-9]+}}, %{{[0-9]+}}, implicit-def $vcc, implicit $exec
|
2015-08-01 07:30:09 +08:00
|
|
|
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @test(i32 addrspace(1)* %out, i32 addrspace(1)* %in) {
|
2015-08-01 07:30:09 +08:00
|
|
|
entry:
|
|
|
|
%b_ptr = getelementptr i32, i32 addrspace(1)* %in, i32 1
|
2016-04-12 21:38:18 +08:00
|
|
|
%a = load volatile i32, i32 addrspace(1)* %in
|
|
|
|
%b = load volatile i32, i32 addrspace(1)* %b_ptr
|
2015-08-01 07:30:09 +08:00
|
|
|
%result = add i32 %a, %b
|
|
|
|
store i32 %result, i32 addrspace(1)* %out
|
|
|
|
ret void
|
|
|
|
}
|