llvm-6502/test
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
..
Analysis When analyzing vectors of element type that require legalization, 2014-03-10 22:59:13 +00:00
Assembler IR: add a second ordering operand to cmpxhg for failure 2014-03-11 10:48:52 +00:00
Bindings Don't try to set a dummy DataLayout. It is parsed now. 2014-02-25 20:41:28 +00:00
Bitcode IR: add a second ordering operand to cmpxhg for failure 2014-03-11 10:48:52 +00:00
BugPoint [bugpoint] Add testcase for r203343. 2014-03-10 16:58:54 +00:00
CodeGen [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
DebugInfo DebugInfo: Omit pubnames/pubtypes when compiling with -gmlt 2014-03-12 03:34:38 +00:00
ExecutionEngine Ignore old JIT tests in AARch64 - CMake style 2014-02-25 09:31:00 +00:00
Feature Change math intrinsic attributes from readonly to readnone. These 2014-03-06 00:18:15 +00:00
FileCheck FileCheck: fix a bug with multiple --check-prefix options. Similar to r194565 2013-11-20 13:25:05 +00:00
Instrumentation IR: add a second ordering operand to cmpxhg for failure 2014-03-11 10:48:52 +00:00
Integer
JitListener
Linker Don't assume an empty stderr. 2014-03-11 18:25:33 +00:00
LTO Module: Don't rename in getOrInsertFunction() 2014-03-10 23:42:28 +00:00
MC [mips] Implement NaCl sandboxing of function calls: 2014-03-11 21:23:40 +00:00
Object Now that it is possible, use the mangler in IRObjectFile. 2014-02-28 02:17:23 +00:00
Other [PM] Wire up the Verifier for the new pass manager and connect it to the 2014-01-20 11:34:08 +00:00
TableGen [TableGen] Correctly generate implicit anonymous prototype defs in multiclasses 2014-01-02 20:47:09 +00:00
tools Fix the printing of n_type. 2014-03-06 20:13:41 +00:00
Transforms Fix crash in PRE. 2014-03-11 15:07:32 +00:00
Unit With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore. 2014-02-28 16:16:51 +00:00
Verifier IR: Change inalloca's grammar a bit 2014-03-09 06:41:58 +00:00
YAMLParser
.clang-format
CMakeLists.txt [CMake] check-llvm: Include "bugpoint" in dependent list. 2014-03-04 16:13:30 +00:00
lit.cfg PGO: llvm-profdata: tool for merging profiles 2014-02-17 23:22:49 +00:00
lit.site.cfg.in Eliminate inappropriate use of FindProgramByName() from lli 2014-01-22 21:52:35 +00:00
Makefile With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore. 2014-02-28 16:16:51 +00:00
Makefile.tests
TestRunner.sh