[all-commits] [llvm/llvm-project] 4f5af9: [ValueTracking] Fix usage of DataLayout::getTypeSt...
huihzhang via All-commits
all-commits at lists.llvm.org
Fri Mar 20 16:52:27 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 4f5af9d70dcca15bb639042cdf054b57a7e4836f
https://github.com/llvm/llvm-project/commit/4f5af9d70dcca15bb639042cdf054b57a7e4836f
Author: Huihui Zhang <huihuiz at quicinc.com>
Date: 2020-03-20 (Fri, 20 Mar 2020)
Changed paths:
M llvm/include/llvm/Support/TypeSize.h
M llvm/lib/Analysis/ValueTracking.cpp
A llvm/test/Transforms/MemCpyOpt/store-to-memset-is-nonzero-type.ll
Log Message:
-----------
[ValueTracking] Fix usage of DataLayout::getTypeStoreSize()
Summary:
DataLayout::getTypeStoreSize() returns TypeSize.
For cases where it can not be scalable vector (e.g., GlobalVariable),
explicitly call TypeSize::getFixedSize().
For cases where scalable property doesn't matter, (e.g., check for
zero-sized type), use TypeSize::isNonZero().
Reviewers: sdesmalen, efriedma, apazos, reames
Reviewed By: efriedma
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D76454
More information about the All-commits
mailing list