[PATCH] D51751: Merge clang's isRepeatedBytePattern with LLVM's isBytewiseValue
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 12 10:32:31 PDT 2019
vitalybuka added inline comments.
Herald added a subscriber: jkorous.
Herald added a project: LLVM.
================
Comment at: lib/Analysis/ValueTracking.cpp:3121
+
+ if (isa<ConstantArray>(C) || isa<ConstantStruct>(C)) {
+ Value *Val = UndefInt8;
----------------
jfb wrote:
> efriedma wrote:
> > jfb wrote:
> > > efriedma wrote:
> > > > Do you really need separate loops for ConstantVector and ConstantArray?
> > > I don't think ConstantArray has getSplatValue, which I use for ConstantVector. Or are you suggesting something else?
> > I meant you could just use the for loop for ConstantVector. Maybe a bit less efficient, but the difference is unlikely to matter.
> I'd rather not since `getSplatValue` does exactly what we want here.
@jfb This vector processing does not handle undefs correctly. I'd like to fix that with D64031
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D51751/new/
https://reviews.llvm.org/D51751
More information about the llvm-commits
mailing list