llvm-project/llvm/unittests
Petar Avramovic d477a7c2e7 GlobalISel/Utils: Refactor integer/float constant match functions
Rework getConstantstVRegValWithLookThrough in order to make it clear if we
are matching integer/float constant only or any constant(default).
Add helper functions that get DefVReg and APInt/APFloat from constant instr
getIConstantVRegValWithLookThrough: integer constant, only G_CONSTANT
getFConstantVRegValWithLookThrough: float constant, only G_FCONSTANT
getAnyConstantVRegValWithLookThrough: either G_CONSTANT or G_FCONSTANT

Rename getConstantVRegVal and getConstantVRegSExtVal to getIConstantVRegVal
and getIConstantVRegSExtVal. These now only match G_CONSTANT as described
in comment.

Relevant matchers now return both DefVReg and APInt/APFloat.

Replace existing uses of getConstantstVRegValWithLookThrough and
getConstantVRegVal with new helper functions. Any constant match is
only required in:
ConstantFoldBinOp: for constant argument that was bit-cast of float to int
getAArch64VectorSplat: AArch64::G_DUP operands can be any constant
amdgpu select for G_BUILD_VECTOR_TRUNC: operands can be any constant

In other places use integer only constant match.

Differential Revision: https://reviews.llvm.org/D104409
2021-09-17 11:22:13 +02:00
..
ADT [APInt] Add a concat method, use LLVM_UNLIKELY to help optimizer. 2021-09-13 22:02:54 -07:00
Analysis [value-tracking] see through returned attribute. 2021-09-13 20:52:26 +01:00
AsmParser [SVE] Remove calls to VectorType::getNumElements from AsmParserTest 2020-07-07 14:55:42 -07:00
BinaryFormat [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00
Bitcode [AMDGPU] Set the default globals address space to 1 2020-11-20 15:46:53 +00:00
Bitstream PR51018: Remove explicit conversions from SmallString to StringRef to future-proof against C++23 2021-07-08 13:37:57 -07:00
CodeGen GlobalISel/Utils: Refactor integer/float constant match functions 2021-09-17 11:22:13 +02:00
DebugInfo [Support] Convert BinaryStream class zoo to 64-bit offsets 2021-09-16 19:14:52 -04:00
Demangle [Demangle] Support Rust v0 mangling scheme in llvm::demangle 2021-06-17 10:37:26 +02:00
ExecutionEngine [ORC] Add finalization & deallocation actions, SimpleExecutorMemoryManager class 2021-09-17 09:55:45 +10:00
FileCheck Bump googletest to 1.10.0 2021-05-14 19:16:31 +02:00
Frontend [OpenMP][OpenMPIRBuilder] Implement loop unrolling. 2021-09-04 19:18:58 -05:00
FuzzMutate [FuzzMutate] Add mutator to modify instruction flags. 2021-01-23 19:05:20 +00:00
IR [DebugInfo] Enhance DIImportedEntity to accept children entities 2021-09-16 10:41:55 +05:30
InterfaceStub [ifs][elfabi] Merge llvm-ifs/elfabi tools 2021-07-19 11:23:19 -07:00
LineEditor
Linker [RGT] Recode more unreachable assertions and tautologies 2021-03-19 09:17:22 -07:00
MC [AsmParser][SystemZ][z/OS] Support for emitting labels in upper case 2021-06-24 12:50:11 -04:00
MI [AMDGPU] Rename amdgcn_wwm to amdgcn_strict_wwm 2021-03-03 09:33:57 +01:00
MIR CodeGen: Print/parse LLTs in MachineMemOperands 2021-06-30 16:54:13 -04:00
Object [AIX][XCOFF] emit vector info of traceback table. 2021-06-14 11:15:22 -04:00
ObjectYAML Add -Wno-error=unknown flag to clang-format. 2020-09-19 10:17:57 +02:00
Option [OptTable] Reapply Improve error message output for grouped short options 2021-09-03 11:13:52 +01:00
Passes unittests: Fix library dependency name 2021-07-07 06:56:15 -07:00
ProfileData [CSSPGO] Split context string to deduplicate function name used in the context. 2021-08-30 20:09:29 -07:00
Remarks
Support [Support] Convert BinaryStream class zoo to 64-bit offsets 2021-09-16 19:14:52 -04:00
TableGen Make TableGenGlobalISel an object library 2021-06-05 15:04:33 +02:00
Target [ARM] Add missing validForTailPredication for VMINNM/VMAXNM 2021-08-31 18:19:03 +01:00
TextAPI [llvm][TextAPI] add mapping from OS string to Platform 2021-05-06 16:25:56 -07:00
Transforms [Attributor] AAFunctionReachability, Handle CallBase Reachability. 2021-09-13 01:35:44 +03:00
XRay Put back the trailing commas on TYPED_TEST_SUITE 2021-05-17 14:14:13 +02:00
tools [exegesis][X86] ParallelSnippetGenerator: don't accidentally create serialized instructions 2021-09-07 12:39:23 +03:00
CMakeLists.txt [MIRPrinter] Add machine metadata support. 2021-06-19 12:48:08 -04:00
unittest.cfg.in