[PATCH] D35035: [InstCombine] Prevent memcpy generation for small data size

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 30 13:39:06 PDT 2018


lebedev.ri added a comment.

Code looks good.



================
Comment at: test/Transforms/InstCombine/element-atomic-memintrins.ll:101
 ; CHECK-LABEL: @test_memmove_to_memcpy(
-; CHECK-NEXT:    call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i32(i8* align 1 [[DEST:%.*]], i8* align 16 getelementptr inbounds ([32 x i8], [32 x i8]* @gconst, i64 0, i64 0), i32 32, i32 1)
-; CHECK-NEXT:    ret void
+; CHECK-NEXT: bitcast
+; CHECK-NEXT: store atomic
----------------
Please just use `utils/update_test_checks.py`, as stated in the first line of the test.


================
Comment at: test/Transforms/InstCombine/memcpy-to-load.ll:76
+;
+; For datalayout with largest legal integer type size of 8 bytes, all memcpy with size less than 16 bytes (and power-of-2) will be expanded inline with load/store
+;
----------------
Will running the `utils/update_test_checks.py` preserve this 'inline' comments?


https://reviews.llvm.org/D35035





More information about the llvm-commits mailing list