From 308b4bca14ffb8d97075dbb653ba96c632406a78 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Mon, 17 Oct 2022 16:37:05 -0700 Subject: [PATCH] [NFC][SROA] Update comment to use opaque pointers for clarity --- llvm/lib/Transforms/Scalar/SROA.cpp | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp index cb2c43e..7713129 100644 --- a/llvm/lib/Transforms/Scalar/SROA.cpp +++ b/llvm/lib/Transforms/Scalar/SROA.cpp @@ -3746,20 +3746,15 @@ static Type *getTypePartition(const DataLayout &DL, Type *Ty, uint64_t Offset, /// the following: /// /// %a = alloca [12 x i8] -/// %gep1 = getelementptr [12 x i8]* %a, i32 0, i32 0 -/// %gep2 = getelementptr [12 x i8]* %a, i32 0, i32 4 -/// %gep3 = getelementptr [12 x i8]* %a, i32 0, i32 8 -/// %iptr1 = bitcast i8* %gep1 to i64* -/// %iptr2 = bitcast i8* %gep2 to i64* -/// %fptr1 = bitcast i8* %gep1 to float* -/// %fptr2 = bitcast i8* %gep2 to float* -/// %fptr3 = bitcast i8* %gep3 to float* -/// store float 0.0, float* %fptr1 -/// store float 1.0, float* %fptr2 -/// %v = load i64* %iptr1 -/// store i64 %v, i64* %iptr2 -/// %f1 = load float* %fptr2 -/// %f2 = load float* %fptr3 +/// %gep1 = getelementptr i8, ptr %a, i32 0 +/// %gep2 = getelementptr i8, ptr %a, i32 4 +/// %gep3 = getelementptr i8, ptr %a, i32 8 +/// store float 0.0, ptr %gep1 +/// store float 1.0, ptr %gep2 +/// %v = load i64, ptr %gep1 +/// store i64 %v, ptr %gep2 +/// %f1 = load float, ptr %gep2 +/// %f2 = load float, ptr %gep3 /// /// Here we want to form 3 partitions of the alloca, each 4 bytes large, and /// promote everything so we recover the 2 SSA values that should have been -- 2.7.4