OSDN Git Service

[X86] Pass the right VT to the getZeroExtendInReg introduced in r321398
authorCraig Topper <craig.topper@intel.com>
Sat, 23 Dec 2017 06:52:03 +0000 (06:52 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 23 Dec 2017 06:52:03 +0000 (06:52 +0000)
Apparently we don't have tests for this which I didn't realize before. I'll try to fix that but wanted to fix the obvious bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321399 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index 4a186c8..fddcedd 100644 (file)
@@ -33077,7 +33077,7 @@ static SDValue WidenMaskArithmetic(SDNode *N, SelectionDAG &DAG,
   case ISD::ANY_EXTEND:
     return Op;
   case ISD::ZERO_EXTEND:
-    return DAG.getZeroExtendInReg(Op, DL, VT.getScalarType());
+    return DAG.getZeroExtendInReg(Op, DL, NarrowVT.getScalarType());
   case ISD::SIGN_EXTEND:
     return DAG.getNode(ISD::SIGN_EXTEND_INREG, DL, VT,
                        Op, DAG.getValueType(NarrowVT));