[llvm] using UNDEF SDNode instead of Constant SDNode when extend the UNDEF SDNode (PR #122741)
zhijian lin via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 20 12:50:41 PST 2025
diggerlin wrote:
> The issue that the effect of `DeadArgumentEliminationPass` is not fully realized is shared with other platforms that require width extension of argument values such as RISC-V and LoongArch: https://godbolt.org/z/x55oqhT8h.
I added some printf into the `DeadArgumentElimination.cpp` , it run for AIX OS, it is IR to IR pass which is invoked by `clang`(not invoked by `llc`).
in the line https://github.com/intel/llvm/blob/sycl/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp#L336, it converts the unused argument to `poison`.
the patch https://reviews.llvm.org/D125983 change the unused argument from `undef` to `poison`
but according to the https://releases.llvm.org/11.0.0/docs/LangRef.html#poison-values
there is description:
There is currently no way of representing a poison value in the IR; they only exist when produced by operations such as [add](https://releases.llvm.org/11.0.0/docs/LangRef.html#i-add) with the nsw flag.
in the patch https://reviews.llvm.org/D125983, the poison can be represented a argument.
do the document need to be modified?
https://github.com/llvm/llvm-project/pull/122741
More information about the llvm-commits
mailing list