[PATCH] D71828: [InstCombine] Convert vector store to scalar store if only one element updated
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 23 00:55:22 PST 2019
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:1200
+ auto GEP = IC.Builder.CreateGEP(ElePtr, Idx);
+ SI.setOperand(0, NewElement);
+ SI.setOperand(1, GEP);
----------------
I'd strongly suggest to simply create a new `store`.
================
Comment at: llvm/test/Transforms/InstCombine/single-element-store.ll:8
+; CHECK-NEXT: [[TMP0:%.*]] = getelementptr <16 x i8>, <16 x i8>* [[Q:%.*]], i64 0, i64 3
+; CHECK-NEXT: store i8 [[S:%.*]], i8* [[TMP0]], align 16
+; CHECK-NEXT: ret void
----------------
The alignment doesn't seem correct to me?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71828/new/
https://reviews.llvm.org/D71828
More information about the llvm-commits
mailing list