[llvm] r295618 - [X86] Use peekThroughOneUseBitcasts helper. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 19 13:40:52 PST 2017
Author: rksimon
Date: Sun Feb 19 15:40:51 2017
New Revision: 295618
URL: http://llvm.org/viewvc/llvm-project?rev=295618&view=rev
Log:
[X86] Use peekThroughOneUseBitcasts helper. NFCI.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=295618&r1=295617&r2=295618&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sun Feb 19 15:40:51 2017
@@ -28433,18 +28433,13 @@ static SDValue XFormVExtractWithShuffleI
EVT OriginalVT = InVec.getValueType();
- if (InVec.getOpcode() == ISD::BITCAST) {
- // Don't duplicate a load with other uses.
- if (!InVec.hasOneUse())
- return SDValue();
- EVT BCVT = InVec.getOperand(0).getValueType();
- if (!BCVT.isVector() ||
- BCVT.getVectorNumElements() != OriginalVT.getVectorNumElements())
- return SDValue();
- InVec = InVec.getOperand(0);
- }
+ // Peek through bitcasts, don't duplicate a load with other uses.
+ InVec = peekThroughOneUseBitcasts(InVec);
EVT CurrentVT = InVec.getValueType();
+ if (!CurrentVT.isVector() ||
+ CurrentVT.getVectorNumElements() != OriginalVT.getVectorNumElements())
+ return SDValue();
if (!isTargetShuffle(InVec.getOpcode()))
return SDValue();
More information about the llvm-commits
mailing list