aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2019-08-13 09:33:25 +0000
committerHans Wennborg <hans@hanshq.net>2019-08-13 09:33:25 +0000
commit5390d25f2b5cd6a9b234e30269661d7019a9850e (patch)
treeb3eec796eb2d4d1b6e4bdbcddffcdb51f2a3632a /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
parentc6cd62352cc15110c7a7389721560046a6635cde (diff)
downloadllvm-5390d25f2b5cd6a9b234e30269661d7019a9850e.zip
llvm-5390d25f2b5cd6a9b234e30269661d7019a9850e.tar.gz
llvm-5390d25f2b5cd6a9b234e30269661d7019a9850e.tar.bz2
Revert r368276 "[TargetLowering] SimplifyDemandedBits - call SimplifyMultipleUseDemandedBits for ISD::EXTRACT_VECTOR_ELT"
This introduced a false positive MemorySanitizer warning about use of uninitialized memory in a vectorized crc function in Chromium. That suggests maybe something is not right with this transformation. See https://crbug.com/992853#c7 for a reproducer. This also reverts the follow-up commits r368307 and r368308 which depended on this. > This patch attempts to peek through vectors based on the demanded bits/elt of a particular ISD::EXTRACT_VECTOR_ELT node, allowing us to avoid dependencies on ops that have no impact on the extract. > > In particular this helps remove some unnecessary scalar->vector->scalar patterns. > > The wasm shift patterns are annoying - @tlively has indicated that the wasm vector shift codegen are to be refactored in the near-term and isn't considered a major issue. > > Differential Revision: https://reviews.llvm.org/D65887 llvm-svn: 368660
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 9027bea..f373eee 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -1784,17 +1784,6 @@ bool TargetLowering::SimplifyDemandedBits(
Depth + 1))
return true;
- // Attempt to avoid multi-use ops if we don't need anything from them.
- if (!DemandedSrcBits.isAllOnesValue() ||
- !DemandedSrcElts.isAllOnesValue()) {
- if (SDValue DemandedSrc = SimplifyMultipleUseDemandedBits(
- Src, DemandedSrcBits, DemandedSrcElts, TLO.DAG, Depth + 1)) {
- SDValue NewOp =
- TLO.DAG.getNode(Op.getOpcode(), dl, VT, DemandedSrc, Idx);
- return TLO.CombineTo(Op, NewOp);
- }
- }
-
Known = Known2;
if (BitWidth > EltBitWidth)
Known = Known.zext(BitWidth, false /* => any extend */);