1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/unittests/CodeGen
Sander de Smalen 1ba98aa252 Always emit error for wrong interfaces to scalable vectors, unless cmdline flag is passed.
In order to bring up scalable vector support in LLVM incrementally,
we introduced behaviour to emit a warning, instead of an error, when
asking the wrong question of a scalable vector, like asking for the
fixed number of elements.

This patch puts that behaviour under a flag. The default behaviour is
that the compiler will always error, which means that all LLVM unit
tests and regression tests will now fail when a code-path is taken that
still uses the wrong interface.

The behaviour to demote an error to a warning can be individually enabled
for tools that want to support experimental use of scalable vectors.
This patch enables that behaviour when driving compilation from Clang.
This means that for users who want to try out scalable-vector support,
fixed-width codegen support, or build user-code with scalable vector
intrinsics, Clang will not crash and burn when the compiler encounters
such a case.

This allows us to do away with the following pattern in many of the SVE tests:
  RUN: .... 2>%t
  RUN: cat %t | FileCheck --check-prefix=WARN
  WARN-NOT: warning: ...

The behaviour to emit warnings is only temporary and we expect this flag
to be removed in the future when scalable vector support is more stable.

This patch also has fixes the following tests:
 unittests:
   ScalableVectorMVTsTest.SizeQueries
   SelectionDAGAddressAnalysisTest.unknownSizeFrameObjects
   AArch64SelectionDAGTest.computeKnownBitsSVE_ZERO_EXTEND_VECTOR_INREG

 regression tests:
   Transforms/InstCombine/vscale_gep.ll

Reviewed By: paulwalker-arm, ctetreau

Differential Revision: https://reviews.llvm.org/D98856
2021-04-02 10:55:22 +01:00
..
GlobalISel Revert "[globalisel][unittests] Rename setUp() to avoid potential mix up with SetUp() from gtest" 2021-04-01 16:47:43 -07:00
AArch64SelectionDAGTest.cpp [IR][SVE] Add new llvm.experimental.stepvector intrinsic 2021-03-23 10:43:35 +00:00
AllocationOrderTest.cpp [NFC][regalloc] Separate iteration from AllocationOrder 2020-10-05 16:13:18 -07:00
AsmPrinterDwarfTest.cpp [debug-info] refactor emitDwarfUnitLength 2021-02-25 21:00:25 -05:00
CMakeLists.txt [SelectionDAG] Avoid aliasing analysis if the object size is unknown. 2020-11-25 06:13:37 +08:00
DIEHashTest.cpp [DebugInfo] Simplify DIEInteger::SizeOf(). 2020-09-17 12:47:38 +07:00
DIETest.cpp [DebugInfo] Use a common method to determine a suitable form for section offsts (6/19). 2020-09-15 11:30:38 +07:00
LexicalScopesTest.cpp [docs][unittest][Go][StackProtector] Migrate deprecated DebugInfo::get to DILocation::get 2020-12-15 14:17:04 -08:00
LowLevelTypeTest.cpp Revert "GlobalISel: Make LLT constructors constexpr" 2020-06-17 15:31:12 +02:00
MachineInstrBundleIteratorTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MachineInstrTest.cpp Switch from llvm::is_trivially_copyable to std::is_trivially_copyable 2020-12-02 22:02:48 -08:00
MachineOperandTest.cpp Revert "Revert "[MIR] Target specific MIR formating and parsing"" 2020-01-08 20:03:29 -08:00
MFCommon.inc [X86][MC][Target] Initial backend support a tune CPU to support -mtune 2020-08-14 15:31:50 -07:00
PassManagerTest.cpp Reland "Revert "[NewPM][CodeGen] Introduce machine pass and machine pass manager"" 2020-08-07 16:40:49 -07:00
ScalableVectorMVTsTest.cpp Always emit error for wrong interfaces to scalable vectors, unless cmdline flag is passed. 2021-04-02 10:55:22 +01:00
SelectionDAGAddressAnalysisTest.cpp [SelectionDAG] Don't pass a scalable vector to MachinePointerInfo::getWithOffset in a unit test. 2021-03-18 15:19:22 -07:00
TargetOptionsTest.cpp [unittests] Add InitializePasses.h includes 2019-11-13 19:42:58 -08:00
TestAsmPrinter.cpp [DebugInfo] Fix methods of AsmPrinter to emit values corresponding to the DWARF format (1/19). 2020-09-15 11:29:48 +07:00
TestAsmPrinter.h [debug-info] refactor emitDwarfUnitLength 2021-02-25 21:00:25 -05:00
TypeTraitsTest.cpp Switch from llvm::is_trivially_copyable to std::is_trivially_copyable 2020-12-02 22:02:48 -08:00