llvm-project/llvm/test/CodeGen/NVPTX
Kjetil Kjeka ff1920d106 [NVPTX] Promote i24, i40, i48 and i56 to next power-of-two register when passing
Today llc will crash when attempting to use non-power-of-two integer types as
function arguments or returns. This patch enables passing non standard integer
values in functions by promoting them before store and truncating after load.

The main motivation of implementing this change is that rust casts small structs
(less than pointer size) into an integer of the same size. As an example, if a
struct contains three u8 then it will be passed as an i24. This patch is a step
towards enabling rust compilation to ptx while retaining the target independent
optimizations.

More context can be found in https://github.com/llvm/llvm-project/issues/55764

Differential Revision: https://reviews.llvm.org/D129291
2022-07-22 14:14:12 -07:00
..
APIntLoadStore.ll [NVPTX][tests] Do not run the tests which are not supported by nvptx 2022-04-26 17:26:56 +03:00
APIntParam.ll [NVPTX][tests] Do not run the tests which are not supported by nvptx 2022-04-26 17:26:56 +03:00
APIntSextParam.ll [NVPTX][tests] Do not run the tests which are not supported by nvptx 2022-04-26 17:26:56 +03:00
APIntZextParam.ll [NVPTX][tests] Do not run the tests which are not supported by nvptx 2022-04-26 17:26:56 +03:00
LoadStoreVectorizer.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
MachineSink-call.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
MachineSink-convergent.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
TailDuplication-convergent.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
access-non-generic.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
add-sub-128bit.ll [NVPTX] Add add.cc/addc.cc/sub.cc/subc.cc for i64 2022-04-29 15:32:22 -07:00
addrspacecast-gvar.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
addrspacecast.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
aggr-param.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
aggregate-return.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
alias.ll
annotations.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
arg-lowering.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
arithmetic-fp-sm20.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
arithmetic-int.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
async-copy.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
atomic-lower-local.ll Transforms: Fix code duplication between LowerAtomic and AtomicExpand 2022-04-08 19:06:36 -04:00
atomicrmw-expand.ll [NVPTX] Enable AtomicExpandPass for NVPTX 2022-05-20 17:25:28 -04:00
atomics-sm60.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
atomics-with-scope.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
atomics.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
b52037.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
barrier.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
bfe.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
branch-fold.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
branch-fold.mir [NVPTX] Copy machine operand flags in TII::insertBranch 2021-11-03 12:38:27 +03:00
bug17709.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
bug21465.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
bug22246.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
bug22322.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
bug26185-2.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
bug26185.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
bug41651.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
bypass-div.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
call-with-alloca-buffer.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
callchain.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
calling-conv.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
calls-with-phi.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
combine-min-max.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
compare-int.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
constant-vectors.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
convergent-mir-call.ll
convert-fp.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
convert-int-sm20.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
convert-sm80.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
ctlz.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
ctpop.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
cttz.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
disable-opt.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
div-ri.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
divrem-combine.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
envreg.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
extloadv.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
f16-ex2.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
f16-instructions.ll [NVPTX] Prefix "$L__" for branch label names 2022-04-30 21:55:20 +02:00
f16x2-instructions.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
fast-math.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
fcos-no-fast-math.ll
filetype-null.ll [NVPTX] Avoid a crash when 'llc' is called with '-filetype=null' 2022-03-22 16:46:47 +04:00
fma-assoc.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
fma-disable.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
fma.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
fminimum-fmaximum.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
fns.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
fp-contract.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
fp-literals.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
fp16.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
fsin-no-fast-math.ll
function-align.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
generic-to-nvvm-ir.ll [NVPTX] Keep metadata attached to module-scope variables 2022-06-22 05:51:29 -07:00
generic-to-nvvm.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
global-addrspace.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
global-ctor-empty.ll
global-ctor.ll
global-dtor.ll
global-ordering.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
global-variable-big.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
global-visibility.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
globals_init.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
globals_lowering.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
gvar-init.ll
half.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
i1-global.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
i1-int-to-fp.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
i1-param.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
i8-param.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
i128-global.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
i128-param.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
i128-retval.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
i128-struct.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
idioms.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
imad.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
inline-asm.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
inlineasm-output-template.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
intrin-nocapture.ll
intrinsic-old.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
intrinsics.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
isspacep.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
ld-addrspace.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
ld-generic.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
ld-st-addrrspace.py [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
ldg-invariant.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
ldparam-v4.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
ldu-i8.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
ldu-ldg.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
ldu-reg-plus-offset.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
libcall-fulfilled.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
libcall-instruction.ll
libcall-intrinsic.ll
lit.local.cfg
load-sext-i1.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
load-store.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
load-with-non-coherent-cache.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
local-stack-frame.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
loop-vectorize.ll
lower-aggr-copies.ll [NVPTX] Prefix "$L__" for branch label names 2022-04-30 21:55:20 +02:00
lower-alloca.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
lower-args.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
lower-byval-args.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
lower-kernel-ptr-arg.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
machine-sink.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
managed.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
match.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
math-intrins-sm53-ptx42.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
math-intrins-sm80-ptx70-instcombine.ll [NVPTX] Add more FMA intriniscs/builtins 2022-02-23 13:56:53 -08:00
math-intrins-sm80-ptx70.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
math-intrins-sm86-ptx72.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
math-intrins.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
mbarrier.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
minmax-negative.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
misaligned-vector-ldst.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
module-inline-asm.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
mulwide.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
named-barriers.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
no-extra-parens.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
noduplicate-syncthreads.ll
nofunc.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
nounroll.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
nvcl-param-align.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
nvvm-annotations-D120129.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
nvvm-reflect-arch.ll [opt] Directly translate -O# to -passes='default<O#>' 2021-10-18 16:48:10 -07:00
nvvm-reflect-module-flag.ll
nvvm-reflect-opaque.ll [NVPTX][FIX] Allow __nvvm_reflect in the presence of opaque pointers 2022-04-12 16:42:50 -05:00
nvvm-reflect.ll [opt] Directly translate -O# to -passes='default<O#>' 2021-10-18 16:48:10 -07:00
packed-aggr.ll Reapply "[NVPTX] Use the mask() operator to initialize packed structs with pointers" 2022-07-18 20:56:26 +04:00
param-align.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
param-load-store.ll [NVPTX] Promote i24, i40, i48 and i56 to next power-of-two register when passing 2022-07-22 14:14:12 -07:00
param-vectorize-device.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
param-vectorize-kernel.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
pass-name.ll [NVPTX] Add missing pass names 2022-07-12 07:58:13 -07:00
pow2_mask_cmp.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
pr13291-i1-store.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
pr16278.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
pr17529.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
proxy-reg-erasure-mir.ll
proxy-reg-erasure-ptx.ll
read-global-variable-constant.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
redux-sync.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
refl1.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
reg-copy.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
reg-types.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
rotate.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
rotate_64.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
sched1.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
sched2.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
sext-in-reg.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
sext-params.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
shfl-p.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
shfl-sync-p.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
shfl-sync.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
shfl.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
shift-parts.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
simple-call.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
sm-version.ll [NVPTX] Add version test for sm_75, sm_80, sm_86. 2022-01-13 20:24:09 +01:00
speculative-execution-divergent-target.ll
sqrt-approx.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
st-addrspace.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
st-generic.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
store-retval.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
surf-read-cuda.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
surf-read.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
surf-tex.py [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
surf-write-cuda.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
surf-write.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
symbol-naming.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
tex-read-cuda.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
tex-read.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
texsurf-queries.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
tid-range.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
tuple-literal.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
vec-param-load.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
vec8.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
vector-args.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
vector-call.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
vector-compare.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
vector-global.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
vector-loads.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
vector-select.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
vector-stores.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
vectorize-misaligned.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
vote.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
weak-global.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
weak-linkage.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
wmma.py [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00
zeroext-32bit.ll [NVPTX] Integrate ptxas to LIT tests 2022-04-28 14:59:45 +03:00