[llvm] 18910c4 - [Tests] Update strncpy tests

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 13:43:45 PDT 2020


May I humbly suggest a more methodical approach for the new patches, please?
1. New tests should be precommitted first
2. Before pushing the change upstream, ensure that at least the
check-llvm passes
3. When a patch is reverted, the reason should be stated in the commit message
4. When patch is relanded, the commit message should be changed from
the origins to reflect the fact of recommit, and actions taken to make
recommit possible
5. ???

Roman

On Thu, Aug 13, 2020 at 11:38 PM Dávid Bolvanský via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
>
>
> Author: Dávid Bolvanský
> Date: 2020-08-13T22:37:44+02:00
> New Revision: 18910c4cb5d4e59ef25f4b8b48fcbd3146833645
>
> URL: https://github.com/llvm/llvm-project/commit/18910c4cb5d4e59ef25f4b8b48fcbd3146833645
> DIFF: https://github.com/llvm/llvm-project/commit/18910c4cb5d4e59ef25f4b8b48fcbd3146833645.diff
>
> LOG: [Tests] Update strncpy tests
>
> Added:
>
>
> Modified:
>     llvm/test/Transforms/InstCombine/strncpy-1.ll
>
> Removed:
>
>
>
> ################################################################################
> diff  --git a/llvm/test/Transforms/InstCombine/strncpy-1.ll b/llvm/test/Transforms/InstCombine/strncpy-1.ll
> index 969358eb4d7d..5d35f613ea5d 100644
> --- a/llvm/test/Transforms/InstCombine/strncpy-1.ll
> +++ b/llvm/test/Transforms/InstCombine/strncpy-1.ll
> @@ -87,7 +87,7 @@ define void @test_simplify4() {
>
>  define void @test_simplify5(i8* %dst) {
>  ; CHECK-LABEL: @test_simplify5(
> -; CHECK-NEXT:    [[TMP1:%.*]] = call i8* @strncpy(i8* nonnull dereferenceable(8) [[DST:%.*]], i8* nonnull dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @hello, i32 0, i32 0), i32 32)
> +; CHECK-NEXT:    call void @llvm.memcpy.p0i8.p0i8.i32(i8* nonnull align 1 dereferenceable(32) [[DST:%.*]], i8* nonnull align 1 dereferenceable(32) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i32 0, i32 0), i32 32, i1 false)
>  ; CHECK-NEXT:    ret void
>  ;
>    %src = getelementptr [6 x i8], [6 x i8]* @hello, i32 0, i32 0
> @@ -97,7 +97,7 @@ define void @test_simplify5(i8* %dst) {
>
>  define void @test_simplify6(i8* %dst) {
>  ; CHECK-LABEL: @test_simplify6(
> -; CHECK-NEXT:    [[TMP1:%.*]] = call i8* @strncpy(i8* nonnull dereferenceable(80) [[DST:%.*]], i8* nonnull dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @hello, i32 0, i32 0), i32 32)
> +; CHECK-NEXT:    call void @llvm.memcpy.p0i8.p0i8.i32(i8* nonnull align 1 dereferenceable(80) [[DST:%.*]], i8* nonnull align 1 dereferenceable(32) getelementptr inbounds ([33 x i8], [33 x i8]* @str.1, i32 0, i32 0), i32 32, i1 false)
>  ; CHECK-NEXT:    ret void
>  ;
>    %src = getelementptr [6 x i8], [6 x i8]* @hello, i32 0, i32 0
> @@ -160,7 +160,7 @@ define void @test_no_simplify1() {
>
>  define void @test_no_simplify2() {
>  ; CHECK-LABEL: @test_no_simplify2(
> -; CHECK-NEXT:    [[TMP1:%.*]] = call i8* @strncpy(i8* nonnull dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @a, i32 0, i32 0), i8* nonnull dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @hello, i32 0, i32 0), i32 8)
> +; CHECK-NEXT:    store i64 478560413032, i64* bitcast ([32 x i8]* @a to i64*), align 1
>  ; CHECK-NEXT:    ret void
>  ;
>    %dst = getelementptr [32 x i8], [32 x i8]* @a, i32 0, i32 0
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list