Files
clang-p2996/llvm/test/CodeGen/NVPTX/vector-stores.ll
Alex MacLean 369891b674 [NVPTX] use untyped loads and stores where ever possible (#137698)
In most cases, the type information attached to load and store
instructions is meaningless and inconsistently applied. We can usually
use ".b" loads and avoid the complexity of trying to assign the correct
type. The one expectation is sign-extending load, which will continue to
use ".s" to ensure the sign extension into a larger register is done
correctly.
2025-05-10 08:26:26 -07:00

40 lines
917 B
LLVM

; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_20 | FileCheck %s
; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64 -mcpu=sm_20 | %ptxas-verify %}
; CHECK-LABEL: .visible .func foo1
; CHECK: st.v2.b32
define void @foo1(<2 x float> %val, ptr %ptr) {
store <2 x float> %val, ptr %ptr
ret void
}
; CHECK-LABEL: .visible .func foo2
; CHECK: st.v4.b32
define void @foo2(<4 x float> %val, ptr %ptr) {
store <4 x float> %val, ptr %ptr
ret void
}
; CHECK-LABEL: .visible .func foo3
; CHECK: st.v2.b32
define void @foo3(<2 x i32> %val, ptr %ptr) {
store <2 x i32> %val, ptr %ptr
ret void
}
; CHECK-LABEL: .visible .func foo4
; CHECK: st.v4.b32
define void @foo4(<4 x i32> %val, ptr %ptr) {
store <4 x i32> %val, ptr %ptr
ret void
}
; CHECK-LABEL: .visible .func v16i8
define void @v16i8(ptr %a, ptr %b) {
; CHECK: ld.v4.b32
; CHECK: st.v4.b32
%v = load <16 x i8>, ptr %a
store <16 x i8> %v, ptr %b
ret void
}