llvm-6502/test/CodeGen/Mips/msa
Daniel Sanders fe6bd52bf2 [mips] BSEL's and BINS[RL] operands are reversed compared to the vselect node used in the pattern.
Summary:
Correct the match patterns and the lowerings that made the CodeGen tests pass despite the mistakes.

The original testcase that discovered the problem was SingleSource/UnitTests/SignlessType/factor.c in test-suite.
During review, we also found that some of the existing CodeGen tests were incorrect and fixed them:
* bitwise.ll: In bsel_v16i8 the IfSet/IfClear were reversed because bsel and bmnz have different operand orders and the test didn't correctly account for this. bmnz goes 'IfClear, IfSet, CondMask', while bsel goes 'CondMask, IfClear, IfSet'.
* vec.ll: In the cases where a bsel is emitted as a bmnz (they are the same operation with a different input tied to the result) the operands were in the wrong order.
* compare.ll and compare_float.ll: The bsel operand order was correct for a greater-than comparison, but a greater-than comparison instruction doesn't exist. Lowering this operation inverts the condition so the IfSet/IfClear need to be swapped to match.

The differences between BSEL, BMNZ, and BMZ and how they map to/from vselect are rather confusing. I've therefore added a note to MSA.txt to explain this in a single place in addition to the comments that explain each case.

Reviewers: matheusalmeida, jacksprat

Reviewed By: matheusalmeida

Differential Revision: http://llvm-reviews.chandlerc.com/D3028

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203657 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-12 11:54:00 +00:00
..
2r_vector_scalar.ll [mips][msa] Add fill.d instruction. 2014-01-29 15:12:02 +00:00
2r.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
2rf_exup.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
2rf_float_int.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
2rf_fq.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
2rf_int_float.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
2rf_tq.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
2rf.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
3r_4r_widen.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
3r_4r.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
3r_splat.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
3r-a.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
3r-b.ll Fix illegal DAG produced by SelectionDAG::getConstant() for v2i64 type 2013-11-15 12:56:49 +00:00
3r-c.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
3r-d.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
3r-i.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
3r-m.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
3r-p.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
3r-s.ll [mips][msa] Correct sld and sldi builtins. 2013-12-10 11:37:00 +00:00
3r-v.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
3rf_4rf_q.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
3rf_4rf.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
3rf_exdo.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
3rf_float_int.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
3rf_int_float.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
3rf_q.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
3rf.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
arithmetic_float.ll [mips] Prevent %lo relocation being used on MSA loads and stores. 2014-03-03 14:31:21 +00:00
arithmetic.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
basic_operations_float.ll [mips][msa] Correct the behaviour of the COPY_FW pseudo on lanes 2 and 3. 2014-03-04 13:54:30 +00:00
basic_operations.ll [mips] Prevent %lo relocation being used on MSA loads and stores. 2014-03-03 14:31:21 +00:00
bit.ll Fix illegal DAG produced by SelectionDAG::getConstant() for v2i64 type 2013-11-15 12:56:49 +00:00
bitcast.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
bitwise.ll [mips] BSEL's and BINS[RL] operands are reversed compared to the vselect node used in the pattern. 2014-03-12 11:54:00 +00:00
compare_float.ll [mips] BSEL's and BINS[RL] operands are reversed compared to the vselect node used in the pattern. 2014-03-12 11:54:00 +00:00
compare.ll [mips] BSEL's and BINS[RL] operands are reversed compared to the vselect node used in the pattern. 2014-03-12 11:54:00 +00:00
elm_copy.ll [mips][msa] Add copy_{u,s}.d. 2014-01-29 14:05:28 +00:00
elm_cxcmsa.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
elm_insv.ll [mips][msa] Add insert.d instruction. 2014-01-31 13:31:20 +00:00
elm_move.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
elm_shift_slide.ll [mips][msa] Correct sld and sldi builtins. 2013-12-10 11:37:00 +00:00
endian.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
frameindex.ll [mips][msa] Fix invalid generated code when lowering FrameIndex involving unaligned offsets. 2013-12-09 12:47:12 +00:00
i5_ld_st.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
i5-a.ll Fix illegal DAG produced by SelectionDAG::getConstant() for v2i64 type 2013-11-15 12:56:49 +00:00
i5-b.ll Fix illegal DAG produced by SelectionDAG::getConstant() for v2i64 type 2013-11-15 12:56:49 +00:00
i5-c.ll Fix illegal DAG produced by SelectionDAG::getConstant() for v2i64 type 2013-11-15 12:56:49 +00:00
i5-m.ll Fix illegal DAG produced by SelectionDAG::getConstant() for v2i64 type 2013-11-15 12:56:49 +00:00
i5-s.ll Fix illegal DAG produced by SelectionDAG::getConstant() for v2i64 type 2013-11-15 12:56:49 +00:00
i8.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
i10.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
inline-asm.ll
llvm-stress-s449609655-simplified.ll Fix known typos 2014-01-24 17:20:08 +00:00
llvm-stress-s525530439.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
llvm-stress-s997348632.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
llvm-stress-s1704963983.ll Fix illegal DAG produced by SelectionDAG::getConstant() for v2i64 type 2013-11-15 12:56:49 +00:00
llvm-stress-s1935737938.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
llvm-stress-s2090927243-simplified.ll [mips][msa] Add test case that should have been added in r195456. 2013-11-22 15:47:18 +00:00
llvm-stress-s2501752154-simplified.ll [mips][msa] Float vector constants cannot use ldi.[wd] directly. Bitcast from the appropriate integer vector type. 2013-11-22 11:24:50 +00:00
llvm-stress-s2704903805.ll [mips][msa/dsp] Only do DSP combines if DSP is enabled. 2013-11-21 11:40:14 +00:00
llvm-stress-s3861334421.ll Add support for legalizing SETNE/SETEQ by inverting the condition code and the result of the comparison. 2013-11-21 13:24:49 +00:00
llvm-stress-s3926023935.ll Fixed tryFoldToZero() for vector types that need expansion. 2013-11-25 11:14:43 +00:00
llvm-stress-s3997499501.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
llvm-stress-sz1-s742806235.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
shift-dagcombine.ll [mips] Prevent %lo relocation being used on MSA loads and stores. 2014-03-03 14:31:21 +00:00
shuffle.ll [mips] Prevent %lo relocation being used on MSA loads and stores. 2014-03-03 14:31:21 +00:00
special.ll [mips][msa] Add DLSA instruction. 2014-02-10 12:05:17 +00:00
spill.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00
vec.ll [mips] BSEL's and BINS[RL] operands are reversed compared to the vselect node used in the pattern. 2014-03-12 11:54:00 +00:00
vecs10.ll [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test. 2013-11-15 11:04:16 +00:00