[PATCH] D141776: [X86] `X86TargetLowering`: override `allowsMemoryAccess()`

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 21 10:13:26 PST 2023


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM with a few minors



================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:2734
+bool X86TargetLowering::isMemoryAccessesFast(EVT VT, Align Alignment) const {
+  bool IsMisaligned = (8 * Alignment.value()) % VT.getSizeInBits() != 0;
+  if (!IsMisaligned)
----------------
maybe add a isBitAligned(Align, uint64_t SizeInBits) helper?


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.h:1003
 
+    bool isMemoryAccessesFast(EVT VT, Align Alignment) const;
+
----------------
(style) isMemoryAccessFast sounds a little better


================
Comment at: llvm/test/CodeGen/X86/setcc-wide-types.ll:1299
+; SSE41-NEXT:    sete %al
+; SSE41-NEXT:    retq
+;
----------------
SSE2/SSE41 might be mergable here if we add a SSE check-prefix case?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141776



More information about the llvm-commits mailing list