llvm-project/llvm/test/CodeGen/AMDGPU/scalar_to_vector_v2x16.ll
Daniil Fukalov 6bf794a02a
[AMDGPU] Disable generic DAG combines at -O0 to preserve debuggability. (#176304)
Disable generic DAG combines for AMDGPU at -O0 via
disableGenericCombines() to preserve instructions that users may want to
set breakpoints on during debugging.

Assisted-by: Cursor / Claude Opus 4.6
2026-04-01 11:55:17 +02:00

23 lines
843 B
LLVM

; RUN: llc -mtriple=amdgcn -mcpu=fiji < %s | FileCheck -enable-var-scope -check-prefixes=GCN,OPT %s
; RUN: llc -mtriple=amdgcn -mcpu=fiji -O0 < %s | FileCheck -enable-var-scope -check-prefix=GCN %s
; GCN-LABEL: {{^}}scalar_to_vector_i16:
; OPT: v_mov_b32_e32 [[V:v[0-9]+]], 42
; OPT: buffer_store_short [[V]],
define void @scalar_to_vector_i16() {
%tmp = load <2 x i16>, ptr addrspace(5) poison
%tmp1 = insertelement <2 x i16> %tmp, i16 42, i64 0
store <2 x i16> %tmp1, ptr addrspace(5) poison
ret void
}
; GCN-LABEL: {{^}}scalar_to_vector_f16:
; OPT: v_mov_b32_e32 [[V:v[0-9]+]], 0x3c00
; OPT: buffer_store_short [[V]],
define void @scalar_to_vector_f16() {
%tmp = load <2 x half>, ptr addrspace(5) poison
%tmp1 = insertelement <2 x half> %tmp, half 1.0, i64 0
store <2 x half> %tmp1, ptr addrspace(5) poison
ret void
}