OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
502106a
)
Use Type::getScalarType.
author
Dan Gohman
<gohman@apple.com>
Tue, 16 Jun 2009 00:20:26 +0000
(
00:20
+0000)
committer
Dan Gohman
<gohman@apple.com>
Tue, 16 Jun 2009 00:20:26 +0000
(
00:20
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73451
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/ScalarReplAggregates.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/ScalarReplAggregates.cpp
b/lib/Transforms/Scalar/ScalarReplAggregates.cpp
index
7143c7b
..
d89790c
100644
(file)
--- a/
lib/Transforms/Scalar/ScalarReplAggregates.cpp
+++ b/
lib/Transforms/Scalar/ScalarReplAggregates.cpp
@@
-820,10
+820,8
@@
void SROA::RewriteMemIntrinUserOfAlloca(MemIntrinsic *MI, Instruction *BCInst,
StoreVal = Constant::getNullValue(EltTy); // 0.0, null, 0, <0,0>
} else {
// If EltTy is a vector type, get the element type.
- const Type *ValTy = EltTy;
- if (const VectorType *VTy = dyn_cast<VectorType>(ValTy))
- ValTy = VTy->getElementType();
-
+ const Type *ValTy = EltTy->getScalarType();
+
// Construct an integer with the right value.
unsigned EltSize = TD->getTypeSizeInBits(ValTy);
APInt OneVal(EltSize, CI->getZExtValue());