[PATCH] D96451: [AArch64][GlobalISel] Perform load/store extended reg folding with optsize

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 14:42:40 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG5f7a4d8d0589: [AArch64][GlobalISel] Perform load/store extended reg folding with optsize (authored by paquette).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96451

Files:
  llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/load-addressing-modes.mir


Index: llvm/test/CodeGen/AArch64/GlobalISel/load-addressing-modes.mir
===================================================================
--- llvm/test/CodeGen/AArch64/GlobalISel/load-addressing-modes.mir
+++ llvm/test/CodeGen/AArch64/GlobalISel/load-addressing-modes.mir
@@ -23,7 +23,7 @@
   define void @ldrhrox(i64* %addr) { ret void }
   define void @ldbbrox(i64* %addr) { ret void }
   define void @ldrqrox(i64* %addr) { ret void }
-  attributes #0 = { optsize minsize }
+  attributes #0 = { optsize }
   attributes #1 = { "target-features"="+lsl-fast" }
 ...
 
Index: llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
===================================================================
--- llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
+++ llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
@@ -5219,7 +5219,7 @@
   // Always fold if there is one use, or if we're optimizing for size.
   Register DefReg = MI.getOperand(0).getReg();
   if (MRI.hasOneNonDBGUse(DefReg) ||
-      MI.getParent()->getParent()->getFunction().hasMinSize())
+      MI.getParent()->getParent()->getFunction().hasOptSize())
     return true;
 
   // It's better to avoid folding and recomputing shifts when we don't have a


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96451.322830.patch
Type: text/x-patch
Size: 1240 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210210/d88b6bf4/attachment.bin>


More information about the llvm-commits mailing list