[llvm] Eliminating li of 0 into arg registers of unused arguments (PR #122741)

zhijian lin via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 08:29:17 PST 2025


================
@@ -977,6 +977,18 @@ void SelectionDAGLegalize::LegalizeOp(SDNode *Node) {
   TargetLowering::LegalizeAction Action = TargetLowering::Legal;
   bool SimpleFinishLegalizing = true;
   switch (Node->getOpcode()) {
+  // FixMe: If the node represents a poison value, replace it with an undef
+  // value.
----------------
diggerlin wrote:

the poison is more restrict than undef, since we replace the the poison with undef here,  the poison information will be lost after the `functionSelectionDAGLegalize::LegalizeLoadOps(SDNode *Node)` is called. 

if we still need the poison information of poison value after the function `functionSelectionDAGLegalize::LegalizeLoadOps(SDNode *Node)` in the future, we need to modify the code.

https://github.com/llvm/llvm-project/pull/122741


More information about the llvm-commits mailing list