[PATCH] D98240: [VectorCombine] Simplify to scalar store if only one element updated
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 19 06:43:01 PDT 2021
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/VectorCombine.cpp:809
+ StoreInst *NSI = Builder.CreateStore(NewElement, GEP);
+ NSI->copyMetadata(*SI);
+ replaceValue(I, *NSI);
----------------
I think we need to set the alignment here. For example, the original store could have a alignment less than the default for the type.
================
Comment at: llvm/test/Transforms/InstCombine/load-insert-store.ll:1
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -instcombine < %s | FileCheck %s
----------------
I'm not sure why this has been removed?
================
Comment at: llvm/test/Transforms/VectorCombine/X86/load-insert-store.ll:15
+ %vecins = insertelement <16 x i8> %0, i8 %s, i32 3
+ store <16 x i8> %vecins, <16 x i8>* %q
+ ret void
----------------
can you also add a test with element types > i8?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98240/new/
https://reviews.llvm.org/D98240
More information about the llvm-commits
mailing list