llvm-project/llvm/lib/CodeGen/GlobalISel
Felipe de Azevedo Piovezan 58526b2d2b [GlobalISel] Handle nullptr constants in dbg.value
Currently, the LLVM IR -> MIR translator fails to translate dbg.values
whose first argument is a null pointer. However, in other portions of
the code, such pointers are always lowered to the constant zero, for
example see IRTranslator::Translate(Constant, Register).

This patch addresses the limitation by following the same approach of
lowering null pointers to zero.

A prior test was checking that null pointers were always lowered to
$noreg; this test is changed to check for zero, and the previous
behavior is now checked by introducing a dbg.value whose first argument
is the address of a global variable.

Differential Revision: https://reviews.llvm.org/D130721
2022-07-28 14:58:14 -07:00
..
CMakeLists.txt [nfc][codegen] Move RegisterBank[Info].cpp under CodeGen 2022-02-15 11:27:15 -08:00
CSEInfo.cpp [CodeGen] Qualify auto variables in for loops (NFC) 2022-07-17 01:33:28 -07:00
CSEMIRBuilder.cpp [GlobalISel] Change ConstantFoldVectorBinop to return vector of APInt 2022-05-13 09:33:07 +01:00
CallLowering.cpp [CodeGen] Qualify auto variables in for loops (NFC) 2022-07-17 01:33:28 -07:00
Combiner.cpp [CodeGen] Apply clang-tidy fixes for readability-redundant-smartptr-get (NFC) 2022-03-20 23:11:06 -07:00
CombinerHelper.cpp [GlobalISel] Fix miscompile of G_UREM + G_UDIV due to not checking for equality 2022-07-25 16:03:05 -07:00
GISelChangeObserver.cpp
GISelKnownBits.cpp GlobalISel: Implement computeKnownBits for overflow bool results 2022-04-11 19:43:37 -04:00
GlobalISel.cpp Cleanup includes: DebugInfo & CodeGen 2022-03-12 17:26:40 +01:00
IRTranslator.cpp [GlobalISel][DebugInfo] Remove debug info with zero line from constants inserted at entry block 2022-07-25 17:19:01 +00:00
InlineAsmLowering.cpp [IR] Don't use blockaddresses as callbr arguments 2022-07-15 10:18:17 +02:00
InstructionSelect.cpp Cleanup includes: DebugInfo & CodeGen 2022-03-12 17:26:40 +01:00
InstructionSelector.cpp [GISel] Don't fold convergent instruction across CFG 2022-07-01 10:24:24 -07:00
LegacyLegalizerInfo.cpp [CodeGen] Use default member initialization (NFC) 2022-01-30 12:32:51 -08:00
LegalityPredicates.cpp GlobalISel: Add memSizeNotByteSizePow2 legality helper 2022-04-11 19:43:37 -04:00
LegalizeMutations.cpp GlobalISel: Add LegalizeMutations to help use More/FewerElements 2022-04-19 21:04:32 -04:00
Legalizer.cpp Cleanup include: codegen second round 2022-03-23 13:54:00 +01:00
LegalizerHelper.cpp [GlobalISel] Change widenScalar of G_FCONSTANT to mutate into G_CONSTANT. 2022-07-14 11:05:10 -07:00
LegalizerInfo.cpp GlobalISel: Update mutationIsSane assert for scalable vectors 2022-04-12 16:54:03 -04:00
LoadStoreOpt.cpp [CodeGen] Qualify auto variables in for loops (NFC) 2022-07-17 01:33:28 -07:00
Localizer.cpp Cleanup includes: DebugInfo & CodeGen 2022-03-12 17:26:40 +01:00
LostDebugLocObserver.cpp
MachineIRBuilder.cpp [GlobalISel] Handle nullptr constants in dbg.value 2022-07-28 14:58:14 -07:00
RegBankSelect.cpp GlobalISel: Relax handling of G_ASSERT_* with source register classes 2022-04-22 10:49:50 -04:00
Utils.cpp [CodeGen] Qualify auto variables in for loops (NFC) 2022-07-17 01:33:28 -07:00