[PATCH] D74465: [Statepoint] Remove redundant clear of call target on register

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 20:08:06 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa6f38b46972e: [Statepoint] Remove redundant clear of call target on register (authored by skatkov).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74465/new/

https://reviews.llvm.org/D74465

Files:
  llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
  llvm/test/CodeGen/X86/statepoint-call-lowering.ll


Index: llvm/test/CodeGen/X86/statepoint-call-lowering.ll
===================================================================
--- llvm/test/CodeGen/X86/statepoint-call-lowering.ll
+++ llvm/test/CodeGen/X86/statepoint-call-lowering.ll
@@ -141,7 +141,6 @@
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    pushq %rax
 ; CHECK-NEXT:    .cfi_def_cfa_offset 16
-; CHECK-NEXT:    xorl %eax, %eax
 ; CHECK-NEXT:    nopl (%rax)
 ; CHECK-NEXT:  .Ltmp7:
 ; CHECK-NEXT:    popq %rcx
Index: llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
+++ llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
@@ -859,7 +859,8 @@
     const auto &DL = DAG.getDataLayout();
 
     unsigned AS = ISP.getCalledValue()->getType()->getPointerAddressSpace();
-    ActualCallee = DAG.getConstant(0, getCurSDLoc(), TLI.getPointerTy(DL, AS));
+    ActualCallee =
+        DAG.getTargetConstant(0, getCurSDLoc(), TLI.getPointerTy(DL, AS));
   } else {
     ActualCallee = getValue(ISP.getCalledValue());
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74465.244325.patch
Type: text/x-patch
Size: 1104 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200213/c37f82eb/attachment.bin>


More information about the llvm-commits mailing list