[llvm] a1d57f7 - [NFC][X86] `detectAVGPattern()`: rely on `AVGSplitter()` to perform truncation
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 12 10:12:26 PDT 2021
Author: Roman Lebedev
Date: 2021-10-12T20:12:09+03:00
New Revision: a1d57f75d16d5567c211ff0e74718cc7604ab7d3
URL: https://github.com/llvm/llvm-project/commit/a1d57f75d16d5567c211ff0e74718cc7604ab7d3
DIFF: https://github.com/llvm/llvm-project/commit/a1d57f75d16d5567c211ff0e74718cc7604ab7d3.diff
LOG: [NFC][X86] `detectAVGPattern()`: rely on `AVGSplitter()` to perform truncation
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 2c4349f3b5bf..b998a749e170 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -46823,7 +46823,6 @@ static SDValue detectAVGPattern(SDValue In, EVT VT, SelectionDAG &DAG,
// demote it and emit X86ISD::AVG instruction.
SDValue VecOnes = DAG.getConstant(1, DL, InVT);
Operands[1] = DAG.getNode(ISD::SUB, DL, InVT, Operands[1], VecOnes);
- Operands[1] = DAG.getNode(ISD::TRUNCATE, DL, VT, Operands[1]);
return AVGSplitter({Operands[0].getOperand(0), Operands[1]});
}
More information about the llvm-commits
mailing list