[llvm] dc42ff6 - [InstCombine] add FIXME comment to shuffle transform; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 4 10:02:21 PST 2020
Author: Sanjay Patel
Date: 2020-02-04T13:02:06-05:00
New Revision: dc42ff6697db1847a6e2f154de07f6e1f3d97ae4
URL: https://github.com/llvm/llvm-project/commit/dc42ff6697db1847a6e2f154de07f6e1f3d97ae4
DIFF: https://github.com/llvm/llvm-project/commit/dc42ff6697db1847a6e2f154de07f6e1f3d97ae4.diff
LOG: [InstCombine] add FIXME comment to shuffle transform; NFC
Existing tests:
rG5d04e008f708
rG2a191cf8500f
...should verify that the underlying analysis doesn't improve
too much without updating this user code.
Added:
Modified:
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index f6bc83347e05..6f22190582b3 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -1701,6 +1701,9 @@ Instruction *InstCombiner::foldVectorBinop(BinaryOperator &Inst) {
BO->getOpcode() != Opcode)
return nullptr;
+ // FIXME: This may not be safe if the analysis allows undef elements. By
+ // moving 'Y' before the splat shuffle, we are implicitly assuming
+ // that it is not undef/poison at the splat index.
Value *Y, *OtherOp;
if (isSplatValue(BO->getOperand(0), SplatIndex->getZExtValue())) {
Y = BO->getOperand(0);
More information about the llvm-commits
mailing list