llvm-project/llvm/test/CodeGen/Mips/msa
Petar Jovanovic 2b6fe3ffa6 [mips][msa] Mask vectors holding shift amounts
Masked vectors which hold shift amounts when creating the following nodes:
ISD::SHL, ISD::SRL or ISD::SRA.
Instructions that use said nodes, which have had their arguments altered are
sll, srl, sra, bneg, bclr and bset.

For said instructions, the shift amount or the bit position that is
specified in the corresponding vector elements will be interpreted as the
shift amount/bit position modulo the size of the element in bits.

The problem lies in compiling with -O2 enabled, where the instructions for
formats .w and .d are not generated, but are instead optimized away.
In this case, having shift amounts that are either negative or greater than
the element bit size results in generation of incorrect results when
constant folding.

We remedy this by masking the operands for the nodes mentioned above before
actually creating them, so that the final result is correct before placed
into the constant pool.

Patch by Stefan Maksimovic.

Differential Revision: https://reviews.llvm.org/D31331

llvm-svn: 300839
2017-04-20 13:26:46 +00:00
..
2r.ll
2r_vector_scalar.ll [mips] Use --check-prefixes where appropriate. NFC. 2016-06-24 12:23:17 +00:00
2rf.ll
2rf_exup.ll
2rf_float_int.ll
2rf_fq.ll
2rf_int_float.ll
2rf_tq.ll
3r-a.ll
3r-b.ll
3r-c.ll
3r-d.ll
3r-i.ll
3r-m.ll
3r-p.ll
3r-s.ll
3r-v.ll
3r_4r.ll
3r_4r_widen.ll [mips][msa] Prevent output operand from commuting for dpadd_[su].df ins 2017-03-31 14:31:55 +00:00
3r_splat.ll
3rf.ll
3rf_4rf.ll
3rf_4rf_q.ll
3rf_exdo.ll
3rf_float_int.ll
3rf_int_float.ll
3rf_q.ll
arithmetic.ll
arithmetic_float.ll
basic_operations.ll [mips][msa] Accept more values for constant splats 2017-03-10 13:27:14 +00:00
basic_operations_float.ll [mips] Correct label prefixes for N32 and N64. 2016-07-19 10:49:03 +00:00
bit.ll
bitcast.ll
bitwise.ll [mips][msa] Fix generation of bm(n)zi and bins[lr]i instructions 2017-04-07 13:31:36 +00:00
bmzi_bmnzi.ll [mips][msa] Fix generation of bm(n)zi and bins[lr]i instructions 2017-04-07 13:31:36 +00:00
compare.ll
compare_float.ll
elm_copy.ll [mips] Use --check-prefixes where appropriate. NFC. 2016-06-24 12:23:17 +00:00
elm_cxcmsa.ll [mips][msa] copyPhysReg() should not set RegState::Define on result of CTCMSA. 2016-06-14 09:11:33 +00:00
elm_insv.ll [mips] Use --check-prefixes where appropriate. NFC. 2016-06-24 12:23:17 +00:00
elm_move.ll
elm_shift_slide.ll
endian.ll
f16-llvm-ir.ll In visitSTORE, always use FindBetterChain, rather than only when UseAA is enabled. 2017-03-14 00:34:14 +00:00
fexuprl.ll [mips] Add tests for half precision floating point support. 2016-11-21 20:34:10 +00:00
frameindex.ll [mips] Use --check-prefixes where appropriate. NFC. 2016-06-24 12:23:17 +00:00
i5-a.ll
i5-b.ll [mips][msa] Fix generation of bm(n)zi and bins[lr]i instructions 2017-04-07 13:31:36 +00:00
i5-c.ll
i5-m.ll
i5-s.ll
i5_ld_st.ll In visitSTORE, always use FindBetterChain, rather than only when UseAA is enabled. 2017-03-14 00:34:14 +00:00
i8.ll
i10.ll
immediates-bad.ll [mips] Fix Mips MSA instrinsics 2017-01-10 16:40:57 +00:00
immediates.ll [mips][msa] Fix generation of bm(n)zi and bins[lr]i instructions 2017-04-07 13:31:36 +00:00
inline-asm.ll
llvm-stress-s449609655-simplified.ll
llvm-stress-s525530439.ll
llvm-stress-s997348632.ll
llvm-stress-s1704963983.ll
llvm-stress-s1935737938.ll
llvm-stress-s2090927243-simplified.ll
llvm-stress-s2501752154-simplified.ll
llvm-stress-s2704903805.ll
llvm-stress-s3861334421.ll
llvm-stress-s3926023935.ll
llvm-stress-s3997499501.ll
llvm-stress-sz1-s742806235.ll
msa-nooddspreg.ll [mips] Honour -mno-odd-spreg for vector splat (again) 2017-01-10 15:53:10 +00:00
shift-dagcombine.ll
shift_constant_pool.ll [mips][msa] Mask vectors holding shift amounts 2017-04-20 13:26:46 +00:00
shift_no_and.ll [mips][msa] Mask vectors holding shift amounts 2017-04-20 13:26:46 +00:00
shuffle.ll
special.ll
spill.ll
vec.ll
vecs10.ll