[llvm] b68eeff - [X86] Cleanup a comment around bitcasting X86ISD::VBROADCAST_LOAD and add an assert to make sure memory VT size doesn't change.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 28 15:08:12 PST 2020
Author: Craig Topper
Date: 2020-02-28T15:07:49-08:00
New Revision: b68eeff05ca0e95f8b244edfcf21ad950896091b
URL: https://github.com/llvm/llvm-project/commit/b68eeff05ca0e95f8b244edfcf21ad950896091b
DIFF: https://github.com/llvm/llvm-project/commit/b68eeff05ca0e95f8b244edfcf21ad950896091b.diff
LOG: [X86] Cleanup a comment around bitcasting X86ISD::VBROADCAST_LOAD and add an assert to make sure memory VT size doesn't change.
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 94216c09038c..d528e4921978 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -37138,10 +37138,12 @@ static SDValue combineBitcast(SDNode *N, SelectionDAG &DAG,
DAG.getBitcast(MVT::i16, N0.getOperand(0)));
// Combine (bitcast (vbroadcast_load)) -> (vbroadcast_load). The memory VT
- // determines // the number of bits loaded. Remaining bits are zero.
+ // determines the number of bits loaded.
if (N0.getOpcode() == X86ISD::VBROADCAST_LOAD && N0.hasOneUse() &&
VT.getScalarSizeInBits() == SrcVT.getScalarSizeInBits()) {
auto *BCast = cast<MemIntrinsicSDNode>(N0);
+ assert(VT.getScalarSizeInBits() == BCast->getMemoryVT().getSizeInBits() &&
+ "Unexpected load size!");
SDVTList Tys = DAG.getVTList(VT, MVT::Other);
SDValue Ops[] = { BCast->getChain(), BCast->getBasePtr() };
SDValue ResNode =
More information about the llvm-commits
mailing list