[PATCH] D134281: [CGP] Update MemIntrinsic alignment if possible

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 07:20:21 PDT 2022


arichardson added inline comments.


================
Comment at: llvm/test/CodeGen/X86/memset-2.ll:8-18
+; CHECK-NEXT:    movaps %xmm0, 160
+; CHECK-NEXT:    movaps %xmm0, 144
+; CHECK-NEXT:    movaps %xmm0, 128
+; CHECK-NEXT:    movaps %xmm0, 112
+; CHECK-NEXT:    movaps %xmm0, 96
+; CHECK-NEXT:    movaps %xmm0, 80
+; CHECK-NEXT:    movaps %xmm0, 64
----------------
pengfei wrote:
> arichardson wrote:
> > pengfei wrote:
> > > Not sure if the use of `movaps` is a good idea considering the test in below file.
> > I guess the real fix would be to not use null as the destination. I'm not sure what the test is actually checking, but I could change it to be an argument?
> How about change `0` to `1`?
> With a read on the history, I think the intention was to make sure no `movups` generated. See rG7998b1d6f and rGa048c83fe47
I've added an argument instead of using null as the base - that seems to restore the previous behaviour of calling memset.


================
Comment at: llvm/test/CodeGen/X86/memset64-on-x86-32.ll:17-34
 ; SLOW_32-LABEL: bork:
 ; SLOW_32:       # %bb.0:
-; SLOW_32-NEXT:    movl $0, 4
-; SLOW_32-NEXT:    movl $0, 0
-; SLOW_32-NEXT:    movl $0, 12
-; SLOW_32-NEXT:    movl $0, 8
-; SLOW_32-NEXT:    movl $0, 20
-; SLOW_32-NEXT:    movl $0, 16
-; SLOW_32-NEXT:    movl $0, 28
-; SLOW_32-NEXT:    movl $0, 24
-; SLOW_32-NEXT:    movl $0, 36
-; SLOW_32-NEXT:    movl $0, 32
-; SLOW_32-NEXT:    movl $0, 44
-; SLOW_32-NEXT:    movl $0, 40
-; SLOW_32-NEXT:    movl $0, 52
-; SLOW_32-NEXT:    movl $0, 48
-; SLOW_32-NEXT:    movl $0, 60
-; SLOW_32-NEXT:    movl $0, 56
-; SLOW_32-NEXT:    movl $0, 68
-; SLOW_32-NEXT:    movl $0, 64
-; SLOW_32-NEXT:    movl $0, 76
-; SLOW_32-NEXT:    movl $0, 72
+; SLOW_32-NEXT:    xorps %xmm0, %xmm0
+; SLOW_32-NEXT:    movaps %xmm0, 64
+; SLOW_32-NEXT:    movaps %xmm0, 48
+; SLOW_32-NEXT:    movaps %xmm0, 32
+; SLOW_32-NEXT:    movaps %xmm0, 16
----------------
pengfei wrote:
> Are they intent to use `movl/q` here?
Will change the null argument to a function input - this mostly restores the old codegen.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134281



More information about the llvm-commits mailing list