[PATCH] D82340: [AArch64][GlobalISel] Improve codegen for some constant vectors by using constant pool loads

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 22 18:49:15 PDT 2020


aemerson created this revision.
aemerson added a reviewer: paquette.
aemerson added a project: LLVM.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls, rovka.
aemerson marked an inline comment as done.
aemerson added inline comments.


================
Comment at: llvm/test/CodeGen/AArch64/combine-loads.ll:7
 ; CHECK:       // %bb.0:
-; CHECK-NEXT:    mov x8, xzr
-; CHECK-NEXT:    // implicit-def: $q0
----------------
I'm not entirely sure what this test was meant to demonstrate except poor codegen on -O0 (surprise surprise).


There's more smarts in AArch64ISelLowering that we don't have yet, but this change incrementally improves some of the more common patterns. I think future iterations will want to use some combination of PostLegalizerCombiner and the selector to catch the other cases.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82340

Files:
  llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/select-const-vector.mir
  llvm/test/CodeGen/AArch64/GlobalISel/select-vector-icmp.mir
  llvm/test/CodeGen/AArch64/GlobalISel/select-vector-shift.mir
  llvm/test/CodeGen/AArch64/combine-loads.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82340.272583.patch
Type: text/x-patch
Size: 30152 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200623/13e3c191/attachment.bin>


More information about the llvm-commits mailing list