[PATCH] D64031: isBytewiseValue checks ConstantVector element by element
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 12 15:37:54 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL365971: isBytewiseValue checks ConstantVector element by element (authored by vitalybuka, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D64031?vs=207396&id=209623#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64031/new/
https://reviews.llvm.org/D64031
Files:
llvm/trunk/lib/Analysis/ValueTracking.cpp
llvm/trunk/unittests/Analysis/ValueTrackingTest.cpp
Index: llvm/trunk/unittests/Analysis/ValueTrackingTest.cpp
===================================================================
--- llvm/trunk/unittests/Analysis/ValueTrackingTest.cpp
+++ llvm/trunk/unittests/Analysis/ValueTrackingTest.cpp
@@ -878,7 +878,7 @@
"<4 x i8> <i8 1, i8 1, i8 2, i8 1>",
},
{
- "",
+ "i8 5",
"<2 x i8> < i8 5, i8 undef >",
},
{
Index: llvm/trunk/lib/Analysis/ValueTracking.cpp
===================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp
@@ -3253,12 +3253,7 @@
return Val;
}
- if (isa<ConstantVector>(C)) {
- Constant *Splat = cast<ConstantVector>(C)->getSplatValue();
- return Splat ? isBytewiseValue(Splat, DL) : nullptr;
- }
-
- if (isa<ConstantArray>(C) || isa<ConstantStruct>(C)) {
+ if (isa<ConstantAggregate>(C)) {
Value *Val = UndefInt8;
for (unsigned I = 0, E = C->getNumOperands(); I != E; ++I)
if (!(Val = Merge(Val, isBytewiseValue(C->getOperand(I), DL))))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64031.209623.patch
Type: text/x-patch
Size: 1082 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190712/d6ddb102/attachment-0001.bin>
More information about the llvm-commits
mailing list