[llvm] bfa91f3 - [DAG] Restore dropped condition
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 26 12:19:30 PST 2021
Author: Nikita Popov
Date: 2021-11-26T21:18:54+01:00
New Revision: bfa91f38a9989e1df5e722ae10c0a8c3eb9abe26
URL: https://github.com/llvm/llvm-project/commit/bfa91f38a9989e1df5e722ae10c0a8c3eb9abe26
DIFF: https://github.com/llvm/llvm-project/commit/bfa91f38a9989e1df5e722ae10c0a8c3eb9abe26.diff
LOG: [DAG] Restore dropped condition
This was dropped in fcee33bd5a35786d905a40f42ed28d5a988d75eb,
presumably accidentally.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index b8ab32952d11..a6018dc3f490 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -2823,7 +2823,8 @@ bool TargetLowering::SimplifyDemandedVectorElts(
KnownUndef = SrcUndef.zextOrTrunc(NumElts);
if (IsLE && Op.getOpcode() == ISD::ANY_EXTEND_VECTOR_INREG &&
- Op.getValueSizeInBits() == Src.getValueSizeInBits()) {
+ Op.getValueSizeInBits() == Src.getValueSizeInBits() &&
+ DemandedSrcElts == 1) {
// aext - if we just need the bottom element then we can bitcast.
return TLO.CombineTo(Op, TLO.DAG.getBitcast(VT, Src));
}
More information about the llvm-commits
mailing list