llvm-project/llvm/test
Craig Topper d58c165545 [X86] Make v2i1 and v4i1 legal types without VLX
Summary:
There are few oddities that occur due to v1i1, v8i1, v16i1 being legal without v2i1 and v4i1 being legal when we don't have VLX. Particularly during legalization of v2i32/v4i32/v2i64/v4i64 masked gather/scatter/load/store. We end up promoting the mask argument to these during type legalization and then have to widen the promoted type to v8iX/v16iX and truncate it to get the element size back down to v8i1/v16i1 to use a 512-bit operation. Since need to fill the upper bits of the mask we have to fill with 0s at the promoted type.

It would be better if we could just have the v2i1/v4i1 types as legal so they don't undergo any promotion. Then we can just widen with 0s directly in a k register. There are no real v4i1/v2i1 instructions anyway. Everything is done on a larger register anyway.

This also fixes an issue that we couldn't implement a masked vextractf32x4 from zmm to xmm properly.

We now have to support widening more compares to 512-bit to get a mask result out so new tablegen patterns got added.

I had to hack the legalizer for widening the operand of a setcc a bit so it didn't try create a setcc returning v4i32, extract from it, then try to promote it using a sign extend to v2i1. Now we create the setcc with v4i1 if the original setcc's result type is v2i1. Then extract that and don't sign extend it at all.

There's definitely room for improvement with some follow up patches.

Reviewers: RKSimon, zvi, guyblank

Reviewed By: RKSimon

Subscribers: llvm-commits

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

llvm-svn: 321967
2018-01-07 18:20:37 +00:00
..
Analysis [X86] Make v2i1 and v4i1 legal types without VLX 2018-01-07 18:20:37 +00:00
Assembler [ConstantFold] Support vector index when factoring out GEP index into preceding dimensions 2017-12-04 19:56:33 +00:00
Bindings
Bitcode Limit size of non-GlobalValue name 2018-01-05 19:41:19 +00:00
BugPoint
CodeGen [X86] Make v2i1 and v4i1 legal types without VLX 2018-01-07 18:20:37 +00:00
DebugInfo Re-land "Fix faulty assertion in debug info" 2018-01-05 23:01:04 +00:00
Examples
ExecutionEngine [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
Feature
FileCheck
Instrumentation [hwasan] Implement -fsanitize-recover=hwaddress. 2017-12-20 19:05:44 +00:00
Integer
JitListener
LTO [LTO] Make processing of combined module more consistent 2017-12-16 02:10:00 +00:00
Linker
MC [X86] Remove memory forms of EVEX encoded vcvttss2si/vcvttsd2si from asm matcher table. 2018-01-06 21:27:25 +00:00
Object Add flag to ArchiveWriter to test GNU64 format more efficiently 2017-12-01 00:54:28 +00:00
ObjectYAML [WebAssembly] Add support for init functions linking metadata 2017-12-14 21:10:03 +00:00
Other [PM] pass -debug-pass-manager flag into FunctionToLoopPassAdaptor's canonicalization PM 2017-12-29 08:16:06 +00:00
SafepointIRVerifier [SafepointIRVerifier] Allow non-dereferencing uses of unrelocated or poisoned PHI nodes 2017-12-25 09:35:10 +00:00
SymbolRewriter
TableGen TableGen: Allow setting SDNodeProperties on intrinsics 2017-12-20 19:36:28 +00:00
ThinLTO/X86 [ThinLTO] Don't import functions with noinline attribute 2017-12-25 13:57:24 +00:00
Transforms [CodeExtractor] Use subset of function attributes for extracted function. 2018-01-07 11:22:25 +00:00
Unit
Verifier Debug Info: Support DW_AT_calling_convention on composite types. 2018-01-05 01:13:37 +00:00
YAMLParser
tools Fix some opt-viewer test issues and disable on Windows. 2018-01-05 22:05:13 +00:00
.clang-format
CMakeLists.txt
TestRunner.sh
lit.cfg.py Add opt-viewer testing 2017-11-29 17:07:41 +00:00
lit.site.cfg.py.in Add opt-viewer testing 2017-11-29 17:07:41 +00:00