
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.
26 lines
1.0 KiB
LLVM
26 lines
1.0 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_20 -verify-machineinstrs | FileCheck %s
|
|
|
|
target triple = "nvptx64-unknown-unknown"
|
|
|
|
define void @kernel_func(ptr %in.vec, ptr %out.vec0) nounwind {
|
|
; CHECK-LABEL: kernel_func(
|
|
; CHECK: {
|
|
; CHECK-NEXT: .reg .b32 %r<14>;
|
|
; CHECK-EMPTY:
|
|
; CHECK-NEXT: // %bb.0:
|
|
; CHECK-NEXT: ld.param.b32 %r1, [kernel_func_param_0];
|
|
; CHECK-NEXT: ld.v4.b32 {%r2, %r3, %r4, %r5}, [%r1];
|
|
; CHECK-NEXT: ld.v4.b32 {%r6, %r7, %r8, %r9}, [%r1+16];
|
|
; CHECK-NEXT: ld.param.b32 %r10, [kernel_func_param_1];
|
|
; CHECK-NEXT: prmt.b32 %r11, %r6, %r8, 0x4000U;
|
|
; CHECK-NEXT: prmt.b32 %r12, %r2, %r4, 0x40U;
|
|
; CHECK-NEXT: prmt.b32 %r13, %r12, %r11, 0x7610U;
|
|
; CHECK-NEXT: st.b32 [%r10], %r13;
|
|
; CHECK-NEXT: ret;
|
|
%wide.vec = load <32 x i8>, ptr %in.vec, align 64
|
|
%vec0 = shufflevector <32 x i8> %wide.vec, <32 x i8> undef, <4 x i32> <i32 0, i32 8, i32 16, i32 24>
|
|
store <4 x i8> %vec0, ptr %out.vec0, align 64
|
|
ret void
|
|
}
|