This is an archive of the discontinued LLVM Phabricator instance.

[Alignment][NFC] Remove StoreInst::setAlignment(unsigned)
ClosedPublic

Authored by gchatelet on Oct 1 2019, 6:06 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

gchatelet created this revision.Oct 1 2019, 6:06 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
courbet added inline comments.Oct 3 2019, 4:34 AM
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
189 ↗(On Diff #222598)

FIXME

203 ↗(On Diff #222598)

ditto

277 ↗(On Diff #222598)

make it const + remove assert ?

llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
1367 ↗(On Diff #222598)

getOrEnforceKnownAlignment() seems to always be returning >0

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
4027 ↗(On Diff #222598)

I don't think there are any guarantees that getABITypeAlignment is non-zero for now.

gchatelet updated this revision to Diff 222991.Oct 3 2019, 5:27 AM
gchatelet marked 6 inline comments as done.
  • Address comments
gchatelet added inline comments.Oct 3 2019, 5:38 AM
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
4027 ↗(On Diff #222598)

Actually it is guaranteed to be an Align.
You can have a look at the current implementation: https://github.com/llvm/llvm-project/blob/18f805a7ea5f369ef523821693f1176b40bcfc7e/llvm/lib/IR/DataLayout.cpp#L752

courbet accepted this revision.Oct 3 2019, 5:43 AM
This revision is now accepted and ready to land.Oct 3 2019, 5:43 AM
This revision was automatically updated to reflect the committed changes.