2013-11-12 03:28:16 +08:00
|
|
|
; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
|
|
|
|
|
|
|
|
target triple = "nvptx-unknown-cuda"
|
|
|
|
|
|
|
|
; CHECK: .visible .func foo
|
|
|
|
define void @foo(<8 x i8> %a, i8* %b) {
|
2017-02-22 06:56:05 +08:00
|
|
|
; CHECK-DAG: ld.param.v4.u8 {[[E0:%rs[0-9]+]], [[E1:%rs[0-9]+]], [[E2:%rs[0-9]+]], [[E3:%rs[0-9]+]]}, [foo_param_0]
|
|
|
|
; CHECK-DAG: ld.param.v4.u8 {[[E4:%rs[0-9]+]], [[E5:%rs[0-9]+]], [[E6:%rs[0-9]+]], [[E7:%rs[0-9]+]]}, [foo_param_0+4]
|
|
|
|
; CHECK-DAG: ld.param.u32 %[[B:r[0-9+]]], [foo_param_1]
|
Add LiveRangeShrink pass to shrink live range within BB.
Summary: LiveRangeShrink pass moves instruction right after the definition with the same BB if the instruction and its operands all have more than one use. This pass is inexpensive and guarantees optimal live-range within BB.
Reviewers: davidxl, wmi, hfinkel, MatzeB, andreadb
Reviewed By: MatzeB, andreadb
Subscribers: hiraditya, jyknight, sanjoy, skatkov, gberry, jholewinski, qcolombet, javed.absar, krytarowski, atrick, spatel, RKSimon, andreadb, MatzeB, mehdi_amini, mgorny, efriedma, davide, dberlin, llvm-commits
Differential Revision: https://reviews.llvm.org/D32563
llvm-svn: 302938
2017-05-13 03:29:27 +08:00
|
|
|
; CHECK-DAG: add.s16 [[T:%rs[0-9+]]], [[E1]], [[E6]];
|
2017-02-22 06:56:05 +08:00
|
|
|
; CHECK: st.u8 [%[[B]]], [[T]];
|
|
|
|
%t0 = extractelement <8 x i8> %a, i32 1
|
|
|
|
%t1 = extractelement <8 x i8> %a, i32 6
|
|
|
|
%t = add i8 %t0, %t1
|
|
|
|
store i8 %t, i8* %b
|
2013-11-12 03:28:16 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|