88define i8 @memcpy_constant_arg_ptr_to_alloca (ptr addrspace (4 ) noalias readonly align 4 dereferenceable (32 ) %arg , i32 %idx ) {
99; CHECK-LABEL: @memcpy_constant_arg_ptr_to_alloca(
1010; CHECK-NEXT: [[TMP1:%.*]] = sext i32 [[IDX:%.*]] to i64
11- ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [32 x i8] , ptr addrspace(4) [[ARG:%.*]], i64 0 , i64 [[TMP1]]
11+ ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i8 , ptr addrspace(4) [[ARG:%.*]], i64 [[TMP1]]
1212; CHECK-NEXT: [[LOAD:%.*]] = load i8, ptr addrspace(4) [[GEP]], align 1
1313; CHECK-NEXT: ret i8 [[LOAD]]
1414;
@@ -22,7 +22,7 @@ define i8 @memcpy_constant_arg_ptr_to_alloca(ptr addrspace(4) noalias readonly a
2222define i8 @memcpy_constant_arg_ptr_to_alloca_load_metadata (ptr addrspace (4 ) noalias readonly align 4 dereferenceable (32 ) %arg , i32 %idx ) {
2323; CHECK-LABEL: @memcpy_constant_arg_ptr_to_alloca_load_metadata(
2424; CHECK-NEXT: [[TMP1:%.*]] = sext i32 [[IDX:%.*]] to i64
25- ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [32 x i8] , ptr addrspace(4) [[ARG:%.*]], i64 0 , i64 [[TMP1]]
25+ ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i8 , ptr addrspace(4) [[ARG:%.*]], i64 [[TMP1]]
2626; CHECK-NEXT: [[LOAD:%.*]] = load i8, ptr addrspace(4) [[GEP]], align 1, !noalias [[META0:![0-9]+]]
2727; CHECK-NEXT: ret i8 [[LOAD]]
2828;
@@ -36,7 +36,7 @@ define i8 @memcpy_constant_arg_ptr_to_alloca_load_metadata(ptr addrspace(4) noal
3636define i64 @memcpy_constant_arg_ptr_to_alloca_load_alignment (ptr addrspace (4 ) noalias readonly align 4 dereferenceable (256 ) %arg , i32 %idx ) {
3737; CHECK-LABEL: @memcpy_constant_arg_ptr_to_alloca_load_alignment(
3838; CHECK-NEXT: [[TMP1:%.*]] = sext i32 [[IDX:%.*]] to i64
39- ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [32 x i64] , ptr addrspace(4) [[ARG:%.*]], i64 0 , i64 [[TMP1]]
39+ ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i64, ptr addrspace(4) [[ARG:%.*]], i64 [[TMP1]]
4040; CHECK-NEXT: [[LOAD:%.*]] = load i64, ptr addrspace(4) [[GEP]], align 16
4141; CHECK-NEXT: ret i64 [[LOAD]]
4242;
@@ -51,7 +51,7 @@ define i64 @memcpy_constant_arg_ptr_to_alloca_load_atomic(ptr addrspace(4) noali
5151; CHECK-LABEL: @memcpy_constant_arg_ptr_to_alloca_load_atomic(
5252; CHECK-NEXT: [[ALLOCA:%.*]] = alloca [32 x i64], align 8, addrspace(5)
5353; CHECK-NEXT: call void @llvm.memcpy.p5.p4.i64(ptr addrspace(5) noundef align 8 dereferenceable(256) [[ALLOCA]], ptr addrspace(4) noundef align 8 dereferenceable(256) [[ARG:%.*]], i64 256, i1 false)
54- ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [32 x i64] , ptr addrspace(5) [[ALLOCA]], i32 0 , i32 [[IDX:%.*]]
54+ ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i64, ptr addrspace(5) [[ALLOCA]], i32 [[IDX:%.*]]
5555; CHECK-NEXT: [[LOAD:%.*]] = load atomic i64, ptr addrspace(5) [[GEP]] syncscope("somescope") acquire, align 8
5656; CHECK-NEXT: ret i64 [[LOAD]]
5757;
@@ -66,7 +66,7 @@ define i64 @memcpy_constant_arg_ptr_to_alloca_load_atomic(ptr addrspace(4) noali
6666define i8 @memmove_constant_arg_ptr_to_alloca (ptr addrspace (4 ) noalias readonly align 4 dereferenceable (32 ) %arg , i32 %idx ) {
6767; CHECK-LABEL: @memmove_constant_arg_ptr_to_alloca(
6868; CHECK-NEXT: [[TMP1:%.*]] = sext i32 [[IDX:%.*]] to i64
69- ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [32 x i8] , ptr addrspace(4) [[ARG:%.*]], i64 0 , i64 [[TMP1]]
69+ ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i8 , ptr addrspace(4) [[ARG:%.*]], i64 [[TMP1]]
7070; CHECK-NEXT: [[LOAD:%.*]] = load i8, ptr addrspace(4) [[GEP]], align 1
7171; CHECK-NEXT: ret i8 [[LOAD]]
7272;
@@ -81,7 +81,7 @@ define i8 @memmove_constant_arg_ptr_to_alloca(ptr addrspace(4) noalias readonly
8181define amdgpu_kernel void @memcpy_constant_byref_arg_ptr_to_alloca (ptr addrspace (4 ) noalias readonly align 4 byref([32 x i8 ]) %arg , ptr addrspace (1 ) %out , i32 %idx ) {
8282; CHECK-LABEL: @memcpy_constant_byref_arg_ptr_to_alloca(
8383; CHECK-NEXT: [[TMP1:%.*]] = sext i32 [[IDX:%.*]] to i64
84- ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [32 x i8] , ptr addrspace(4) [[ARG:%.*]], i64 0 , i64 [[TMP1]]
84+ ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i8 , ptr addrspace(4) [[ARG:%.*]], i64 [[TMP1]]
8585; CHECK-NEXT: [[LOAD:%.*]] = load i8, ptr addrspace(4) [[GEP]], align 1
8686; CHECK-NEXT: store i8 [[LOAD]], ptr addrspace(1) [[OUT:%.*]], align 1
8787; CHECK-NEXT: ret void
@@ -99,7 +99,7 @@ define amdgpu_kernel void @memcpy_constant_byref_arg_ptr_to_alloca_too_many_byte
9999; CHECK-LABEL: @memcpy_constant_byref_arg_ptr_to_alloca_too_many_bytes(
100100; CHECK-NEXT: [[ALLOCA:%.*]] = alloca [32 x i8], align 4, addrspace(5)
101101; CHECK-NEXT: call void @llvm.memcpy.p5.p4.i64(ptr addrspace(5) noundef align 4 dereferenceable(31) [[ALLOCA]], ptr addrspace(4) noundef align 4 dereferenceable(31) [[ARG:%.*]], i64 31, i1 false)
102- ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [32 x i8] , ptr addrspace(5) [[ALLOCA]], i32 0 , i32 [[IDX:%.*]]
102+ ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i8 , ptr addrspace(5) [[ALLOCA]], i32 [[IDX:%.*]]
103103; CHECK-NEXT: [[LOAD:%.*]] = load i8, ptr addrspace(5) [[GEP]], align 1
104104; CHECK-NEXT: store i8 [[LOAD]], ptr addrspace(1) [[OUT:%.*]], align 1
105105; CHECK-NEXT: ret void
@@ -118,7 +118,7 @@ define amdgpu_kernel void @memcpy_constant_intrinsic_ptr_to_alloca(ptr addrspace
118118; CHECK-NEXT: [[ALLOCA:%.*]] = alloca [32 x i8], align 4, addrspace(5)
119119; CHECK-NEXT: [[KERNARG_SEGMENT_PTR:%.*]] = call align 16 dereferenceable(32) ptr addrspace(4) @llvm.amdgcn.kernarg.segment.ptr()
120120; CHECK-NEXT: call void @llvm.memcpy.p5.p4.i64(ptr addrspace(5) noundef align 4 dereferenceable(32) [[ALLOCA]], ptr addrspace(4) noundef align 16 dereferenceable(32) [[KERNARG_SEGMENT_PTR]], i64 32, i1 false)
121- ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [32 x i8] , ptr addrspace(5) [[ALLOCA]], i32 0 , i32 [[IDX:%.*]]
121+ ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i8 , ptr addrspace(5) [[ALLOCA]], i32 [[IDX:%.*]]
122122; CHECK-NEXT: [[LOAD:%.*]] = load i8, ptr addrspace(5) [[GEP]], align 1
123123; CHECK-NEXT: store i8 [[LOAD]], ptr addrspace(1) [[OUT:%.*]], align 1
124124; CHECK-NEXT: ret void
@@ -136,7 +136,7 @@ define amdgpu_kernel void @memcpy_constant_intrinsic_ptr_to_alloca(ptr addrspace
136136define i8 @memcpy_constant_arg_ptr_to_alloca_addrspacecast_to_flat (ptr addrspace (4 ) noalias readonly align 4 dereferenceable (32 ) %arg , i32 %idx ) {
137137; CHECK-LABEL: @memcpy_constant_arg_ptr_to_alloca_addrspacecast_to_flat(
138138; CHECK-NEXT: [[TMP1:%.*]] = sext i32 [[IDX:%.*]] to i64
139- ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [32 x i8] , ptr addrspace(4) [[ARG:%.*]], i64 0 , i64 [[TMP1]]
139+ ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i8 , ptr addrspace(4) [[ARG:%.*]], i64 [[TMP1]]
140140; CHECK-NEXT: [[LOAD:%.*]] = load i8, ptr addrspace(4) [[GEP]], align 1
141141; CHECK-NEXT: ret i8 [[LOAD]]
142142;
@@ -153,7 +153,7 @@ define i8 @memcpy_constant_arg_ptr_to_alloca_addrspacecast_to_flat2(ptr addrspac
153153; CHECK-LABEL: @memcpy_constant_arg_ptr_to_alloca_addrspacecast_to_flat2(
154154; CHECK-NEXT: [[ALLOCA_CAST_ASC:%.*]] = addrspacecast ptr addrspace(4) [[ARG:%.*]] to ptr
155155; CHECK-NEXT: [[TMP1:%.*]] = sext i32 [[IDX:%.*]] to i64
156- ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [32 x i8] , ptr [[ALLOCA_CAST_ASC]], i64 0 , i64 [[TMP1]]
156+ ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i8 , ptr [[ALLOCA_CAST_ASC]], i64 [[TMP1]]
157157; CHECK-NEXT: [[LOAD:%.*]] = load i8, ptr [[GEP]], align 1
158158; CHECK-NEXT: ret i8 [[LOAD]]
159159;
0 commit comments