[llvm] 308b4bc - [NFC][SROA] Update comment to use opaque pointers for clarity
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 17 16:37:43 PDT 2022
Author: Arthur Eubanks
Date: 2022-10-17T16:37:29-07:00
New Revision: 308b4bca14ffb8d97075dbb653ba96c632406a78
URL: https://github.com/llvm/llvm-project/commit/308b4bca14ffb8d97075dbb653ba96c632406a78
DIFF: https://github.com/llvm/llvm-project/commit/308b4bca14ffb8d97075dbb653ba96c632406a78.diff
LOG: [NFC][SROA] Update comment to use opaque pointers for clarity
Added:
Modified:
llvm/lib/Transforms/Scalar/SROA.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp
index cb2c43ecb73ad..771312988bd7b 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
More information about the llvm-commits
mailing list