|
5 | 5 | ; RUN: opt < %s -mtriple xcore-xmos-elf -instcombine -S | FileCheck %s -check-prefixes=CHECK,CHECK-IPRINTF
|
6 | 6 | ; RUN: opt < %s -mtriple=i386-pc-windows-msvc -instcombine -S | FileCheck %s --check-prefixes=CHECK,WIN
|
7 | 7 | ; RUN: opt < %s -mtriple=i386-mingw32 -instcombine -S | FileCheck %s --check-prefixes=CHECK,WIN
|
| 8 | +; RUN: opt < %s -mtriple=armv7-none-linux-android16 -instcombine -S | FileCheck %s --check-prefixes=CHECK,ANDROID |
8 | 9 |
|
9 | 10 | target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
|
10 | 11 |
|
@@ -108,6 +109,12 @@ define i32 @test_simplify7(i8* %dst, i8* %str) {
|
108 | 109 | ; WIN-NEXT: [[LENINC:%.*]] = add i32 [[STRLEN]], 1
|
109 | 110 | ; WIN-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 [[DST:%.*]], i8* align 1 [[STR]], i32 [[LENINC]], i1 false)
|
110 | 111 | ; WIN-NEXT: ret i32 [[STRLEN]]
|
| 112 | +; |
| 113 | +; ANDROID-LABEL: @test_simplify7( |
| 114 | +; ANDROID-NEXT: [[STRLEN:%.*]] = call i32 @strlen(i8* noundef nonnull dereferenceable(1) [[STR:%.*]]) |
| 115 | +; ANDROID-NEXT: [[LENINC:%.*]] = add i32 [[STRLEN]], 1 |
| 116 | +; ANDROID-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 [[DST:%.*]], i8* align 1 [[STR]], i32 [[LENINC]], i1 false) |
| 117 | +; ANDROID-NEXT: ret i32 [[STRLEN]] |
111 | 118 | ;
|
112 | 119 | %fmt = getelementptr [3 x i8], [3 x i8]* @percent_s, i32 0, i32 0
|
113 | 120 | %r = call i32 (i8*, i8*, ...) @sprintf(i8* %dst, i8* %fmt, i8* %str)
|
|
0 commit comments