summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
diff options
context:
space:
mode:
authorScott Michel <scottm@aero.org>2009-02-25 03:12:50 +0000
committerScott Michel <scottm@aero.org>2009-02-25 03:12:50 +0000
commitbb878288cb199f862d0ada1d4fa58888c4332456 (patch)
treefedb6ac20c20b5fa6fa73e6a16292667569cee2f /llvm/lib/Target/PowerPC
parentdce7846c24d17a4836acdf87eeaf58da00cea23b (diff)
downloadbcm5719-llvm-bb878288cb199f862d0ada1d4fa58888c4332456.tar.gz
bcm5719-llvm-bb878288cb199f862d0ada1d4fa58888c4332456.zip
Remove all "cached" data from BuildVectorSDNode, preferring to retrieve
results via reference parameters. This patch also appears to fix Evan's reported problem supplied as a reduced bugpoint test case. llvm-svn: 65426
Diffstat (limited to 'llvm/lib/Target/PowerPC')
-rw-r--r--llvm/lib/Target/PowerPC/PPCISelLowering.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 83683808eb6..6af60da36c7 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -3171,16 +3171,16 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
BuildVectorSDNode *BVN = dyn_cast<BuildVectorSDNode>(Op.getNode());
assert(BVN != 0 && "Expected a BuildVectorSDNode in LowerBUILD_VECTOR");
+ uint64_t SplatBits;
+ uint64_t SplatUndef;
+ unsigned SplatSize;
+ bool HasAnyUndefs;
+
// If this is a splat (repetition) of a value across the whole vector, return
// the smallest size that splats it. For example, "0x01010101010101..." is a
// splat of 0x01, 0x0101, and 0x01010101. We return SplatBits = 0x01 and
// SplatSize = 1 byte.
- if (BVN->isConstantSplat()) {
- uint64_t SplatBits = BVN->getSplatBits();
- uint64_t SplatUndef = BVN->getSplatUndef();
- unsigned SplatSize = BVN->getSplatSize();
- bool HasAnyUndefs = BVN->hasAnyUndefBits();
-
+ if (BVN->isConstantSplat(HasAnyUndefs, SplatBits, SplatUndef, SplatSize)) {
// First, handle single instruction cases.
// All zeros?
OpenPOWER on IntegriCloud