[llvm] [X86] Fix typo: QWORD alignment is greater than 4, not 8 (PR #87819)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 5 14:44:33 PDT 2024


================
@@ -136,4 +136,18 @@ entry:
   ret void
 }
 
+define void @small_memset_to_rep_stos_64(ptr %ptr) minsize nounwind {
+; CHECK-LABEL: small_memset_to_rep_stos_64:
+; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    pushq $32
+; CHECK-NEXT:    popq %rcx
+; CHECK-NEXT:    xorl %eax, %eax
+; CHECK-NEXT:    rep;stosl %eax, %es:(%rdi)
+; CHECK-NEXT:    retq
+entry:
+  call void @llvm.memset.p0.i64(ptr align 8 %ptr, i8 0, i64 128, i1 false)
+  ret void
+}
+
 declare void @llvm.memset.p0.i32(ptr nocapture writeonly, i8, i32, i1)
+declare void @llvm.memset.inline.p0.i64(ptr nocapture writeonly, i8, i64, i1)
----------------
RKSimon wrote:

remove this or fix this? we don't need to declare anymore (hence why it still worked), but even if you want to keep it, you should only declare used intrinsics

https://github.com/llvm/llvm-project/pull/87819


More information about the llvm-commits mailing list