[PATCH] D113885: [MachineCSE] Use isAsCheapAsAMove in TargetInstrInfo

wangpc via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 15 04:14:52 PST 2021


pcwang-thead created this revision.
Herald added a subscriber: hiraditya.
pcwang-thead requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113885

Files:
  llvm/lib/CodeGen/MachineCSE.cpp


Index: llvm/lib/CodeGen/MachineCSE.cpp
===================================================================
--- llvm/lib/CodeGen/MachineCSE.cpp
+++ llvm/lib/CodeGen/MachineCSE.cpp
@@ -785,7 +785,7 @@
   if (!isCSECandidate(MI) ||
       MI->isNotDuplicable() ||
       MI->mayLoad() ||
-      MI->isAsCheapAsAMove() ||
+      TII->isAsCheapAsAMove(*MI) ||
       MI->getNumDefs() != 1 ||
       MI->getNumExplicitDefs() != 1)
     return false;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113885.387208.patch
Type: text/x-patch
Size: 444 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211115/e277c4d3/attachment.bin>


More information about the llvm-commits mailing list