[all-commits] [llvm/llvm-project] 58526b: [GlobalISel] Handle nullptr constants in dbg.value
Felipe de Azevedo Piovezan via All-commits
all-commits at lists.llvm.org
Thu Jul 28 14:58:28 PDT 2022
Author: Felipe de Azevedo Piovezan <fpiovezan at apple.com>
Date: 2022-07-28 (Thu, 28 Jul 2022)
[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
More information about the All-commits