From 01f1bad6182e316eaf90f146901f04bcba3f64a7 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Sat, 6 Jul 2019 18:33:29 +0000 Subject: [PATCH] [X86] LowerBuildVectorv16i8 - pull out repeated getOperand() call. NFCI. llvm-svn: 365270 --- llvm/lib/Target/X86/X86ISelLowering.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 9710534f258f..475731fc057c 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -7237,11 +7237,11 @@ static SDValue LowerBuildVectorv16i8(SDValue Op, unsigned NonZeros, } if (NextIsNonZero) { - SDValue NextElt; + SDValue NextElt = Op.getOperand(i + 1); if (i == 0 && NumZero) - NextElt = DAG.getZExtOrTrunc(Op.getOperand(i+1), dl, MVT::i32); + NextElt = DAG.getZExtOrTrunc(NextElt, dl, MVT::i32); else - NextElt = DAG.getAnyExtOrTrunc(Op.getOperand(i+1), dl, MVT::i32); + NextElt = DAG.getAnyExtOrTrunc(NextElt, dl, MVT::i32); NextElt = DAG.getNode(ISD::SHL, dl, MVT::i32, NextElt, DAG.getConstant(8, dl, MVT::i8)); if (ThisIsNonZero)