[PATCH] D103180: [InstSimplify] Add constant fold for extractelement + splat for scalable vectors
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 26 11:45:33 PDT 2021
foad added a comment.
Thanks for splitting it up. I like small patches.
================
Comment at: llvm/lib/IR/ConstantFold.cpp:916-917
return CAZ->getElementValue(CIdx->getZExtValue());
+ if (Constant *SplatVal = Val->getSplatValue())
+ return SplatVal;
}
----------------
You should be able to remove the two lines above handling the CAZ case, because your new code will handle it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103180/new/
https://reviews.llvm.org/D103180
More information about the llvm-commits
mailing list