[PATCH] D22840: [InstCombine] Split int64 store into separate int32 stores

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 18:35:38 PDT 2016


majnemer added inline comments.

================
Comment at: lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:1287-1292
@@ +1286,8 @@
+/// Instruction sequence of splitted stores:
+///   %ref.tmp = alloca i64, align 8
+///   %1 = bitcast i64* %ref.tmp to i32*
+///   store i32 %int_tmp, i32* %1, align 4
+///   %2 = getelementptr i32, i32* %1, i64 1
+///   %3 = bitcast i32* %2 to float*
+///   store float %float_tmp, float* %3, align 4
+///
----------------
Is this more canonical than insertelement into a vector and performing a single store?
I'm not sure we have a canonicalization for this sort of thing, I'm not sure what the best thing to do is here...

Chandler, what are your thoughts?

================
Comment at: lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:1289
@@ +1288,3 @@
+///   %1 = bitcast i64* %ref.tmp to i32*
+///   store i32 %int_tmp, i32* %1, align 4
+///   %2 = getelementptr i32, i32* %1, i64 1
----------------
This should be align 8 no?


Repository:
  rL LLVM

https://reviews.llvm.org/D22840





More information about the llvm-commits mailing list