[PATCH] D76113: [ExpandMemCmp] Correctly set alignment of generated loads

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 16 02:26:13 PDT 2020


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

LGTM when the comments are addressed.



================
Comment at: llvm/test/CodeGen/AArch64/bcmp-inline-small.ll:19
 ; CHECKN-NEXT: ldur x
-; CHECKS:      ldr  x
-; CHECKS-NEXT: ldr  x
-; CHECKS-NEXT: ldr  w
-; CHECKS-NEXT: ldr  w
-; CHECKS-NEXT: ldrh w
-; CHECKS-NEXT: ldrh w
-; CHECKS-NEXT: ldrb w
-; CHECKS-NEXT: ldrb w
+; CHECKS-30:      ldrb
 }
----------------
courbet wrote:
> aqjune wrote:
> > courbet wrote:
> > > I'm not sure what this checks exactly.
> > > Can you expand the checked pattern ? It would make it clearer what we're looking for.
> > It checks whether ldrb is repeated 30 times (for reading 15 bytes of %s1 and %s2 each).
> > I think expanding this would be a bit verbose; I attach the output asm file.{F11576881}
> ping
OK, that's what I suspected (this behaviour of `Filecheck` is undocumented and I coul dnot find similar usages). Well, that's an issue because this blows up the number of loads, which is not really desirable (@evandro FYI). But this is better than broken code, so LGTM. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76113





More information about the llvm-commits mailing list